need cmd check leader offline - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: need cmd check leader offline (
/showthread.php?tid=625458)
need cmd check leader offline -
DandyCorleone - 02.01.2017
hi guys.. i need cmd for check all leader factions. not only leaders online, but i just have cmd for checking leader factions online..
can help me?
note : sorry i bad english
PHP код:
CMD:leaders(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 3 || PlayerInfo[playerid][pFactionModerator] == 1) {
SendClientMessageEx(playerid, COLOR_WHITE, "Faction leaders online:");
new string[128], sz_FacInfo[3][64];
foreach(Player, i) if(PlayerInfo[i][pLeader] >= 1) {
GetPlayerFactionInfo(i, sz_FacInfo[0], sz_FacInfo[1], sz_FacInfo[2]);
format(string, sizeof(string), "(%s) %s %s", sz_FacInfo[2], sz_FacInfo[0], GetPlayerNameEx(i));
SendClientMessageEx(playerid, COLOR_GRAD2, string);
}
}
return 1;
}
Re: need cmd check leader offline -
saffierr - 02.01.2017
Loop through your database and check all the current leaders.