Problem with a 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)
+--- Thread: Problem with a command (
/showthread.php?tid=333208)
Problem with a command -
Allu - 10.04.2012
pawn Code:
if (strcmp(cmd, "/admins", true) == 0)
{
if(IsPlayerConnected(playerid))
{
SendClientMessage(playerid, COLOR_GREEN, "| Admins Online: |");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] <= 1337)
{
if(PlayerInfo[i][pAdmin] == 1337) { tekst = "{13C6E9}Omanik"; }
else if(PlayerInfo[i][pAdmin] == 3) { tekst = "{369BAF}Administraator"; }
else if(PlayerInfo[i][pAdmin] == 2) { tekst = "{3A8A9A}Moderaator"; }
else if(PlayerInfo[i][pAdmin] == 1) { tekst = "{2AC72D}Abistaja"; }
}
GetPlayerName(i, sendername, sizeof(sendername));
if(PlayerInfo[i][pDuty] == 0)
{
format(string, sizeof(string), "%s: {FFFFFF}%s", tekst, sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
}
else if(PlayerInfo[i][pDuty] == 1)
{
format(string, sizeof(string), "%s: {FFFFFF}%s {33AA33}- Tццl", tekst, sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
}
}
}
}
return 1;
}
So my problem here is when I'm typing the command in game then it shows all the players in the server and shows them as Omanik=Owners(a.k.a level 1337 admin). And yes, all the players with admin level 0-s. I can't figure out here what I'm doing wrong.
Re: Problem with a command -
Allu - 11.04.2012
I'm still in trouble
Re: Problem with a command -
Allu - 14.04.2012
Bump...
Re: Problem with a command -
Allu - 16.04.2012
bump