AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Resetting Speed (https://forums.alliedmods.net/showthread.php?t=54297)

mateo10 04-22-2007 05:41

Resetting Speed
 
How do you reset a user's speed to the one he starts with?

Samurai [/] 04-22-2007 05:56

Re: Resetting Speed
 
Quote:

Originally Posted by mateo10 (Post 468233)
How do you reset a user's speed to the one he starts with?

I dont know but defaults speeds are:
Code:

cl_forwardspeed 400
cl_backspeed 400
cl_sidespeed 400

So if u set speeds to 400 that might work.

regalis 04-22-2007 07:20

Re: Resetting Speed
 
Thats right samurai[/] this setting should be done with:
client_cmd(id, "cl_forwardspeed %d ; cl_sidespeed %d ; cl_backspeed %d", 400, 400, 400)
Then you have to: set_user_maxspeed(id, 250) <--- 250 is the default speed for running with a knife or pistol. (if he switches his weapon to a rifle the engine automaticaly changes his speed according to the weapon he holds.

Btw.: for further information on this simply look at my speedUP plugin here: http://forums.alliedmods.net/showthread.php?t=53603

greetz regalis

pRED* 04-22-2007 18:37

Re: Resetting Speed
 
From bf2 rank.. (which was mostly taken from wc3ft)

Code:
new dummy; new weapon = get_user_weapon( id,dummy,dummy); new zoom=cs_get_user_zoom(id); if (cs_get_user_vip(id)) { set_pev(id, pev_maxspeed, CS_SPEED_VIP); } else if ((zoom==2) || (zoom==3) || (zoom==4)) {     set_pev(id, pev_maxspeed, CS_WEAPON_SPEED_ZOOM[weapon]); } else {     set_pev(id, pev_maxspeed, CS_WEAPON_SPEED[weapon]); }


Code:
stock Float:CS_SPEED_VIP = 227.0; stock Float:CS_WEAPON_SPEED[31] = {     0.0,     250.0,      // CSW_P228     0.0,     260.0,      // CSW_SCOUT     250.0,      // CSW_HEGRENADE     240.0,      // CSW_XM1014     250.0,      // CSW_C4     250.0,      // CSW_MAC10     240.0,      // CSW_AUG     250.0,      // CSW_SMOKEGRENADE     250.0,      // CSW_ELITE     250.0,      // CSW_FIVESEVEN     250.0,      // CSW_UMP45     210.0,      // CSW_SG550     240.0,      // CSW_GALI     240.0,      // CSW_FAMAS     250.0,      // CSW_USP     250.0,      // CSW_GLOCK18     210.0,      // CSW_AWP     250.0,      // CSW_MP5NAVY     220.0,      // CSW_M249     230.0,      // CSW_M3     230.0,      // CSW_M4A1     250.0,      // CSW_TMP     210.0,      // CSW_G3SG1     250.0,      // CSW_FLASHBANG     250.0,      // CSW_DEAGLE     235.0,      // CSW_SG552     221.0,      // CSW_AK47     250.0,      // CSW_KNIFE     245.0       // CSW_P90 }; stock Float:CS_WEAPON_SPEED_ZOOM[31] = {     0.0,     0.0,     0.0,     220.0,      // CSW_SCOUT     0.0,     0.0,     0.0,     0.0,     240.0,      // CSW_AUG     0.0,     0.0,     0.0,     0.0,     150.0,      // CSW_SG550     0.0,     0.0,     0.0,     0.0,     150.0,      // CSW_AWP     0.0,     0.0,     0.0,     0.0,     0.0,     150.0,      // CSW_G3SG1     0.0,     0.0,     235.0,      // CSW_SG552     0.0,     0.0,     0.0 };


All times are GMT -4. The time now is 06:44.

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