Quote:
Originally Posted by BeNq!
Hi,
How do, using set_user_maxspeed / fm_set_user_maxspeed speed for buy 10 seconds and when you change weapons do not lose speed?
Sorry... My bad english. I'm from polish ...
-----------
[PL]
Witam,
Jak zrobic, przy uzyciu set_user_maxspeed / fm_set_user_maxspeed kupic to na 10 sekund szybkosc oraz przy zmianie broni nie traci sie predkosci?
|
When they buy something - set_task( 10.0, "eventcalled" )
For the speed:
PHP Code:
#include <amxmodx>
#include <fun>
new bool:BoughtSpeed[33]; //make this bool true when they buy the speed
public plugin_init()
{
register_event("CurWeapon", "event_curweapon", "be", "1=1")
}
public event_curweapon(id)
{
if( !is_user_alive(id) )
{
return PLUGIN_HANDLED;
}
if( BoughtSpeed[id] )
{
set_user_maxspeed( id, speedyouwant )
}
return PLUGIN_HANDLED;
}
change "speedyouwant" to the speed you want obviously.
I could be wrong though.
__________________