Two questions..
#3

You can't detect when a player gets shot, (well not easily or accurately) there are some functions out there.


You can make a system to detect when a player fires a weapon(again not accurately);
The problem is people can tap their fire button, not actually firing any bullets.

pawn Код:
public OnPlayerUpdate(playerid)
{
  new keys, ud, lr, wpnid = GetPlayerWeapon(playerid);
  GetPlayerKeys(playerid, keys, ud, lr);
  //player on foot, pressing fire, holding a "firing" weapon
  if( GetPlayerState == PLAYER_STATE_ONFOOT && keys & KEY_FIRE && wpnid > 22 && wpnid < 38)
  {
     //player has fired weapon or is about to
  }
}
Reply


Messages In This Thread
Two questions.. - by IVuljak - 04.02.2010, 13:44
Re: Two questions.. - by ettans - 04.02.2010, 13:48
Re: Two questions.. - by mansonh - 04.02.2010, 14:46

Forum Jump:


Users browsing this thread: 1 Guest(s)