12.01.2014, 21:13
Is there a way to do it like this?
The user file is directly located in the folder 'scriptfiles'.
I would like to read the player's AdminLevel variable from the USER_NAME.ini file. Is this possible?
Код:
public OnPlayerConnect(playerid) { new Name[MAX_PLAYER_NAME]; GetPlayerName(playerid, Name, sizeof(Name)); new file[128]; format(file,sizeof(file),"%s.ini", Name); if(dini_Exists(file)) { PlayerInfo[playerid][pAdmin] = dini_Int(file,"AdminLevel"); } return 1; }
I would like to read the player's AdminLevel variable from the USER_NAME.ini file. Is this possible?