CarJacking
#4

Quote:
Originally Posted by Sandiel
Посмотреть сообщение
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
          if(IsPlayerInVehicle(i, GetPlayerVehicleModel(GetPlayerVehicleID(playerid))) && playerid != i)
          {
                new iState = GetPlayerState(i);
                if(iState == PLAYER_STATE_DRIVER)
                {
                      // Do what's necessary to the carjacker (playerid) here.
                }
          }
    }
    return 1;
}
Not the most efficient way I can think of right now, but it is infact way better than the one you're currently using, hope this helps. (Compile error and in game errors may be presented, I haven't made this on pawn nor have I tested it, but should work fine.)
I don't want it in OnPlayerEnterVehicle as the player car jacking can "cancel" getting into the vehicle.. which I don't want.

Quote:
Originally Posted by Blackazur
Посмотреть сообщение
That's to lock the car, not detect if it's being jacked.
Reply


Messages In This Thread
CarJacking - by thefatshizms - 15.06.2013, 22:45
Re: CarJacking - by Sandiel - 15.06.2013, 23:35
AW: CarJacking - by Blackazur - 15.06.2013, 23:37
Re: AW: CarJacking - by thefatshizms - 15.06.2013, 23:57
Re: AW: CarJacking - by Kyle - 16.06.2013, 00:00

Forum Jump:


Users browsing this thread: 1 Guest(s)