[HELP] anti steal vehicle
#1

Hello is there a way to make a code that will do if someone player try to steal car from another player then it says to player who try to steal car send a some message to him like you can's steal other people vehicle if you know what I mean? Thanks
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=278082


There is a search bro.
Reply
#3

You can use the OnPlayerEnterVehicle / StateChange callback.

Example:
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
     if(!ispassenger && DoesVehicleHaveDriver(vehicleid))
     {
          g_iDriver[vehicleid] = GetVehicleDriver(vehicleid);
          RemovePlayerFromVehicle(playerid);
          ClearAnimations(playerid);
          new Float: pos[3];
          GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
          SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
          PutPlayerInVehicle(g_iDriver[vehicleid], vehicleid, 0);
          return 1;
    }
    return true;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)