start coordinates vehicle
#1

Hi! If i not save coordinates of spawn vehicle, what i can get this coordinates in others public of vehicle? Example: AddStaticVehicleEx(522,-1669.5000000,-649.4520264,13.8330002,0.0000000,132,4,15);
How can i get -1669.5000000,-649.4520264,13.8330002 (it's start coordinates of vehicle this vehicleid)
Reply
#2

you must save it's variable when you create this vehicle.
for example, write a script with auto-saving this variables.
example:
at the top of the code
PHP код:
new Float:VPos[MAX_VEHICLES][3]; 
PHP код:
stock AddStaticVehicleExtra(model,Float:X,Float:Y,Float:Z,Float:Angle,color1,color2,respawntime,siren=0)
{
    new 
createdcar AddStaticVehicleEx(model,X,Y,Z,Angle,color1,color2,respawntime,siren);
    
VPos[createdcar][0] = XVPos[createdcar][1] = YVPos[createdcar][2] = Z;
    return 
1;

so now you can use VPos[vehicleid][0-2] as the vehicle's spawn coordinates.
Reply
#3

Quote:
Originally Posted by Mugala
Посмотреть сообщение
you must save it's variable when you create this vehicle.
for example, write a script with auto-saving this variables.
example:
at the top of the code
PHP код:
new Float:VPos[MAX_VEHICLES][3]; 
PHP код:
stock AddStaticVehicleExtra(model,Float:X,Float:Y,Float:Z,Float:Angle,color1,color2,respawntime,siren=0)
{
    new 
createdcar AddStaticVehicleEx(model,X,Y,Z,Angle,color1,color2,respawntime,siren);
    
VPos[createdcar][0] = XVPos[createdcar][1] = YVPos[createdcar][2] = Z;
    return 
1;

so now you can use VPos[vehicleid][0-2] as the vehicle's spawn coordinates.
Niiiice! Thx
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)