/admins cmd help - 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 cmd help (
/showthread.php?tid=244365)
/admins cmd help -
Venice - 27.03.2011
im type /admins its spamming 1-99 look like
pawn Код:
if (strcmp("/admins", cmdtext, true) == 0)
{
SendClientMessage(playerid, 0xAFAFAFAA,"|_Current Online Administrators_|");
for(new i=0; i < MAX_PLAYERS; i++)
{
if (adminlevel[playerid] >= 1)
{
new name[MAX_PLAYER_NAME], string[MAX_PLAYER_NAME+3];
GetPlayerName(i, name, sizeof(name));
format(string, sizeof(string), "%s(%d)",name,i);
SendClientMessage(playerid, 0x1E90FFAA, string);
}
}
return 1;
}
Anybody Fix This Please
Re: /admins cmd help -
Noah_Roufus - 27.03.2011
Try this:
Код:
if (strcmp("/admins", cmdtext, true) == 0)
{
SendClientMessage(playerid, 0xAFAFAFAA,"|_Current Online Administrators_|");
for(new i=0; i < MAX_PLAYERS; i++)
{
if (adminlevel[i] >= 1)
{
new name[MAX_PLAYER_NAME], string[MAX_PLAYER_NAME+3];
GetPlayerName(i, name, sizeof(name));
format(string, sizeof(string), "%s(ID:%d)",name,i);
SendClientMessage(playerid, 0x1E90FFAA, string);
}
}
return 1;
}