help with vehicles
#1

i am trying to do a save car position
and then it will go to a file but didnt succes,
here is the code that i maked but it
code :
the /savevehicle savethe file on the folder
but the command /getvehicle didnot get the cars
anyone can help me please
PHP код:
if(!strcmp(cmd"/savevehicle"true))
{
    new 
Float:pos[4], ModelVehiclePath[50], PlayerVehicleID;
    
PlayerVehicleID GetPlayerVehicleID(playerid);
    
format(VehiclePath50"vehicless/%d.ini"PlayerVehicleID);
    
Model GetVehicleModel(PlayerVehicleID);
    
GetVehiclePos(PlayerVehicleIDpos[0], pos[1], pos[2]); 
    
GetVehicleZAngle(PlayerVehicleIDpos[3]);
    
dini_Create(VehiclePath);й
    dini_IntSet
(VehiclePath"Model"Model);
    
dini_FloatSet(VehiclePath"X"pos[0]); 
    
dini_FloatSet(VehiclePath"Y"pos[1]); 
    
dini_FloatSet(VehiclePath"Z"pos[2]);
    
dini_FloatSet(VehiclePath"A"pos[3]);
    return 
1;
}
if(!
strcmp(cmd"/getvehicle"true))
{
    new 
VehicleToGet[256], VehiclePath[50], Float:pos[4], Model;
    
format(VehiclePath50"vehicless/%d.ini"strval(VehicleToGet));
    
Model dini_Int(VehiclePath"Model"); 
    
pos[0] = dini_Float(VehiclePath"X"); 
    
pos[1] = dini_Float(VehiclePath"Y"); 
    
pos[2] = dini_Float(VehiclePath"Z"); 
    
pos[3] = dini_Float(VehiclePath"A"); 
    
CreateVehicle(Modelpos[0], pos[1], pos[2], pos[3], 000);
    return 
1;

Reply


Messages In This Thread
help with vehicles - by undeteker - 06.11.2015, 19:38
Re : help with vehicles - by StreetRP - 06.11.2015, 20:00
Re: help with vehicles - by undeteker - 06.11.2015, 20:15
Re: help with vehicles - by [ABK]Antonio - 06.11.2015, 20:43
Re: help with vehicles - by undeteker - 07.11.2015, 07:05
Re: help with vehicles - by Mencent - 07.11.2015, 08:11

Forum Jump:


Users browsing this thread: 2 Guest(s)