Quote:
Originally Posted by JocAnis
Hi, there is option to change entity's value, in this situation it would be 'speed' but problem is that u need it only for specific players/duel. You can try to solve this with pev_groupinfo maybe?
|
What he said works, you can try this if you want, type amx_disable to disable to disable all conveyors, amx_enable to enable them all again, you can use whatever is inside cmdDisable and cmdEnable in your last request code (Disable on start, Enable on finish...)
PHP Code:
#include <amxmodx>
#include <engine>
new bool:Disabled
public plugin_init()
{
register_concmd("amx_disable", "cmdDisable")
register_concmd("amx_enable", "cmdEnable")
}
public cmdDisable()
{
if(Disabled)
return;
Disabled = true;
new ent
while((ent = find_ent_by_class(ent,"func_conveyor")) != 0)
{
entity_set_float(ent, EV_FL_fuser1, entity_get_float(ent, EV_FL_speed))
entity_set_float(ent, EV_FL_speed, 0.0)
}
}
public cmdEnable()
{
if(!Disabled)
{
return;
}
Disabled = false;
new ent
while((ent = find_ent_by_class(ent,"func_conveyor")) != 0)
{
entity_set_float(ent, EV_FL_speed, entity_get_float(ent, EV_FL_fuser1))
}
}