I need a basic plugin that will change gravity and speed when you type something in chat like !sg / sm_sg or any word you like.
Or to be automatically activated only for flag "t".
I want to give some advantage to vip players.
Would like to receive source so I am able to change speed /gravity. By default should be speed 1.0 gravity 1.0. No cvars needed or any other stuff.
Thanks in advice.
Speed + Gravity
Re: Speed + Gravity
Should the gravity and speed reset on each new round? New map?
Re: Speed + Gravity
Kill wrote:Should the gravity and speed reset on each new round? New map?
Only on new maps.
Re: Speed + Gravity
Put in /cstrike/addons/source-python/plugins/{x}/{x}.py where "{x}" is whatever name you want.
Syntax: Select all
SPEED_MOD = 1.0
GRAVITY_MOD = 1.0
PERMISSION = "f"
SAY_COMMAND = "!sg"
CLIENT_COMMAND = "cmd_sg" # Probably should not use sm_ as that signifies SourceMod, which this is not.
# Don't touch below this.
#--------------------------------
from players.helpers import index_from_userid
from players.entity import Player
from commands.typed import TypedSayCommand, TypedClientCommand
from commands import CommandReturn
from events import Event
@TypedSayCommand(SAY_COMMAND)
@TypedClientCommand(CLIENT_COMMAND)
def on_command(cmdinfo):
player = Player(cmdinfo.index)
if not player.dead:
player.speed = SPEED_MOD
player.gravity = GRAVITY_MOD
return CommandReturn.BLOCK
@Event("player_spawn")
def player_spawn(event):
player = Player(index_from_userid(event.get_int("userid")))
if not player.dead and PERMISSION in player.permissions:
player.speed = SPEED_MOD
player.gravity = GRAVITY_MOD
Who is online
Users browsing this forum: No registered users and 65 guests