SA-MP Forums Archive
Problem with my INI Position saving - 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: Problem with my INI Position saving (/showthread.php?tid=457273)



Problem with my INI Position saving - Jamcraftadam - 10.08.2013

Hello, I am making an RP server, and I am on the verge of making the positions save, they do save, and load, but when under "OnPlayerSpawn" the functions are correctly typed out, but the player doesn't spawn in those positions


Код:
public OnPlayerSpawn(playerid)
{
    if ( PosX[ playerid ] != 0 && PosY[ playerid ] != 0 && PosZ[ playerid ] != 0 && Angle[ playerid ] != 0 )
    {
        SetPlayerPos( playerid, PosX[ playerid ], PosY[ playerid ], PosZ[ playerid ] );
        SetPlayerFacingAngle( playerid, Angle[ playerid ] );
        SetPlayerInterior( playerid, Interior[ playerid ] );
        SetPlayerVirtualWorld( playerid, VirtualWorld[ playerid ] );
        SendClientMessage( playerid, -1, "welcome to your last position" );
    }
	return 1;
}