SA-MP Forums Archive
Need help with Car Jack [REP +] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Need help with Car Jack [REP +] (/showthread.php?tid=430889)



Need help with Car Jack [REP +] - z3r0w1zard - 15.04.2013

For player cant stole team Car.


Re: Need help with Car Jack [REP +] - DaTa[X] - 15.04.2013

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{

   for(new i =0,i<MAX_PLAYERS; i++)
     {
        if (ispassenger) return 1;
        if(IsPlayerInVehicle(i,vehicleid) && GetPlayerState(i) == PLAYER_STATE_DRIVER && GetPlayerTeam(i) ==  GetPlayerTeam(playerid)) {
            new Float:X,Float:Y,Float:Z;
            GetPlayerPos(playerid,X,Y,Z);
            SendClientMessage(playerid, -1, "Team jack is not allowed");
            SetPlayerPos(playerid,X,Y,Z+1);
          }
      }
  return 1;
}



Re: Need help with Car Jack [REP +] - z3r0w1zard - 15.04.2013

ty