/admins command 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 command help (
/showthread.php?tid=207564)
/admins command help -
xir - 06.01.2011
when i type /admins it shows ID: 67, and Level: 37, when is supposed to be 3, also it doesnt show my name
pawn Code:
dcmd_admins(playerid, params[])
{
#pragma unused params
new iname[MAX_PLAYER_NAME], string[180], count=0;
SendClientMessage(playerid, AdminColor, "Online Adminstrators");
for(new i; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pAdminLevel] >=1)
{
GetPlayerName(i, iname, sizeof(iname));
format(string, sizeof(string), "ID: %i %s Level: %i",iname, PlayerInfo[i]);
SendClientMessage(playerid, AdminColor, string);
count++;
}
}
if(count==0) SendClientMessage(playerid, AdminColor, "No admins online");
return 1;
}
please help
Re: /admins command help -
_rAped - 06.01.2011
pawn Code:
format(string, sizeof(string), "ID: %i %s Level: %i",playerid, iname, PlayerInfo[i][pAdminLevel]);
Re: /admins command help -
xir - 06.01.2011
It works, thanks.
Respect man, you help alot of people
Re: /admins command help -
titanak - 06.01.2011
Quote:
Originally Posted by _rAped
pawn Code:
format(string, sizeof(string), "ID: %i %s Level: %i",playerid, iname, PlayerInfo[i][pAdminLevel]);
|
What About..
pawn Code:
format(string, sizeof(string), "ID: %i %s Level: %d",playerid, iname, PlayerInfo[i][pAdminLevel]);
To change the last %i to %d ??