Saving Positons.
#1

I read a FS kinda Tut on how to save positions, it worked once even when the player disconnects then connects, it realods the stats, can anyone tell me an easier way to do it that this
Reply
#2

pawn Код:
public OnPlayerDisconnect(playerid,reason)
{
    if(//check if the player id logged in here)
    {
        new Float:x, Float:y, Float:z;
        GetPlayerPos(playerid,x,y,z);
        //save your floats using whatever method you're using now
    }
    return 1;
}
public OnPlayerSpawn(playerid)
{
    if(//check if the player has logged in and this is their first time spawning)
    {
        new Float:x, Float:y, Float:z;
        //load the data here
        SetPlayerPos(playerid,x,y,z);
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)