26.05.2016, 15:55
Alright, you need to use ParseFile. Check out this link : https://sampforum.blast.hk/showthread.php?tid=570957
Quick example :
Quick example :
PHP код:
public LoadUser_data(playerid,name[],value[])
{
INI_Int("MDP",PlayerInfo[playerid][pMDP]);
INI_Int("Admin",PlayerInfo[playerid][pAdminlvl]);
INI_Int("Cash",PlayerInfo[playerid][pCash]);
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
INI_Int("Score",PlayerInfo[playerid][pScore]);
SetPlayerScore(playerid, PlayerInfo[playerid][pScore]);
INI_Int("Log",PlayerInfo[playerid][pLog]);
INI_Int("Register",PlayerInfo[playerid][pRegister]);
INI_Int("VIP",PlayerInfo[playerid][pVIP]);
INI_Int("Kill",PlayerInfo[playerid][pKill]);
INI_Int("Death",PlayerInfo[playerid][pDeath]);
INI_Int("Kick",PlayerInfo[playerid][pKick]);
INI_Int("Ban",PlayerInfo[playerid][pBan]);
INI_String("IP",PlayerInfo[playerid][pIP], 16);
INI_String("LastIP",PlayerInfo[playerid][pLastIP], 16);
INI_Int("Banque", PlayerInfo[playerid][pBanque]);
INI_Float("PosX", PlayerInfo[playerid][pX]);
INI_Float("PosY", PlayerInfo[playerid][pY]);
INI_Float("PosZ", PlayerInfo[playerid][pZ]);
return 1;
}
PHP код:
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);