In some cases player speed resets, like when player uses scope, I want to set speed again when player cancels scope, also, I have noticed that speed resets in other cases too (not sure exactly in which case).
To sum up, I want to set my speed when scope is canceled, also if you tell me other case, in which speed resets and how to fix that too, that would be really nice
PHP Code:
new gCurrentWeapon[33]
new speed[33]
public plugin_init()
{
register_event( "CurWeapon" , "fw_EvCurWeapon" , "be" , "1=1" )
}
public client_putinserver(id)
{
speed[id] = 1.5
engfunc(EngFunc_SetClientMaxspeed, id, 250.0*speed[id])
}
public fw_EvCurWeapon(id)
{
new weaponid = read_data(2)
if(gCurrentWeapon[id] != weaponid) {
gCurrentWeapon[id] = weaponid
engfunc(EngFunc_SetClientMaxspeed, id, 250.0*speed[id])
}
return PLUGIN_HANDLED
}
__________________