10.09.2012, 15:28
I've made a command for your Script:
You must use it after you spawn the car and find the place you want to park it
pawn Код:
CMD:vpark( playerid )
{
new Float: Pos[ 4 ], iMsg[148];;
GetVehiclePos(Total_Veh_Created, Pos[0], Pos[1], Pos[2]);
GetVehicleZAngle(Total_Veh_Created, Pos[3]);
vInfo[Total_Veh_Created][vPosX] = Pos[0];
vInfo[Total_Veh_Created][vPosY] = Pos[1];
vInfo[Total_Veh_Created][vPosZ] = Pos[2];
vInfo[Total_Veh_Created][vPosA] = Pos[3];
new
vFile[15];
format(vFile, sizeof(vFile), "%d.ini", Total_Veh_Created);
INI_Open(vFile);
INI_WriteFloat("vPosX", Pos[0]);
INI_WriteFloat("vPosY", Pos[1]);
INI_WriteFloat("vPosZ", Pos[2]);
INI_WriteFloat("vPosA", Pos[3]);
INI_Save();
INI_Close();
format(iMsg, sizeof(iMsg), ""#CYELLOW"Vehicle: "#CBLUE"%i (VID: %i) "#CYELLOW"has been parked.", ivModel, Total_Veh_Created);
SendClientMessage(playerid, -1, iMsg);
return ( 1 )
}