06.11.2012, 23:46
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]
I have 4 enum values that i would like to load aswell
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 anybody knows how to do this i would really appreciate it.
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]);
Код:
PlayerInfo[playerid][pGroup] PlayerInfo[playerid][pFaction] PlayerInfo[playerid][pJob] PlayerInfo[playerid][pAdminLevel]
Код:
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;