/admins Bug - 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 Bug (
/showthread.php?tid=269965)
/admins Bug -
dillo1000 - 18.07.2011
When I type /admins it comes up like this, Say 3 people on the server and one admin
Admins online
Server moderater
Admins online
Admins online
Comes up 3 times because 3 players are online, Anyone can help please?
pawn Код:
if(strcmp(cmd, "/admins", true) == 0) {
new adminname[24];
new admins = 0;
new string[256];
for(new i = 0; i < MAX_PLAYERS; i++)
if (IsPlayerConnected(i)) {
{
SendClientMessage(playerid, 0xFFFFFFFF,"Currently online admins:");
if(PlayerInfo[i][AdminLevel] == 1 && toggleadmin[i] == 0)
{
GetPlayerName(i, adminname, 24);
format(string,sizeof string,"%s - Server Moderator (Level 1)", adminname);
SendClientMessage(playerid,0xFFFFFFFF,string);
admins++;
}
if(PlayerInfo[i][AdminLevel] == 2 && toggleadmin[i] == 0)
{
GetPlayerName(i, adminname, 24);
format(string,sizeof string,"%s - Moderator + (Level 2)", adminname);
SendClientMessage(playerid,0xFFFFFFFF,string);
admins++;
}
if(PlayerInfo[i][AdminLevel] == 3 && toggleadmin[i] == 0)
{
GetPlayerName(i, adminname, 24);
format(string,sizeof string,"%s - Admin (Level 3)", adminname);
SendClientMessage(playerid,0xFFFFFFFF,string);
admins++;
}
if(PlayerInfo[i][AdminLevel] == 4 && toggleadmin[i] == 0)
{
GetPlayerName(i, adminname, 24);
format(string,sizeof string,"%s - Admin + (Level 4)", adminname);
SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
admins++;
}
Re: /admins Bug -
dillo1000 - 18.07.2011
Sorry people why was this moved its a bug :/
Re: /admins Bug -
Wesley221 - 18.07.2011
Because this is scripting related.
You should place the "SendClientMessage(playerid, 0xFFFFFFFF,"Currently online admins:");" out of the loop
Re: /admins Bug -
dillo1000 - 18.07.2011
Didnt work
Re: /admins Bug -
Wesley221 - 18.07.2011
pawn Код:
if(strcmp(cmd, "/admins", true) == 0)
{
new adminname[24];
new admins = 0;
new string[256];
SendClientMessage(playerid, 0xFFFFFFFF,"Currently online admins:");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if(PlayerInfo[i][AdminLevel] == 1 && toggleadmin[i] == 0)
{
GetPlayerName(i, adminname, 24);
format(string,sizeof string,"%s - Server Moderator (Level 1)", adminname);
SendClientMessage(playerid,0xFFFFFFFF,string);
admins++;
}
if(PlayerInfo[i][AdminLevel] == 2 && toggleadmin[i] == 0)
{
GetPlayerName(i, adminname, 24);
format(string,sizeof string,"%s - Moderator + (Level 2)", adminname);
SendClientMessage(playerid,0xFFFFFFFF,string);
admins++;
}
if(PlayerInfo[i][AdminLevel] == 3 && toggleadmin[i] == 0)
{
GetPlayerName(i, adminname, 24);
format(string,sizeof string,"%s - Admin (Level 3)", adminname);
SendClientMessage(playerid,0xFFFFFFFF,string);
admins++;
}
if(PlayerInfo[i][AdminLevel] == 4 && toggleadmin[i] == 0)
{
GetPlayerName(i, adminname, 24);
format(string,sizeof string,"%s - Admin + (Level 4)", adminname);
SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
admins++;
}
}
}
return 1;
}
Re: /admins Bug -
dillo1000 - 18.07.2011
Now it just says No Admins Online!
Edit: I deleted my /toggleadmins and it just does the normal :/
Re: /admins Bug -
dillo1000 - 22.07.2011
*bump* srs need help
Re: /admins Bug -
Gazmull - 22.07.2011
Then, you need to rcon login.
Re: /admins Bug -
dillo1000 - 22.07.2011
What?
Re: /admins Bug -
MadeMan - 22.07.2011
What is the problem now?