[HELP]dcmd_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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP]dcmd_admins (
/showthread.php?tid=162910)
[HELP]dcmd_admins -
LasTRace - 25.07.2010
Код:
dcmd_admins(playerid, params[])
{
#pragma unused params
new string[128],AdminName[MAX_PLAYER_NAME], count = 0;
SendClientMessage(playerid, COLOR_GREEN3, " ");
SendClientMessage(playerid, COLOR_GREEN3, "Online Administrators:");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if(PlayerInfo[i][AdminLevel] > 1)
{
GetPlayerName(i, AdminName, sizeof(AdminName));
format(string, sizeof(string), "%s (ID:%d)", AdminName[i], i);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
}
}
if (count == 0) SendClientMessage(playerid,COLOR_WHITE,"No administrators online in the list, try /mods to see online moderators.");
return 1;
}
When i type "/admins" in game, it shows as (my nick: Lastrace, second player's nick: Firstrace):
Online Administrators:
astrace(ID:0)
rstrace(ID:1)
It eats my first letter (L), and at second it eats his first two letter (F and i), whats wrong there?
Re: [HELP]dcmd_admins -
Flo_White - 25.07.2010
pawn Код:
format(string, sizeof(string), "%s (ID:%d)", AdminName[i], i);
should be
pawn Код:
format(string, sizeof(string), "%s (ID:%d)", AdminName, i);
Re: [HELP]dcmd_admins -
Last_Stand_Guardian - 25.07.2010
Remove [i] from AdminName[i] =D
PS: Admins level 1 aren't shown because you haven't >= 1 but you probably know that =D
Post over me was faster xD
Re: [HELP]dcmd_admins -
LasTRace - 25.07.2010
1= mod
2 =< admin
its ok, ty mates