02.06.2010, 06:55
Код:
new WeaponState[MAX_PLAYERS]; public OnPlayerUpdate(playerid) { if(GetPlayerWeaponState(playerid) != WeaponState[playerid]) { OnPlayerWeaponStateChange(playerid, WeaponState[playerid], GetPlayerWeaponState(playerid)); WeaponState[playerid] = GetPlayerWeaponState(playerid); } return 1; } OnPlayerWeaponStateChange(playerid, oldstate, newstate) { new string[64]; format(string, sizeof(string), "You changed your weapon state from %d to %d", oldstate, newstate); SendClientMessage(playerid, 0x102030FF, string); return 1; }