Anti-Jack is killing passengers too ;(
#1

Ok so heres the code, My problem is that its continually killing the passenger, I haven't yet figured out how to fix this:

Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
  for(new i = 0; i < GetMaxPlayers(); i++)
  {
    if (IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) == PLAYER_STATE_DRIVER)
    {
            SetPlayerHealth(playerid, 0);
			new pName[MAX_PLAYER_NAME],string[128];
			GetPlayerName(playerid, pName, sizeof(pName));
			format(string, sizeof(string), "[Anti-Jack]: %s has just been killed for car jacking (n00b!).", pName);
			SendClientMessageToAll(red, string);
            SendClientMessage(playerid,red,"Error: Car jacking is not allowed!.");
    }
  }
  return 1;
}
How could i fix it so it doesn't kill the passengers entering?
Reply


Messages In This Thread
Anti-Jack is killing passengers too ;( - by Christopher. - 09.01.2010, 19:12
Re: Anti-Jack is killing passengers too ;( - by Christopher. - 09.01.2010, 19:15
Re: Anti-Jack is killing passengers too ;( - by Christopher. - 09.01.2010, 19:25
Re: Anti-Jack is killing passengers too ;( - by [SF]RobMob - 10.01.2010, 23:51
Re: Anti-Jack is killing passengers too ;( - by Miguel - 11.01.2010, 01:17
Re: Anti-Jack is killing passengers too ;( - by [SF]RobMob - 26.01.2010, 20:11
Anti-Jack error - by OmarEco - 21.06.2010, 10:44

Forum Jump:


Users browsing this thread: 1 Guest(s)