20.12.2015, 21:49
PHP код:
CMD:admins(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
new count = 0, string[196], sendername[MAX_PLAYER_NAME];
SendClientMessage(playerid, COLOR_TEAL, "----Admins Online----------------------------------------------------");
foreach(Player, i)
{
if(IsPlayerConnected(i))
{
if(playerVariables[i][pAdminLevel] == 1)
{
format(string, sizeof(string), "(%d) %s - admin level 1", i, sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
}
if(playerVariables[playerid][pAdminLevel] == 2)
{
GetPlayerName(i, sendername, sizeof(sendername));
if(AdminDuty[i] == 0)
{
format(string, sizeof(string), "(%d) %s - admin level 2", i, sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
else
{
format(string, sizeof(string), "(%d) %s - admin level 2", i, sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
}
if(playerVariables[playerid][pAdminLevel] == 3)
{
GetPlayerName(i, sendername, sizeof(sendername));
if(AdminDuty[i] == 0)
{
format(string, sizeof(string), "(%d) %s - admin level 3", i, sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
else
{
format(string, sizeof(string), "(%d) %s - admin level 3", i, sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
}
if(playerVariables[playerid][pAdminLevel] == 4)
{
if(AdminDuty[i] == 0)
{
format(string, sizeof(string), "(%d) %s - admin level 4", i, sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
else
{
format(string, sizeof(string), "(%d) %s - admin level 4", i, sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
}
if(playerVariables[playerid][pAdminLevel] == 5)
{
if(AdminDuty[i] == 0)
{
format(string, sizeof(string), "(%d) %s - admin level 5", i, sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
else
{
format(string, sizeof(string), "(%d) %s - admin level 5", i, sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
}
if(playerVariables[playerid][pAdminLevel] == 6)
{
if(AdminDuty[i] == 0)
{
format(string, sizeof(string), "(%d) %s - admin level 6", i, sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
else
{
format(string, sizeof(string), "(%d) %s - admin level 6", i, sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
}
if(playerVariables[playerid][pAdminLevel] == 7)
{
GetPlayerName(i, sendername, sizeof(sendername));
if(AdminDuty[i] == 0)
{
format(string, sizeof(string), "(%d) %s - Founder", i, sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
else
{
format(string, sizeof(string), "(%d) %s - Founder", i, sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
}
}
}
27320 if(count == 0)
{
SendClientMessage(playerid, COLOR_IN2,"* No admins online on the server.");
SendClientMessage(playerid, COLOR_TEAL,"----------------------------------------------------------------------------");
SendClientMessage(playerid, COLOR_WHITE,"Daca ai vreo problema, poti folosi /report. Pentru intrebari legate de joc poti folosi /n.");
SendClientMessage(playerid, COLOR_TEAL,"----------------------------------------------------------------------------");
}
27327 else if(count == 1)
{
SendClientMessage(playerid, COLOR_IN2,"* Now are 1 admin online.");
SendClientMessage(playerid, COLOR_TEAL,"----------------------------------------------------------------------------");
SendClientMessage(playerid, COLOR_WHITE,"Daca ai vreo problema, poti folosi /report. Pentru intrebari legate de joc poti folosi /n.");
SendClientMessage(playerid, COLOR_TEAL,"----------------------------------------------------------------------------");
}
27334 else if (count >= 2)
{
27336 format(string, sizeof(string), "* There are now %d admins online.", count);
SCM(playerid, COLOR_IN2, string);
SendClientMessage(playerid, COLOR_TEAL, "----------------------------------------------------------------------------");
SendClientMessage(playerid, COLOR_WHITE, "Daca ai vreo problema, poti folosi /report. Pentru intrebari legate de joc poti folosi /n.");
SendClientMessage(playerid, COLOR_TEAL, "----------------------------------------------------------------------------");
}
}
return 1;
}
PHP код:
C:\Users\SebyIonut\Desktop\TEST GM\gamemodes\buggedv330.pwn(27320) : error 017: undefined symbol "count"
C:\Users\SebyIonut\Desktop\TEST GM\gamemodes\buggedv330.pwn(27327) : error 017: undefined symbol "count"
C:\Users\SebyIonut\Desktop\TEST GM\gamemodes\buggedv330.pwn(27334) : error 017: undefined symbol "count"
C:\Users\SebyIonut\Desktop\TEST GM\gamemodes\buggedv330.pwn(27336) : error 017: undefined symbol "string"
C:\Users\SebyIonut\Desktop\TEST GM\gamemodes\buggedv330.pwn(27336) : error 017: undefined symbol "string"
C:\Users\SebyIonut\Desktop\TEST GM\gamemodes\buggedv330.pwn(27336) : error 029: invalid expression, assumed zero
C:\Users\SebyIonut\Desktop\TEST GM\gamemodes\buggedv330.pwn(27336) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase