Weapon states
#4


Код:
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;
}
Try this code, then you know when it's called.
Reply


Messages In This Thread
Weapon states - by Packadore - 02.06.2010, 05:41
Re: Weapon states - by RichyB - 02.06.2010, 05:50
Re: Weapon states - by Packadore - 02.06.2010, 06:50
Re: Weapon states - by WackoX - 02.06.2010, 06:55
Re: Weapon states - by WackoX - 02.06.2010, 07:01
Re: Weapon states - by Packadore - 02.06.2010, 08:31
Re: Weapon states - by WackoX - 03.06.2010, 12:54
Re: Weapon states - by IcyBlight - 03.06.2010, 13:32
Re: Weapon states - by Daren_Jacobson - 30.07.2010, 19:31

Forum Jump:


Users browsing this thread: 3 Guest(s)