SA-MP Forums Archive
Not kicking me from the vehicle - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Not kicking me from the vehicle (/showthread.php?tid=135821)



Not kicking me from the vehicle - Torran - 21.03.2010

Hello,

Im trying to make the script kick the player if they enter a taxi,
But it lets me drive them?

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
  if(newstate == PLAYER_STATE_DRIVER) {
    if(GetVehicleModel(playerid) == 420) {
      if(PlayerInfo[playerid][pJob] == 1) {
        SendClientMessage(playerid, COLOR_WHITE, "* Hint: To go on duty type /fare *");
      }
      else {
        RemovePlayerFromVehicle(playerid);
        SendClientMessage(playerid, COLOR_GREY, "* You do not have the keys to this vehicle *");
      }
    }
  }
  return 1;
}



Re: Not kicking me from the vehicle - Fedee! - 21.03.2010

GetVehicleModel uses vehicleid , not playerid


Re: Not kicking me from the vehicle - Torran - 21.03.2010

LOL i forgot about that