25.04.2017, 16:42
Something like this:
When leader types for example /allmembers I want to loop through all players in scriptfiles and check is anybody in his faction (if pLeader == 1; check all players that are pMember ==1) and display them like this. Display who is offline and who is online for faction that leader is.
I have Users storage:
So, how to loop through all players (online and offline)?
When leader types for example /allmembers I want to loop through all players in scriptfiles and check is anybody in his faction (if pLeader == 1; check all players that are pMember ==1) and display them like this. Display who is offline and who is online for faction that leader is.
I have Users storage:
PHP код:
#define PATH "Users/%s.ini"
PHP код:
//===============================================================================================================================//
stock UserPath(playerid)
{
new string[128],playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
format(string,sizeof(string),PATH,playername);
return string;
}
//===============================================================================================================================//
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
INI_Int("Leader",PlayerInfo[playerid][pLeader]);
INI_Int("Member",PlayerInfo[playerid][pMember]);
return 1;
}