Save pos problem.
#5

Quote:
Originally Posted by tuuker
Посмотреть сообщение
If i spawn in game for first time then i will fall to the 0 cordinade but save pos are working fine. I just need to know how can i make that if player spawns first time then he spawn pos will be something els (example "2087.1606,1683.9849,10.8203") and after playing and disconnecting he will be able to spawn place where he left before.

I tryed to make new enum that after player disconnects it will set pFirstTime = 1; and saves it, after player reconnects and spawns it will check if pFirstTime == 1; to set saved pos but that didnt work :S it gave error...

EDIT:
Nvm got it work, i made this:
pawn Код:
if(gPlayerLogged[playerid] == 1)
    {
        if(file, "FirstTime", PlayerInfo[playerid][pFirstTime] == 1)
        {
            x = dini_Float(file, "posX");
            y = dini_Float(file, "posY");
            z = dini_Float(file, "posZ");
            SetPlayerPos(playerid, x, y, z);
        }
    }
But now when i reconnect it continues with CJ skin :S
Then just do the same thing for the skin? Save it in OnPlayerDisconnect using GetPlayerSkin and dini_IntSet, then when the player spawns set his skin using SetPlayerSkin and dini_Int to get the ID of the skin you stored.

Also I'm not sure what you're trying to achieve with that if statement. It doesn't make sense.
Reply


Messages In This Thread
Save pos problem. - by tuuker - 03.03.2011, 14:32
Re: Save pos problem. - by Sasino97 - 03.03.2011, 14:46
Re: Save pos problem. - by tuuker - 03.03.2011, 14:50
Re: Save pos problem. - by Sasino97 - 03.03.2011, 14:51
Re: Save pos problem. - by JaTochNietDan - 03.03.2011, 14:57
Re: Save pos problem. - by tuuker - 03.03.2011, 15:03
Re: Save pos problem. - by JaTochNietDan - 03.03.2011, 15:05
Re: Save pos problem. - by tuuker - 03.03.2011, 15:11
Re: Save pos problem. - by JaTochNietDan - 03.03.2011, 15:18
Re: Save pos problem. - by tuuker - 03.03.2011, 15:23

Forum Jump:


Users browsing this thread: 1 Guest(s)