RCON Administrator Help -
Filbert - 09.06.2016
I made this command >
PHP код:
CMD:admins(playerid, params[])
{
SendClientMessage(playerid, green, " ");
SendClientMessage(playerid, green, "___________ |- Online Admins -| ___________");
SendClientMessage(playerid, green, " ");
new count = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue;
if(!PlayerInfo[i][Level]) continue;
new string[90], playersname[MAX_PLAYER_NAME];
GetPlayerName(i, playersname, sizeof(playersname));
if(IsPlayerAdmin(playerid))
{
format(string, sizeof(string), "{FF0000}%s (ID:%i) - Level: %d | RCON Administrator | Playing!", playersname, i, PlayerInfo[i][Level]);
}
else
{
switch(PlayerInfo[i][Level])
{
case 1: format(string, sizeof(string), "{33AA33}%s (ID:%i) - Level: %d | Basic Moderator | Playing!", playersname, i, PlayerInfo[i][Level]);
case 2: format(string, sizeof(string), "{33AA33}%s (ID:%i) - Level: %d | Moderator | Playing!", playersname, i, PlayerInfo[i][Level]);
case 3: format(string, sizeof(string), "{FFFF00}%s (ID:%i) - Level: %d | Master Moderator | Playing!", playersname, i, PlayerInfo[i][Level]);
case 4: format(string, sizeof(string), "{000000}%s (ID:%i) - Level: %d | Administrator | Playing!", playersname, i, PlayerInfo[i][Level]);
case 5: format(string, sizeof(string), "{33CCFF}%s (ID:%i) - Level: %d | Master Administrator | Playing!", playersname, i, PlayerInfo[i][Level]);
case 6: format(string, sizeof(string), "{C0C0C0}%s (ID:%i) - Level: %d | Elite Admin | Playing!", playersname, i, PlayerInfo[i][Level]);
case 7: format(string, sizeof(string), "{FF0000}%s (ID:%i) - Level: %d | General | Playing!", playersname, i, PlayerInfo[i][Level]);
case 8: format(string, sizeof(string), "{4169FF}%s (ID:%i) - Level: %d | Director | Playing!", playersname, i, PlayerInfo[i][Level]);
case 9: format(string, sizeof(string), "{FF9900}%s (ID:%i) - Level: %d | Server Head | Playing!", playersname, i, PlayerInfo[i][Level]);
case 999: format(string, sizeof(string), "{AA3333}%s (ID:%i) - Level: %d | Co-Owner | Playing!", playersname, i, PlayerInfo[i][Level]);
case 99999: format(string, sizeof(string), "{4169FF}%s (ID:%i) - Level: %d | Owner | Playing!", playersname, i, PlayerInfo[i][Level]);
default: continue;
}
SendClientMessage(playerid, red, string);
count++;
}
if(!count) SendClientMessage(playerid, red, "No admin online in the list");
SendClientMessage(playerid, green, "________________________________________");
return 1;
}
I found this error >
Код:
H:\GAME\SA-MP Server\HGTDM\Gamemodes\HGTDM~RP.pwn(2455) : error 017: undefined symbol "sscanf"
H:\GAME\SA-MP Server\HGTDM\Gamemodes\HGTDM~RP.pwn(2485) : error 017: undefined symbol "MessageToAdmins"
H:\GAME\SA-MP Server\HGTDM\Gamemodes\HGTDM~RP.pwn(2526) : error 017: undefined symbol "PlayerName2"
H:\GAME\SA-MP Server\HGTDM\Gamemodes\HGTDM~RP.pwn(2528) : error 017: undefined symbol "SaveToFile"
H:\GAME\SA-MP Server\HGTDM\Gamemodes\HGTDM~RP.pwn(2535) : error 017: undefined symbol "TimeStamp"
H:\GAME\SA-MP Server\HGTDM\Gamemodes\HGTDM~RP.pwn(2538) : error 017: undefined symbol "TimeStamp"
H:\GAME\SA-MP Server\HGTDM\Gamemodes\HGTDM~RP.pwn(2540) : error 017: undefined symbol "TimeStamp"
H:\GAME\SA-MP Server\HGTDM\Gamemodes\HGTDM~RP.pwn(2543) : error 017: undefined symbol "PlayerName2"
H:\GAME\SA-MP Server\HGTDM\Gamemodes\HGTDM~RP.pwn(2545) : error 017: undefined symbol "SaveToFile"
H:\GAME\SA-MP Server\HGTDM\Gamemodes\HGTDM~RP.pwn(2699) : error 017: undefined symbol "UpdateConfig"
H:\GAME\SA-MP Server\HGTDM\Gamemodes\HGTDM~RP.pwn(3133) : error 017: undefined symbol "CountBusinesses"
H:\GAME\SA-MP Server\HGTDM\Gamemodes\HGTDM~RP.pwn(3134) : error 017: undefined symbol "LoadBusinesses"
H:\GAME\SA-MP Server\HGTDM\Gamemodes\HGTDM~RP.pwn(3140) : error 017: undefined symbol "CountVehicles"
H:\GAME\SA-MP Server\HGTDM\Gamemodes\HGTDM~RP.pwn(3141) : error 017: undefined symbol "LoadVehicles"
H:\GAME\SA-MP Server\HGTDM\Gamemodes\HGTDM~RP.pwn(3144) : error 017: undefined symbol "ModVehicle"
H:\GAME\SA-MP Server\HGTDM\Gamemodes\HGTDM~RP.pwn(3172) : error 017: undefined symbol "AddHouse"
H:\GAME\SA-MP Server\HGTDM\Gamemodes\HGTDM~RP.pwn(3173) : error 017: undefined symbol "AddHouse"
H:\GAME\SA-MP Server\HGTDM\Gamemodes\HGTDM~RP.pwn(3174) : error 017: undefined symbol "AddHouse"
H:\GAME\SA-MP Server\HGTDM\Gamemodes\HGTDM~RP.pwn(3175) : error 017: undefined symbol "AddHouse"
H:\GAME\SA-MP Server\HGTDM\Gamemodes\HGTDM~RP.pwn(3176) : error 017: undefined symbol "AddHouse"
H:\GAME\SA-MP Server\HGTDM\Gamemodes\HGTDM~RP.pwn(3177) : error 017: undefined symbol "AddHouse"
H:\GAME\SA-MP Server\HGTDM\Gamemodes\HGTDM~RP.pwn(3178) : error 017: undefined symbol "AddHouse"
H:\GAME\SA-MP Server\HGTDM\Gamemodes\HGTDM~RP.pwn(3179) : error 017: undefined symbol "AddHouse"
H:\GAME\SA-MP Server\HGTDM\Gamemodes\HGTDM~RP.pwn(3180) : error 017: undefined symbol "AddHouse"
H:\GAME\SA-MP Server\HGTDM\Gamemodes\HGTDM~RP.pwn(3181) : error 017: undefined symbol "AddHouse"
H:\GAME\SA-MP Server\HGTDM\Gamemodes\HGTDM~RP.pwn(3182) : error 017: undefined symbol "AddHouse"
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
26 Errors.
And if I delete the >
PHP код:
if(IsPlayerAdmin(playerid))
{
format(string, sizeof(string), "{FF0000}%s (ID:%i) - Level: %d | RCON Administrator | Playing!", playersname, i, PlayerInfo[i][Level]);
}
else
{
It's working very well
What should I do now to fix this error?
Please help me...
Thanks And God Bless You All
Re: RCON Administrator Help -
Stinged - 09.06.2016
If you indent your code you would see the problem...
Код:
CMD:admins(playerid, params[])
{
SendClientMessage(playerid, green, " ");
SendClientMessage(playerid, green, "___________ |- Online Admins -| ___________");
SendClientMessage(playerid, green, " ");
new count = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue;
if(!PlayerInfo[i][Level]) continue;
new string[90], playersname[MAX_PLAYER_NAME];
GetPlayerName(i, playersname, sizeof(playersname));
if(IsPlayerAdmin(playerid))
{
format(string, sizeof(string), "{FF0000}%s (ID:%i) - Level: %d | RCON Administrator | Playing!", playersname, i, PlayerInfo[i][Level]);
}
else
{
switch(PlayerInfo[i][Level])
{
case 1: format(string, sizeof(string), "{33AA33}%s (ID:%i) - Level: %d | Basic Moderator | Playing!", playersname, i, PlayerInfo[i][Level]);
case 2: format(string, sizeof(string), "{33AA33}%s (ID:%i) - Level: %d | Moderator | Playing!", playersname, i, PlayerInfo[i][Level]);
case 3: format(string, sizeof(string), "{FFFF00}%s (ID:%i) - Level: %d | Master Moderator | Playing!", playersname, i, PlayerInfo[i][Level]);
case 4: format(string, sizeof(string), "{000000}%s (ID:%i) - Level: %d | Administrator | Playing!", playersname, i, PlayerInfo[i][Level]);
case 5: format(string, sizeof(string), "{33CCFF}%s (ID:%i) - Level: %d | Master Administrator | Playing!", playersname, i, PlayerInfo[i][Level]);
case 6: format(string, sizeof(string), "{C0C0C0}%s (ID:%i) - Level: %d | Elite Admin | Playing!", playersname, i, PlayerInfo[i][Level]);
case 7: format(string, sizeof(string), "{FF0000}%s (ID:%i) - Level: %d | General | Playing!", playersname, i, PlayerInfo[i][Level]);
case 8: format(string, sizeof(string), "{4169FF}%s (ID:%i) - Level: %d | Director | Playing!", playersname, i, PlayerInfo[i][Level]);
case 9: format(string, sizeof(string), "{FF9900}%s (ID:%i) - Level: %d | Server Head | Playing!", playersname, i, PlayerInfo[i][Level]);
case 999: format(string, sizeof(string), "{AA3333}%s (ID:%i) - Level: %d | Co-Owner | Playing!", playersname, i, PlayerInfo[i][Level]);
case 99999: format(string, sizeof(string), "{4169FF}%s (ID:%i) - Level: %d | Owner | Playing!", playersname, i, PlayerInfo[i][Level]);
default: continue;
}
SendClientMessage(playerid, red, string);
count++;
}
if(!count) SendClientMessage(playerid, red, "No admin online in the list");
SendClientMessage(playerid, green, "________________________________________");
return 1;
}
Don't you think there's something missing?
Re: RCON Administrator Help -
F1N4L - 09.06.2016
@EDIT
Re: RCON Administrator Help -
Filbert - 09.06.2016
No
I dont know about it
Re: RCON Administrator Help -
ManIsHere - 09.06.2016
i dont see any problem in code
Re: RCON Administrator Help -
Stinged - 09.06.2016
There's a missing bracket right before
if (!count) in your code.
I only posted the indented version, which makes it more clear.
Re: RCON Administrator Help -
Filbert - 09.06.2016
Stinged, Your code working very well.
But I dont know where is my problem from
Thank You For Helping Me!
Re: RCON Administrator Help -
Filbert - 09.06.2016
sorry its not working
If I login as RCON Administrator and type /admins, It's says "No admin online in the list"
Re: RCON Administrator Help -
Stinged - 09.06.2016
That's because you're not increasing the count, and you're also not sending the formatted string when you check if the player is an rcon admin.
Re: RCON Administrator Help -
Filbert - 09.06.2016
Can you give me the right codes?
Please...