/admins online command - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /admins online command (
/showthread.php?tid=185558)
/admins online command -
Face9000 - 25.10.2010
Hi all,someone know how to set /admins for checking the admins online at moment?
Example.I use /admins and..:
Admins Online:
NICK 1
NICK 2
ETC.
Re: /admins online command -
Rachael - 25.10.2010
This is pretty basic scripting, I suggest you read up on pawn on the wiki.
Loop through player, checking if connected
I recommend using foreach, but a simple loop through max players will do the same thing
https://sampforum.blast.hk/showthread.php?tid=92679
inside the loop, check if the player is an admin, using whatever variable you store admin in, and/or IsPlayerAdmin()
format a string, and send it to the players client.
Re: /admins online command -
SampStunta - 25.10.2010
Use that with your
line (( underneath ))
Re: /admins online command -
BMUK - 25.10.2010
Quote:
Originally Posted by SampStunta
Use that with your line (( underneath ))
|
How the fuck is that going to help him?
You might aswell have said nothing :S
He is going to reply with "how to use that?"
If your going to spoon feed people then atleast do it properly.
Re: /admins online command -
Dj_maryo1993 - 25.10.2010
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerAdmin(i))
{
new string[27];
new sendername[MAX_PLAYER_NAME];
GetPlayerName(i, sendername, sizeof(sendername));
format(string, sizeof(string), "Admin: %s", sendername);
SendClientMessage(playerid, culoare, string);
}
}
}
The IsPlayerAdmin only works with rcon admins , replace that with what you're using to check if is an admin(if you have an custom-made admin-system)
Also ,this is only the loop , make the command the same as the others.