CMD:admins(playerid,params[]) { new Count, string[128],n[MAX_PLAYER_NAME]; SendClientMessage(playerid, COLOR_GREEN, "__________|Admins|__________"); foreach(Player, i) { if(PlayerInfo[i][pAdmin] >=1) { GetPlayerName(i,n,sizeof(n)); format(string,sizeof(string)," %s ",n); SendClientMessage(playerid,COLOR_GREEN,string); Count++; } } if(Count == 0) SendClientMessage(playerid, COLOR_GREEN, " Server Level:1337 "); SendClientMessage(playerid, COLOR_GREEN, "____________________________"); return 1; }
CMD:admins(playerid,params[]) { new Count, string[128], n[MAX_PLAYER_NAME]; foreach(Player, i) { if(PlayerInfo[i][pAdmin] >=1) { GetPlayerName(i,n,sizeof(n)); format(string, sizeof(string), "%s\n%s", string, n); Count++; } } ShowPlayerDialog(playerid, admins, DIALOG_STYLE_LIST, "Online Admins", string, "Select", "Cancel"); if(Count == 0) { SendClientMessage(playerid, COLOR_GREEN, " Server Level:1337 "); SendClientMessage(playerid, COLOR_GREEN, "____________________________"); return 1; } }
If you mean a dialog that displays all online admins:
Код:
CMD:admins(playerid,params[]) { new Count, string[128], n[MAX_PLAYER_NAME]; foreach(Player, i) { if(PlayerInfo[i][pAdmin] >=1) { GetPlayerName(i,n,sizeof(n)); format(string, sizeof(string), "%s\n%s", string, n); Count++; } } ShowPlayerDialog(playerid, admins, DIALOG_STYLE_LIST, "Online Admins", string, "Select", "Cancel"); if(Count == 0) { SendClientMessage(playerid, COLOR_GREEN, " Server Level:1337 "); SendClientMessage(playerid, COLOR_GREEN, "____________________________"); return 1; } } |
C:\Users\ninja\Desktop\Server Package\gamemodes\mecom.pwn(2162) : warning 217: loose indentation C:\Users\ninja\Desktop\Server Package\gamemodes\mecom.pwn(3698) : error 017: undefined symbol "admins" C:\Users\ninja\Desktop\Server Package\gamemodes\mecom.pwn(3706) : warning 209: function "cmd_admins" should return a value Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
CMD:admins(playerid,params[]) { new Count, string[128], n[MAX_PLAYER_NAME]; foreach(Player, i) { if(PlayerInfo[i][pAdmin] >=1) { GetPlayerName(i,n,sizeof(n)); format(string, sizeof(string), "%s\n%s", string, n); Count++; } } ShowPlayerDialog(playerid, admins, DIALOG_STYLE_LIST, "Online Admins", string, "Select", "Cancel"); if(Count == 0) { SendClientMessage(playerid, COLOR_GREEN, " Server Level:1337 "); SendClientMessage(playerid, COLOR_GREEN, "____________________________"); } return 1; //THIS SHOULD BE HERE }
Put #pragma tabsize 0 on top of your script to remove the warning.
You should replace the admins with the dialog id that you want. If you don't want to deal with dialog id's I recommend EasyDialog |
Put #pragma tabsize 0 on top of your script to remove the warning.
You should replace the admins with the dialog id that you want. |
Put #pragma tabsize 0 on top of your script to remove the warning.
You should replace the admins with the dialog id that you want. |
Thank you for helping but Easydialog download links are not working
|
DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon4")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon5")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon6")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon7"));