SA-MP Forums Archive
Is it possible... - 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: Is it possible... (/showthread.php?tid=136658)



Is it possible... - RawrTheory - 26.03.2010

For a specific vehicle, too only allow passengers, not drivers.


Re: Is it possible... - TheChaoz - 26.03.2010

yes,
u can do something like this:
pawn Код:
new MYCAR;

public OnPlayerStateChange(playerid, newstate, oldstate)
{
  if(newstate == PLAYER_STATE_DRIVER){
    new pVeh = GetPlayerVehicleID(playerid);
    if(pVeh == MYCAR){
      RemovePlayerFromVehicle(playerid);
      SendClientMessage(playerid,0xFF0000AA,"You can't drive this car");
    }
  }
  return 1;
}

public OnGameModeInit()
{
  MYCAR = AddStaticVehicle(...);
  return 1;
}
or you can use GetPlayerVehicleSeat


Re: Is it possible... - RawrTheory - 26.03.2010

Thank you. Works