SA-MP Forums Archive
Vehicle Id ? - 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: Vehicle Id ? (/showthread.php?tid=80589)



Vehicle Id ? - Blt950 - 05.06.2009

Hey, I know its vehicle models, that we use to spawn vehicles. But vehicles also have a ID ingame, thats not changing. That is useful to have when you want to lock some vehicles of that modelid. Does somone have a command that can get the current ID of car Im in?


Re: Vehicle Id ? - MenaceX^ - 05.06.2009

Sorry for the dobule posting - Did refresh you can also remove this message. (Mode)


Re: Vehicle Id ? - MenaceX^ - 05.06.2009

pawn Код:
if(strcmp(cmd,"/mycar",true))
{
  if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,color,"You msut be inside a vehicle.");
  format(string,sizeof(string),"%d",GetPlayerVehicleID(playerid));
  SendClientMessage(playerid,color,string);
  return 1;
}



Re: Vehicle Id ? - Blt950 - 05.06.2009

Quote:
Originally Posted by MenaceX^
pawn Код:
if(strcmp(cmd,"/mycar",true))
{
  if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,color,"You msut be inside a vehicle.");
  format(string,sizeof(string),"%d",GetPlayerVehicleID(playerid));
  SendClientMessage(playerid,color,string);
  return 1;
}
Thanks, I try it out