CMD:admins(playerid, params[]) { new online, string[128], file[32]; if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command."); if(PlayerInfo[playerid][pAdmin] < 1) { foreach(Player, i) { if(PlayerInfo[i][pAdmin] && aDuty[i]) { online ++; } } format(string, sizeof(string), "On-Duty Admins: %d", online); SendClientMessage(playerid, COLOR_ORANGE, string); foreach(Player, i) { if(PlayerInfo[i][pAdmin] && aDuty[i]) { format(string, sizeof(string), "- [Level: %d] %s", PlayerInfo[i][pAdmin], NORPN(i)); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); } } } else { foreach(Player, i) { if(PlayerInfo[i][pAdmin]) { online ++; } } format(string, sizeof(string), "Online Admins: %d", online); SendClientMessage(playerid, COLOR_ORANGE, string); foreach(Player, i) { if(PlayerInfo[i][pAdmin]) { if(!aDuty[i]) { format(file, sizeof(file), "users/%s.ini",RPNU(i)); format(string, sizeof(string), "- [Level: %d] %s [Admin Name: %s]", PlayerInfo[i][pAdmin], NORPN(i), dini_Get(file, "AdminName")); } else { format(file, sizeof(file), "users/%s.ini",RPNU(i)); format(string, sizeof(string), "- [Level: %d] %s [RP Name: %s]", PlayerInfo[i][pAdmin], NORPN(i), dini_Get(file, "OldName")); } if(PlayerInfo[i][pGangMod]) strcat(string, " [Gang Mod]"); if(PlayerInfo[i][pFacMod]) strcat(string, " [Fac Mod]"); if(PlayerInfo[i][pDoorMod]) strcat(string, " [Door Mod]"); if(PlayerInfo[i][pBizMod]) strcat(string, " [Biz Mod]"); if(PlayerInfo[i][pHouseMod]) strcat(string, " [House Mod]"); if(PlayerInfo[i][pGameAffairs]) strcat(string, " [Game Affairs]"); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); } } } return 1; }
CMD:admins(playerid, params[])
{
new online, string[128], string2[512], file[32], count = 0;
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(PlayerInfo[playerid][pAdmin] < 1)
{
foreach(Player, i)
{
if(PlayerInfo[i][pAdmin] && aDuty[i])
{
format(string, sizeof(string), "- [Level: %d] %s", PlayerInfo[i][pAdmin], NORPN(i));
if(count == 0)
{
strcat(string2, string);
}
if(count > 0)
{
strcat(string, "\n");
strcat(string2, string);
}
count++;
}
}
ShowPlayerDialog(playerid,DIALOG_ID,DIALOG_STYLE_LIST,"On Duty Admins:",string2,"Close","");//change the DIALOG_ID
}
else
{
foreach(Player, i)
{
if(PlayerInfo[i][pAdmin])
{
if(!aDuty[i])
{
format(file, sizeof(file), "users/%s.ini",RPNU(i));
format(string, sizeof(string), "- [Level: %d] %s [Admin Name: %s]", PlayerInfo[i][pAdmin], NORPN(i), dini_Get(file, "AdminName"));
}
else
{
format(file, sizeof(file), "users/%s.ini",RPNU(i));
format(string, sizeof(string), "- [Level: %d] %s [RP Name: %s]", PlayerInfo[i][pAdmin], NORPN(i), dini_Get(file, "OldName"));
}
if(PlayerInfo[i][pGangMod]) strcat(string, " [Gang Mod]");
if(PlayerInfo[i][pFacMod]) strcat(string, " [Fac Mod]");
if(PlayerInfo[i][pDoorMod]) strcat(string, " [Door Mod]");
if(PlayerInfo[i][pBizMod]) strcat(string, " [Biz Mod]");
if(PlayerInfo[i][pHouseMod]) strcat(string, " [House Mod]");
if(PlayerInfo[i][pGameAffairs]) strcat(string, " [Game Affairs]");
if(count == 0)
{
strcat(string2,string);
}
else if(count > 0)
{
strcat(string, "\n");
strcat(string2, string);
}
count++;
}
}
ShowPlayerDialog(playerid,DIALOG_ID,DIALOG_STYLE_LIST,"Online Admins:",string2,"Close","");//change the DIALOG_ID
}
return 1;
}
C:\Users\Matt\Desktop\SAMP\SC-RP\gamemodes\UMRP.pwn(18114) : warning 203: symbol is never used: "online" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Warning.
new online, string[128], string2[512], file[32], count = 0;
remove the online,
1. This forum requires that you wait 120 seconds between posts. Please try again in 74 seconds. |
C:\Users\Matt\Desktop\SAMP\PRLSRP\gamemodes\UMRP.pwn(18114) : error 001: expected token: "-identifier-", but found "," C:\Users\Matt\Desktop\SAMP\PRLSRP\gamemodes\UMRP.pwn(18122) : error 017: undefined symbol "string" C:\Users\Matt\Desktop\SAMP\PRLSRP\gamemodes\UMRP.pwn(18122) : error 017: undefined symbol "string" C:\Users\Matt\Desktop\SAMP\PRLSRP\gamemodes\UMRP.pwn(18122) : error 029: invalid expression, assumed zero C:\Users\Matt\Desktop\SAMP\PRLSRP\gamemodes\UMRP.pwn(18122) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.
new , string[128], string2[512], file[32], count = 0;
new string[128], string2[512], file[32], count = 0;
maybe you only delete the online and it become
pawn Код:
pawn Код:
|