Raised This Month: $ Target: $400
 0% 

not


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 08-08-2010 , 09:44   Re: Set_user_maxspeed HELP
Reply With Quote #4

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>

new bool:has_speed[33]

public 
plugin_init() {
    
register_event("CurWeapon""event_curweapon""be""1=1")
    
register_clcmd("say /buyspeed""cmdBuySpeed")
}

public 
event_curweapon(id)
{
    if(
has_speed[id] == true)
    {
        
set_user_maxspeed(id290.0)
    }
}

public 
cmdBuySpeed(id)
{
    if(!
has_speed[id])
    {
        
set_user_maxspeed(id290.0)
        
client_print(idprint_chat"You brought Speed!")
        
        
set_task(10.0"cmdRemoveSpeed"id)
    }
    else
    {
        
client_print(idprint_chat"You already brought Speed!")
    }
}

public 
cmdRemoveSpeed(id)
{
    
set_user_maxspeed(id240.0// Set normal speed after 10 Seconds

Try to understand its rly easy.

The CurWeapon event each time calls when the player shots or switch between weapons.
__________________
Quote:
#define true ((rand() % 2)? true: false) //Happy debugging suckers
mottzi is offline
Send a message via MSN to mottzi
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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