CMD:admins(playerid, params[]) { new online, string[128]; if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command."); if(PlayerInfo[playerid][pAdmin] < 1) SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command!"); foreach(Player, i) { if(PlayerInfo[i][pHelper]) { online ++; } } format(string, sizeof(string), "|_____Philippine Roleplay[0.3z] Admins Team_____|"); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); foreach(Player, i) { if(PlayerInfo[i][pAdmin]) { format(string, sizeof(string), " %s %s ", RPALN(i), RPN(i)); SendClientMessage(playerid, COLOR_DARKRED, string); } } return 1; }
define DIALOG_ADMINS // ON TOP OF SCRIPT CMD:admins(playerid, params[]) { new online, string[128]; if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command."); if(PlayerInfo[playerid][pAdmin] < 1) SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command!"); foreach(Player, i) { if(PlayerInfo[i][pHelper]) { online ++; } } if(PlayerInfo[i][pAdmin]) { format(string, sizeof(string), " %s %s ", RPALN(i), RPN(i)); ShowPlayerDialog(playerid,DIALOG_ADMINS, DIALOG_STYLE_MSGBOX, "|_____Philippine Roleplay[0.3z] Admins Team_____|", "string", "", ""); return 1; }
CMD:admins(playerid, params[])
{
new online, string[128],stringx[128];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(PlayerInfo[playerid][pAdmin] < 1) SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command!");
foreach(Player, i)
{
if(PlayerInfo[i][pHelper])
{
online ++;
}
if(PlayerInfo[i][pAdmin])
{
format(stringx, sizeof(stringx), "|_____Philippine Roleplay[0.3z] Admins Team_____|");
format(string, sizeof(string), " %s %s ", RPALN(i), RPN(i));
ShowPlayerDialog(playerid, DIALOG_WELCOME, DIALOG_STYLE_MSGBOX, stringx, string, "Close", "");
}
}
return 1;
}
CMD:admins(playerid, params[])
{
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(!PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command!");
new string[860], fstr[50], count = 0;
format(string, sizeof(string), "|_____Philippine Roleplay[0.3z] Admin Team_____|{FF0000}\n\n");
foreach(Player, i)
{
if(!PlayerInfo[i][pAdmin]) continue;
count++;
if(count > 15) continue;
format(fstr, sizeof(fstr), " %s %s\n", RPALN(i), RPN(i));
strcat(string, fstr);
}
if(!count) strcat(string, "There are no Administrators online.");
else if(count > 15)
{
format(fstr, sizeof(fstr), "There are %d other Administrators online.", (count - 15));
strcat(string, fstr);
}
ShowPlayerDialog(playerid, 1234, DIALOG_STYLE_MSGBOX, "Philippine Roleplay[0.3z] Admin Team", string, "Okay", "");
//Replace '1234' with your own dialog ID.
return 1;
}
Yes, and all 3 incorrect replies.
pawn Код:
|