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



vehicleid - ratxrat - 30.05.2016

hai all.

i create vehicle like this
PHP код:
new veh[4];
veh[0] = CreateVehicle(554682.4860, -1829.80536.14060.0000, -1, -1100);
veh[1] = CreateVehicle(554677.4055, -1830.29246.14060.0000, -1, -1100);
veh[2] = CreateVehicle(554682.3478, -1837.07676.14060.0000, -1, -1100);
veh[3] = CreateVehicle(554687.4049, -1829.75656.14060.0000, -1, -1100); 
I want get vehicle id just for veh[] . im use id for GetVehiclePos then IsPlayerRangeOfPoint x y z from veh[] .
PHP код:
new Float:Float:,Float:z;
GetVehiclePos(/*i want get vehicleid just for veh[]*/xyz);
if(
IsPlayerRangeOfPoint(playerid,5.0,x,y,z))
{
//here im create attachobjectto vehicle for near veh[]

Any one can help me?


Re: vehicleid - BornHuman - 30.05.2016

Well what vehicle are you trying to get the ID of?


Re: vehicleid - ratxrat - 30.05.2016

Quote:
Originally Posted by BornHuman
Посмотреть сообщение
Well what vehicle are you trying to get the ID of?
vehicle model: 554

but im just want getvehicleid for veh[] , maybe can im set vehicle id?


Re: vehicleid - luke49 - 30.05.2016

veh[0] is an ID of CreateVehicle(554, 682.4860, -1829.8053, 6.1406, 0.0000, -1, -1, 100); , so:
PHP код:
GetVehiclePos(veh[0], xyz); //you can get other vehicle's pos, such as veh[1], veh[2] and etc. 



Re: vehicleid - ratxrat - 30.05.2016

thanks dude