COMMAND:adminid(playerid, params[])
{
new admineidsees, string[128];
if(Logged[playerid] == true)
{
SendClientMessage(playerid, COLOR_CYAN, "_________| Administraatorid |_________");
for(new i = 0; i <= GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] >= 1)
{
admineidsees++;
if(aDuty[i] == false)
{
format(string, sizeof(string), "%s{FFFFFF}: %s [{FF0000}Ei ole tццl{FFFFFF}]",ARNKNM(i), RPName(i));
SendClientMessage(playerid, COLOR_RED, string);
}
else if(aDuty[i] == true)
{
format(string, sizeof(string), "%s{FFFFFF}: %s [{118A00}On tццl{FFFFFF}]",ARNKNM(i), RPName(i));
SendClientMessage(playerid, COLOR_RED, string);
}
}
}
}
}
if(admineidsees == 0)
{
SendClientMessage(playerid, COLOR_WHITE, "Hetkel ei ole ьhtegi administraatorit sees");
}
else if(admineidsees != 0)
{
format(string, sizeof(string), "Hetkel on sees %d administraatorit", admineidsees);
SendClientMessage(playerid, COLOR_WHITE, string);
}
}
return 1;
}
(804) : error 010: invalid function or declaration
COMMAND:adminid(playerid, params[]) { new admineidsees, string[128]; if(Logged[playerid] == true) { SendClientMessage(playerid, COLOR_CYAN, "_________| Administraatorid |_________"); for(new i = 0; i <= GetMaxPlayers(); i++) { if(IsPlayerConnected(i)) { if(PlayerInfo[i][pAdmin] >= 1) { admineidsees++; if(aDuty[i] == false) { format(string, sizeof(string), "%s{FFFFFF}: %s [{FF0000}Ei ole tццl{FFFFFF}]",ARNKNM(i), RPName(i)); SendClientMessage(playerid, COLOR_RED, string); } else if(aDuty[i] == true) { format(string, sizeof(string), "%s{FFFFFF}: %s [{118A00}On tццl{FFFFFF}]",ARNKNM(i), RPName(i)); SendClientMessage(playerid, COLOR_RED, string); } } } } } if(admineidsees == 0) { SendClientMessage(playerid, COLOR_WHITE, "Hetkel ei ole ьhtegi administraatorit sees"); } else if(admineidsees != 0) { format(string, sizeof(string), "Hetkel on sees %d administraatorit", admineidsees); SendClientMessage(playerid, COLOR_WHITE, string); } } // erase this return 1; }
COMMAND:adminid(playerid, params[])
{
new admineidsees, string[128];
if(Logged[playerid] == true)
{
SendClientMessage(playerid, COLOR_CYAN, "_________| Administraatorid |_________");
for(new i = 0; i <= GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] >= 1)
{
admineidsees++;
if(aDuty[i] == false)
{
format(string, sizeof(string), "%s{FFFFFF}: %s [{FF0000}Ei ole tццl{FFFFFF}]",ARNKNM(i), RPName(i));
SendClientMessage(playerid, COLOR_RED, string);
}
else if(aDuty[i] == true)
{
format(string, sizeof(string), "%s{FFFFFF}: %s [{118A00}On tццl{FFFFFF}]",ARNKNM(i), RPName(i));
SendClientMessage(playerid, COLOR_RED, string);
}
}
}
}
if(admineidsees == 0)
{
SendClientMessage(playerid, COLOR_WHITE, "Hetkel ei ole ьhtegi administraatorit sees");
}
else if(admineidsees != 0)
{
format(string, sizeof(string), "Hetkel on sees %d administraatorit", admineidsees);
SendClientMessage(playerid, COLOR_WHITE, string);
}
}
return 1;
}
Код:
COMMAND:adminid(playerid, params[]) { new admineidsees, string[128]; if(Logged[playerid] == true) { SendClientMessage(playerid, COLOR_CYAN, "_________| Administraatorid |_________"); for(new i = 0; i <= GetMaxPlayers(); i++) { if(IsPlayerConnected(i)) { if(PlayerInfo[i][pAdmin] >= 1) { admineidsees++; if(aDuty[i] == false) { format(string, sizeof(string), "%s{FFFFFF}: %s [{FF0000}Ei ole tццl{FFFFFF}]",ARNKNM(i), RPName(i)); SendClientMessage(playerid, COLOR_RED, string); } else if(aDuty[i] == true) { format(string, sizeof(string), "%s{FFFFFF}: %s [{118A00}On tццl{FFFFFF}]",ARNKNM(i), RPName(i)); SendClientMessage(playerid, COLOR_RED, string); } } } } } if(admineidsees == 0) { SendClientMessage(playerid, COLOR_WHITE, "Hetkel ei ole ьhtegi administraatorit sees"); } else if(admineidsees != 0) { format(string, sizeof(string), "Hetkel on sees %d administraatorit", admineidsees); SendClientMessage(playerid, COLOR_WHITE, string); } } // erase this return 1; } |
else if(aDuty[i] == true)
(784) : warning 213: tag mismatch
new aDuty[MAX_PLAYERS];
new bool:aDuty[MAX_PLAYERS];
aDuty is a integer and not boolean.
@edit You're declared var: Код:
new aDuty[MAX_PLAYERS]; Код:
new bool:aDuty[MAX_PLAYERS]; |
else if(aDuty[i] == true)
else if(aDuty[i]) // then whatever