How To Load Enums
#1

Hello,
I am having trouble loading some of the information for my server. I can load the players health, armour, and money because they have a default code that sets the value [below]

Код:
GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
SetPlayerArmour(playerid, PlayerInfo[playerid][pArmour]);
I have 4 enum values that i would like to load aswell
Код:
PlayerInfo[playerid][pGroup]
PlayerInfo[playerid][pFaction]
PlayerInfo[playerid][pJob]
PlayerInfo[playerid][pAdminLevel]
The problem im having is loading the values that have been saved for each of these when the user logs in. Here is a section of my login script.

Код:
            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]);
                    SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
                    SetPlayerArmour(playerid, PlayerInfo[playerid][pArmour]);
                    //I WOULD LIKE TO LOAD THE ENUM VALUES HERE
                    SpawnPlayer(playerid);
                }
                else
                {
                    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_RED"You have entered an incorrect password.\n"COL_WHITE"Type your password below to login.","Login","Quit");
                }
                return 1;
If anybody knows how to do this i would really appreciate it.
Reply


Messages In This Thread
How To Load Enums - by stuoyto - 06.11.2012, 23:46
Re: How To Load Enums - by willsuckformoney - 06.11.2012, 23:56
Re: How To Load Enums - by Steven82 - 07.11.2012, 00:08

Forum Jump:


Users browsing this thread: 2 Guest(s)