Bugged admin cmd - 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: Bugged admin cmd (
/showthread.php?tid=498665)
Bugged admin cmd -
TheKevo - 04.03.2014
please fix the following and create it that it senses us admins even when we're off duty.
Код:
COMMAND:admins(playerid, params[])
{
new string[1000];
foreach(Player, i) {
if(IsOnDuty[i])
{
if(P_Data[i][pAdmin] == 1) { format(string,sizeof(string),""COL_BLUE"Admin %s (%d) - Level 1 (Moderator)",GetName(i), i); }
else if(P_Data[i][pAdmin] == 2) { format(string,sizeof(string),""COL_BLUE"Admin %s (%d) - Level 2 (Junior Admin)",GetName(i), i); }
else if(P_Data[i][pAdmin] == 3) { format(string,sizeof(string),""COL_BLUE"Admin %s (%d) - Level 3 (Senior Admin)",GetName(i), i); }
else if(P_Data[i][pAdmin] == 4) { format(string,sizeof(string),""COL_BLUE"Admin %s (%d) - Level 4 (Lead Admin)",GetName(i), i); }
else if(P_Data[i][pAdmin] == 5) { format(string,sizeof(string),""COL_BLUE"Admin %s (%d) - Level 5 (Manager Admin)",GetName(i), i); }
else if(P_Data[i][pAdmin] == 6) { format(string,sizeof(string),""COL_BLUE"Admin %s (%d) - Level 6 (Global Admin)",GetName(i), i); }
else if(P_Data[i][pAdmin] == 7) { format(string,sizeof(string),""COL_BLUE"Admin %s (%d) - Level 7 (Server Owner)",GetName(i), i); }
else return SCM(playerid,-1,""COL_MARONE"-No Administrator Are Online-");
SCM(playerid, -1, ""COL_GREEN"|_____________________________________________|");
SCM(playerid, -1, ""COL_YELLOW" Online Admins");
SCM(playerid,-1,string);
SCM(playerid, -1, ""COL_GREEN"|_____________________________________________|");
}else return SCM(playerid,-1,""COL_MARONE"-No Administrators Are Online-");
}
return 1;
Reward - +1 rep.
Re: Bugged admin cmd -
Konstantinos - 04.03.2014
pawn Код:
COMMAND:admins(playerid, params[])
{
new string[1000], count;
foreach(Player, i)
{
switch (P_Data[i][pAdmin])
{
case 1: format(string,sizeof(string),""COL_BLUE"Admin %s (%d) - Level 1 (Moderator)",GetName(i), i);
case 2: format(string,sizeof(string),""COL_BLUE"Admin %s (%d) - Level 2 (Junior Admin)",GetName(i), i);
case 3: format(string,sizeof(string),""COL_BLUE"Admin %s (%d) - Level 3 (Senior Admin)",GetName(i), i);
case 4: format(string,sizeof(string),""COL_BLUE"Admin %s (%d) - Level 4 (Lead Admin)",GetName(i), i);
case 5: format(string,sizeof(string),""COL_BLUE"Admin %s (%d) - Level 5 (Manager Admin)",GetName(i), i);
case 6: format(string,sizeof(string),""COL_BLUE"Admin %s (%d) - Level 6 (Global Admin)",GetName(i), i);
case 7: format(string,sizeof(string),""COL_BLUE"Admin %s (%d) - Level 7 (Server Owner)",GetName(i), i);
default: continue;
}
++count;
}
if (count)
{
SCM(playerid, -1, ""COL_GREEN"|_____________________________________________|");
SCM(playerid, -1, ""COL_YELLOW" Online Admins");
SCM(playerid,-1,string);
SCM(playerid, -1, ""COL_GREEN"|_____________________________________________|");
}
else SCM(playerid,-1,""COL_MARONE"-No Administrators Are Online-");
return 1;
}
Re: Bugged admin cmd -
TheKevo - 04.03.2014
Thank you very much!