Saving team
#1

Ok so,i started scripting the team saving for my gamemode and i have a problem.

I use the pTeam variable to save it,like:

pawn Код:
INI_WriteInt(File,"Team",PlayerInfo[playerid][pTeam]);
The question now is:

How i save the team?What i should add to the OnPlayerRequestClass callback?

And after i save it,how i make the player spawn automatically after he login?This is the login part:

pawn Код:
case DIALOG_LOGIN:
        {
            if (!response) return Kick(playerid);
            if( response )
            {
                if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
                {
                    INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
                    GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
                    SetPlayerScore(playerid, PlayerInfo[playerid][pKills]);
                    ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,"{008000}Success!","{FFFF00}You have successfully logged in!","Ok","");
                    Rules(playerid);
                }
                else
                {
                   ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Login","{FF0000}You have entered an incorrect password.\n""Type your password below to login.","Login","Quit");
                }
                return 1;
            }
        }
    }
Reply


Messages In This Thread
Saving team - by Face9000 - 02.10.2012, 22:51
Re: Saving team - by Passout - 03.10.2012, 02:57
Re: Saving team - by SwisherSweet - 03.10.2012, 03:00
Re: Saving team - by Glint - 03.10.2012, 03:53
Re: Saving team - by Face9000 - 03.10.2012, 07:10

Forum Jump:


Users browsing this thread: 1 Guest(s)