/admins function - 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: /admins function (
/showthread.php?tid=379819)
/admins function -
zionx08 - 23.09.2012
i want to know how to view admins online with /admins commands.
and also how to add with helper like
if i type /admins
the chat will show like this
[Admins online]
-Firstname_Surname
[Helpers]
-Firstname_Surname
Please help me how to script like that..
Re: /admins function -
Passout - 23.09.2012
search
Re: /admins function -
zionx08 - 23.09.2012
Thats why i'm asking somebody to help me search?
Re: /admins function -
trapstar2020 - 23.09.2012
new aDuty[MAX_PLAYERS]
new aHelper[MAX_PLAYERS]
rpn just get playername
Код:
CMD:admins(playerid, params[])
{
new string[128];
new count = 0;
SendClientMessage(playerid, COLOR_PURPLE, "|____________________Admins Online____________________|");
{
if(aDuty[playerid] == 1)
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
format(string, 256, "Administrator: - [Administrator: %s]",, RPN(playerid));
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
}
}
if(count == 0)
{
SendClientMessage(playerid, COLOR_WHITE, "[Error:] Currently no administrators");
}
SendClientMessage(playerid, COLOR_PURPLE, "______________________________________________________________________________________");
return 1;
}
Код:
CMD:aduty(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
if(!aDuty[playerid])
{
aDuty[playerid] = 1;
}
else
{
aDuty[playerid] = 0;
}
return 1;
}
REP ++ hope i helped u u can copy and paste the same thing twice switch aduty with aHelper the second time thats all

PEACEMAN