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(554, 682.4860, -1829.8053, 6.1406, 0.0000, -1, -1, 100);
veh[1] = CreateVehicle(554, 677.4055, -1830.2924, 6.1406, 0.0000, -1, -1, 100);
veh[2] = CreateVehicle(554, 682.3478, -1837.0767, 6.1406, 0.0000, -1, -1, 100);
veh[3] = CreateVehicle(554, 687.4049, -1829.7565, 6.1406, 0.0000, -1, -1, 100);
I want get vehicle id just for veh[] . im use id for GetVehiclePos then IsPlayerRangeOfPoint x y z from veh[] .
PHP код:
new Float:x , Float:y ,Float:z;
GetVehiclePos(/*i want get vehicleid just for veh[]*/, x, y, z);
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], x, y, z); //you can get other vehicle's pos, such as veh[1], veh[2] and etc.
Re: vehicleid -
ratxrat - 30.05.2016
thanks dude