vehicleid
#1

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

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

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?
Reply
#4

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

thanks dude
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)