25.11.2011, 13:34
Hey guys well I need some assistance, I know how to loop through on players... but how do I loop through offline players? Reason why is for example if I wanted to set a leader of an org but there was already someone leading it... it would make 2 leaders for the 1 org which isn't what I want... so how would I loop through ALL players including the ones offline and check there files to see if anyone leads it? Would this work??
Or something like that, thanks so much in advanced.
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
new CheckforLeader[128];
format(CheckforLeader, sizeof(CheckforLeader), "DirectoryPath/Directory/%i.ini", i);
if(PlayerInfo[i][Leader] == 1)
{
SendClientMessage(playerid, COLOR, "There is already a leader for this organization");
return 1;
}
}