SA-MP Forums Archive
Make cars stay spawned in - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Make cars stay spawned in (/showthread.php?tid=470238)



Make cars stay spawned in - MichaelWharton101 - 16.10.2013

I need help making my player cars stay spawned in when they logout, I have tried this many different ways and no luck, could someone please help me? I am using zGaming script.


Re: Make cars stay spawned in - arakuta - 17.10.2013

Check for something like DestroyVehicle at OnPlayerDisconnect


Re: Make cars stay spawned in - Pottus - 17.10.2013

The cars are dynamic so once a player logs out they automatically destroy it's done purposely otherwise vehicles will keep building up. Now it would be possible to certainly make them stay for a period of time after the player logs out but its going to take a log of re-coding. If you couldn't figure out your approach right away your going to have trouble solving this problem.


Re: Make cars stay spawned in - xganyx - 17.10.2013

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    if(IsPlayerInAnyVehicle(playerid))
    {
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
    }
    return 1;
}