AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Item duration (https://forums.alliedmods.net/showthread.php?t=153760)

rodrigo286 03-28-2011 17:30

Item duration
 
How to stay the effect of speed on all round and only leave when the player go to another team ...

PHP Code:

case 0:
{
if( 
HasSpeedid ] )
{
allready_haveid );
return 
PLUGIN_HANDLED;
}
if( 
whichmoney get_pcvar_numgSpeedCost ) )
{
dont_haveid );
return 
PLUGIN_HANDLED;
}
fm_set_user_maxspeedidget_pcvar_floatgSpeedCvar ) );
client_printidprint_chat"%L"id"DRSHOP_SPEED_ITEM" );
fm_set_user_moneyidwhichmoney get_pcvar_numgSpeedCost ) );
client_sound_playid );
HasSpeedid ] = true;


Regards.

rodrigo286 03-29-2011 13:25

Re: Item duration
 
I want that the effect duration in all rounds.

Please help me!

Thanks 4 all!

madeitout 03-29-2011 15:20

Re: Item duration
 
speed is reset when the user switches weapons, add this so the speed is set after the weapon switch
PHP Code:

public plugin_init()
{
    
register_event("CurWeapon""event_curweapon","be");
}

public 
event_curweapon(id)
{
    if (
HasSpeedid ])
        
fm_set_user_maxspeedidget_pcvar_floatgSpeedCvar ) ); 




All times are GMT -4. The time now is 14:40.

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