car id problem. plz help
#1

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>
Reply
#2

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
Reply
#3

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

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 ^^
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)