Simple question, vehicleid
#1

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

/dl inside the game i guess i dont know what you really mean o.-
Reply
#3

/dl,thats a client command,and it works on every server,even if you are offline
Reply
#4

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

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.
Reply
#6

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;
}
Reply
#7

Thanks doreto, but i meant something like virus said Thanks virus! +rep mate
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)