AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Weapon speed (https://forums.alliedmods.net/showthread.php?t=128352)

reinert 05-31-2010 07:28

Weapon speed
 
Hey, I'm making a plugin that every round gives various classes to players randomly. so I've got a Sniper class, and I want to make that if Player gets Sniper class he would be slower.
Here is my plugin right now, I havn't tested it yet, but I'm sure -speed would work only until you change your weapon.
PHP Code:

    if(PlayerMode[id] == Sniper)
    {
    new 
Float:speed get_user_maxspeed(id) - 30.0;
    
set_user_maxspeed(id speed);
    
give_item(id"weapon_awp");
    
give_item(id,"ammo_338magnum");
    
give_item(id,"ammo_338magnum");
    
give_item(id,"ammo_338magnum");
    } 


drekes 05-31-2010 08:01

Re: Weapon speed
 
Hook Event_CurWeapon and check it there to

reinert 05-31-2010 10:28

Re: Weapon speed
 
Thanks ! hope it works!


All times are GMT -4. The time now is 05:21.

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