Simple question, vehicleid - 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)
+--- Thread: Simple question, vehicleid (
/showthread.php?tid=391118)
Simple question, vehicleid -
MatZZPL - 09.11.2012
Hi everyone, i need to know how to get vehicles id (not model id) without putting player in the car and without using something like GetPlayerVehicleID. There must be an easy way? or function ?
+rep for any useful answers
Re: Simple question, vehicleid -
xMCx - 09.11.2012
/dl inside the game i guess i dont know what you really mean o.-
Re: Simple question, vehicleid -
Plovix - 09.11.2012
/dl,thats a client command,and it works on every server,even if you are offline
Re: Simple question, vehicleid -
MatZZPL - 09.11.2012
I just need to get vehicles id so that when i create a script to delete a vehicle i know the id, and the player doesnt have to enter his vehicle to delete it. pretty much i need to get the vehicles id IN MY SCRIPT without entering the car so that i can create few commands
Re: Simple question, vehicleid -
Virus. - 09.11.2012
If u are using CreateVehicle or AddStaticVehicle then just do it like this
Quote:
new vehid=CreateVehicle(520, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1, 60);
|
Now vehid will have the ID of the vehicle u created. The same thing can be used for AddStaticVehicle. Hope I helped. Feel free to ask questions in case u didnt get it.
Re: Simple question, vehicleid -
doreto - 09.11.2012
Lets say player see car left on middle of road and he /dl to check the vehicle id (no need to enter the vehicle ) then you can destroy/respawn if you wont here a little code
pawn Код:
CMD:destroy(playerid,params[])
{
new vehicleid;
if (sscanf(params, "d",vehicleid)) return SendClientMessage(playerid, -1, "Usage: /destroy [vehicleid]");
DestroyVehicle(vehicleid);
return 1;
}
Re: Simple question, vehicleid -
MatZZPL - 09.11.2012
Thanks doreto, but i meant something like virus said

Thanks virus! +rep mate