Hello i remove the Speed a player gets from Boots Of Speed block with this code
PHP Code:
public TaskRemoveBootsOfSpeed(id)
{
id -= TASK_BOOTSOFSPEED;
g_boots_of_speed[id] = 0;
if ( !g_alive[id] ) return PLUGIN_HANDLED;
if ( g_ice[id] )
{
entity_set_float(id, EV_FL_maxspeed, 400.0);
}
else if ( g_honey[id] )
{
static block, property1[5];
block = g_honey[id];
GetProperty(block, 1, property1);
entity_set_float(id, EV_FL_maxspeed, str_to_float(property1));
}
else
{
ResetMaxspeed(id);
}
return PLUGIN_HANDLED;
}
My question is if this is the right and best way.
Thanks