I'm need command /admins - 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: I'm need command /admins (
/showthread.php?tid=377882)
I'm need command /admins -
Userpwon - 15.09.2012
Hello, I'm have a command "admins" and it writes me "error"
can someone to do?
I'm need a command 'admins' to see admins online.
my function in admin mod:
GetPVarInt > Level
CMD:admins(playerid,params[])
thanks you..
Re: I'm need command /admins -
KoczkaHUN - 15.09.2012
You should have explained it better...
Maybe:
pawn Код:
CMD:admins(playerid, params[])
{
SendClientMessage(playerid, 0xffff00ff, "Online admins:");
new isAdminOnline = false;
new adminLine[64], adminName[MAX_PLAYER_NAME];
for (new i = 0; i < MAX_PLAYERS; i++)
{
if (GetPVarInt(i, "Level") >= 1) // change 1 to the the minimum admin level
{
isAdminOnline = true;
GetPlayerName(i, adminName, MAX_PLAYER_NAME);
format(adminLine, sizeof adminLine, "%s - Level: %d", adminName, GetPVarInt(i, "Level"));
SendClientMessage(playerid, 0x00ff00ff, adminLine);
}
}
if (!isAdminOnline) SendClientMessage(playerid, 0xff0000ff, "There are no admins online.");
return 1;
}
Re: I'm need command /admins -
Userpwon - 15.09.2012
Quote:
Originally Posted by KoczkaHUN
You should have explained it better...
Maybe:
pawn Код:
CMD:admins(playerid, params[]) { SendClientMessage(playerid, 0xffff00ff, "Online admins:"); new isAdminOnline = false; new adminLine[64], adminName[MAX_PLAYER_NAME]; for (new i = 0; i < MAX_PLAYERS; i++) { if (GetPVarInt(i, "Level") >= 1) // change 1 to the the minimum admin level { isAdminOnline = true; GetPlayerName(i, adminName, MAX_PLAYER_NAME); format(adminLine, sizeof adminLine, "%s - Level: %d", adminName, GetPVarInt(i, "Level")); SendClientMessage(playerid, 0x00ff00ff, adminLine); } } if (!isAdminOnline) SendClientMessage(playerid, 0xff0000ff, "There are no admins online."); return 1; }
|
Yes, thank you-
working