Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
if(GetPlayerVehicleID(playerid) > 3)
{
GetVehiclePos(vehicleid,Float:vx,Float:vy,Float:vz);
GetVehicleZAngle(vehicleid,Float:va);
for(new i = 0; i < sizeof(Vehicle); i++)
{
Vehicle[i][Positionx] = vx;
Vehicle[i][Positiony] = vy;
Vehicle[i][Positionz] = vz;
SaveThings();
}
}
return 1;
}
I'm trying to script that when a person exits from an owned vehicle, its position is saved. Because if I don't do that all vehicles would spawn at the authorised dealership in Grotti, even the bought ones. But, this code has a bug, when I exit from a vehicle, all vehicles will spawn there in the next restar, not just the one that I exited from. Can somebody help to fix it? Please I would really appreciate it.