SA-MP Forums Archive
car id problem. plz help - 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: car id problem. plz help (/showthread.php?tid=151326)



car id problem. plz help - KDlivest954 - 30.05.2010

I have GetPlayerVehicleID(playerid);

i have a DrugRunner mini mission thing that you can only use with a Boxville(id:49, so i put:

Код:
if(GetPlayerVehicleID(playerid) == 498)
	 	{
		
                   ...........................               
               }
but the problem is when i use /carid(a command i made to get the id of any car ur in) for a boxville it comes back with like 715 and 716... now im thinkin it gets id of the car based on the rest cars, like "this is the 715th car in the script"

my script for /carid is:

Код:
dcmd_carid(playerid,params[])
{
 	new string[256];
 	new pCar;
	pCar = GetPlayerVehicleID(playerid);
	format(string,sizeof(string),"Your car's id is %i",pCar);
	SendClientMessage(playerid,COLOR_AQUA,string);
	return 1;
}
any help or if im not clear, let me know cuz i really wana get this mini mission finished thanks I.A>


Re: car id problem. plz help - coole210 - 30.05.2010

GetPlayerVehicleID is the ID of the vehicle spawn..

Example: First car created is ID 1, then 2 etc.

To get the model of the car use:

Код:
GetVehicleModel
https://sampwiki.blast.hk/wiki/GetVehicleModel


Re: car id problem. plz help - KDlivest954 - 30.05.2010

thnx, just figured dat out before yu replied XD thnx tho.


Re: car id problem. plz help - Babul - 30.05.2010

to get the in-game vehicle id, you also can type /DL into chat. theres a topic somewhere here where some commands are being collected, iam too lazy to search it now ^^