Skip to content

Instantly share code, notes, and snippets.

@vinci6k
vinci6k / bouncy_entity.py
Last active Apr 7, 2020
Make entities bounce in Source Engine games with Source.Python.
View bouncy_entity.py
# ../bouncy_entity/bouncy_entity.py
# Python
import math
import random
# Source.Python
from entities.dictionary import EntityDictionary
from entities.entity import Entity
from mathlib import Vector
@vinci6k
vinci6k / smooth_fov.py
Created Oct 6, 2018
Smooth field of view (FOV) change in Source Engine games.
View smooth_fov.py
# ../smooth_fov/smooth_fov.py
# Source.Python
from players.entity import Player
from engines.server import global_vars
from commands.say import SayCommand
def change_fov(index, target_fov, rate=0.3):
"""Changes a player's field of view (FOV) smoothly.
@vinci6k
vinci6k / fake_crosshair_example.py
Last active Jul 14, 2018
Adding a crosshair to unscoped snipers in CSGO.
View fake_crosshair_example.py
#fake_crosshair_example.py
from events import Event
from colors import Color
from memory import make_object
from entities.hooks import EntityCondition, EntityPreHook
from players.entity import Player
from players.helpers import index_from_userid
from weapons.entity import Weapon
from messages import HudMsg
You can’t perform that action at this time.