Saving vehicles positions
#1

Код:
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.
Reply


Messages In This Thread
Saving vehicles positions - by ivibeserro - 21.06.2016, 16:17
Re: Saving vehicles positions - by ATGOggy - 21.06.2016, 16:21
Re: Saving vehicles positions - by ivibeserro - 21.06.2016, 22:40
Re: Saving vehicles positions - by jlalt - 21.06.2016, 22:42
Re: Saving vehicles positions - by TwinkiDaBoss - 21.06.2016, 23:01
Re: Saving vehicles positions - by ATGOggy - 22.06.2016, 03:31
Re: Saving vehicles positions - by ivibeserro - 22.06.2016, 12:47

Forum Jump:


Users browsing this thread: 3 Guest(s)