13.01.2014, 13:29
The server is saving the player details using dini in .ini files which are located directly in the folder 'scriptfiles'. (the code is located in the gamemode.)
Now I would like to create a filterscript where it gets the player's adminrank. I don't know how to do this.
I think it should be like this, but it does not work.
Now I would like to create a filterscript where it gets the player's adminrank. I don't know how to do this.
I think it should be like this, but it does not work.
Код:
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; }