AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   mp_ and sv_ in set_pev (https://forums.alliedmods.net/showthread.php?t=29180)

tarre 05-31-2006 13:17

mp_ and sv_ in set_pev
 
hmm why cant i put mp_ commands in set_pev? like


Code:
set_pev(i, pev_gravity, 600.0 / get_cvar_num("sv_gravity")  /* ? */) set_pev(i, pev_startmoney, 16000.0 / get_cvar_num("mp_startmoney")  /* ? */)

p3tsin 05-31-2006 13:26

theres no pev_startmoney :o
maybe its set_cvar_num() that u want?

and i think u should use this instead of get_cvar_num(), though it doesnt give a warning from it..
Code:
get_cvar_float("sv_gravity")

EDIT: ehh, of course not set_cvar_num(), how bout this? :)
Code:
new money = 16000 / get_cvar_num("mp_startmoney") cs_set_user_money(i, money, 1)

tarre 05-31-2006 13:46

thx but,, hmm :S startmoney was just an example, i wont to make mp_footsteps 0 but i getting errors all sv_ commands working but not mp_

p3tsin 05-31-2006 14:29

if u want silent footsteps for all, just use
Code:
set_cvar_num("mp_footsteps", 0)

if only for some of them:
Code:
set_user_footsteps(id, 1) //sets silent footsteps set_user_footsteps(id, 0) //sets footsteps back to normal

tarre 06-01-2006 02:49

thx :)


All times are GMT -4. The time now is 16:26.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.