SA-MP Forums Archive
Cars for Special players - 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: Cars for Special players (/showthread.php?tid=154402)



Cars for Special players - Ihsan_Cingisiz - 13.06.2010

Hello, how can i do that the car with the id 416 only for medics is?
Who can make a little script, i forgot it..


Re: Cars for Special players - DJDhan - 13.06.2010

If you forgot it, you can refresh your memory Here.


Re: Cars for Special players - Ihsan_Cingisiz - 13.06.2010

Quote:
Originally Posted by DJDhan
If you forgot it, you can refresh your memory Here.
Thats not what i mean, i mean that .. something like
if(IsVehicleID == 461) {
if(MedicTeam == 1) {
SendClientMEssage(player,sdflkds; "ok your cna drive this ")l
}
else
removeplayerfromvehicle

something like that


Re: Cars for Special players - DJDhan - 13.06.2010

That is just another way of doing it.

Код:
OnPlayerEnterVehicle(playerid,vehicleid,ispassenger)
{
  new model;
  model=GetVehicleModel(vehicleid);
  if(model==461)
  {
    if(MedicTeam==0)
    {
      RemovePlayerFromVehicle(playerid);
      return SendClientMessage(playerid,0xff0000aa,"This vehicle is for Medics only.");
    }
  }
  return 1;
}