Code:
#if !defined Ham_CS_Player_ResetMaxSpeed
const Ham:Ham_CS_Player_ResetMaxSpeed = Ham_Item_PreFrame
#endif
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_CS_Player_ResetMaxSpeed, "player", "OnChangeSpeed", 1)
}
public OnChangeSpeed(id)
{
if( is_user_alive( id ) )
{
if( SuperMan[id] )
{
set_user_maxspeed(id, SUPERMAN_SPEEDS)
client_print(id, print_chat,"Spuer Man")
}
else if( IronMan[id] )
{
set_user_maxspeed(id, IRONMAN_SPEEDS)
client_print(id, print_chat,"Iron Man")
}
else
{
set_user_maxspeed(id, PLAYER_SPEEDS)
client_print(id, print_chat,"player")
}
return PLUGIN_HANDLED
}
return PLUGIN_HANDLED
}
I use this code in your mod, but the player speed does not change
what is the reason?
__________________