dcmd_joinarena(playerid, params[]) { #pragma unused params if(GetPVarInt(playerid, "IsInArena") == -1) { if(IsPlayerInRangeOfPoint(playerid,10.0,2035.7592,-1289.9252,20.9476)) { PaintballMainMenu(playerid); } else { SendClientMessage(playerid, COLOR_RED, "Niste u blizini ulaza u PaintBall arenu."); } } else { SendClientMessage(playerid, COLOR_WHITE, "Vec si u areni!"); } return 1; }
if(dialogid == PBMAINMENU) { if(response) { if(listitem == 0) // advokat { PaintballArenaSelection(playerid); } else if(listitem == 1) // lista skrivenih poslova { PaintballTokenBuyMenu(playerid); } else if(listitem == 2) { if(Igrac[playerid][pAdminNivo] >= 1337) { ShowPlayerDialog(playerid,PBADMINMENU,DIALOG_STYLE_LIST,"Paintball Arena - Admin Menu:","Edit Arena...\nLock All Arenas\nUnlock All Arenas\nSave Changes to All Arenas","Select","Back"); } else { ShowPlayerDialog(playerid,PBMAINMENU,DIALOG_STYLE_LIST,"Paintball Arena - Main Menu:","Choose an Arena\nPaintball Tokens\nAdmin Menu","Select","Leave"); SendClientMessage(playerid, COLOR_GRAD2, "You do not have authorization to access the admin panel."); return 1; } } } }
stock PaintballArenaSelection(playerid) { new string[200], status[64], gametype[64], eperm[64], limit, count, money; for(new i = 0; i < MAX_ARENAS; i++) if(!isnull(PaintBallArena[i][pbArenaName])) { limit = PaintBallArena[i][pbLimit]; count = PaintBallArena[i][pbPlayers]; money = PaintBallArena[i][pbBidMoney]; if(PaintBallArena[i][pbLocked] == 0) { format(status,sizeof(status),"{00FF00}Open{FFFFFF}"); } if(PaintBallArena[i][pbLocked] == 1) { format(status,sizeof(status),"{00FF00}Active{FFFFFF}"); } if(PaintBallArena[i][pbLocked] == 2) { format(status,sizeof(status),"{FF0000}Closed{FFFFFF}"); } if(PaintBallArena[i][pbLocked] == 3) { format(status,sizeof(status),"{FF6600}Setup{FFFFFF}"); } if(PaintBallArena[i][pbGameType] == 1) { format(gametype,sizeof(gametype),"DM"); } if(PaintBallArena[i][pbGameType] == 2) { format(gametype,sizeof(gametype),"TDM"); } if(PaintBallArena[i][pbGameType] == 3) { format(gametype,sizeof(gametype),"CTF"); } if(PaintBallArena[i][pbGameType] == 4) { format(gametype,sizeof(gametype),"KOTH"); } if(PaintBallArena[i][pbGameType] == 5) { format(gametype,sizeof(gametype),"TKOTH"); } if(PaintBallArena[i][pbExploitPerm] == 0) { format(eperm,sizeof(eperm),"{FF0000}No QS/CS{FFFFFF}"); } if(PaintBallArena[i][pbExploitPerm] == 1) { format(eperm,sizeof(eperm),"{00FF00}QS/CS{FFFFFF}"); } if(!strcmp(PaintBallArena[i][pbPassword], "None", false)) { format(string,sizeof(string),"%s{FFFFFF}%s - \t(%s) (%s) (%s) (%d/%d) ($%d) (%s)\n",string,PaintBallArena[i][pbArenaName],PaintBallArena[i][pbOwner],status,gametype,count,limit,money,eperm); } else { format(string,sizeof(string),"%s{FFFFFF}%s - \t(%s) (%s) (%s) (%d/%d) ($%d) (%s) (PW)\n",string,PaintBallArena[i][pbArenaName],PaintBallArena[i][pbOwner],status,gametype,count,limit,money,eperm); } } ShowPlayerDialog(playerid,PBARENASELECTION,DIALOG_STYLE_LIST,"Paintball Arena - Choose a Arena:",string,"Select","Back"); }
dcmd_joinarena(playerid, params[]) { #pragma unused params if(GetPVarInt(playerid, "IsInArena") == -1) { if(IsPlayerInRangeOfPoint(playerid,10.0,2035.7592,-1289.9252,20.9476)) { PaintBallArenaSelection(playerid); } else { SendClientMessage(playerid, COLOR_RED, "Niste u blizini ulaza u PaintBall arenu."); } } else { SendClientMessage(playerid, COLOR_WHITE, "Vec si u areni!"); } return 1; }
PaintballMainMenu(playerid) { new string[128]; format(string,sizeof(string),"Odaberi arenu\nPaintball Tokeni\nAdmin Menu"); ShowPlayerDialog(playerid,PBMAINMENU,DIALOG_STYLE_LIST,"Paintball Arena - Main Menu:",string,"Odaberi","Izlaz"); }
edit all OnDialogResponse callback of your fiterscripts.don't use return 1. edit to return 0.
and,remember this,OnDialogResponse should return 0 on fiterscripts,only can return 1 on gamemodes |
if(dialogid == PBMAINMENU) { if(!response) { ShowPlayerDialog(playerid,PBMAINMENU,DIALOG_STYLE_LIST,"Paintball Arena - Main Menu:","Choose an Arena\nPaintball Tokens\nAdmin Menu","Select","Leave"); } if(response) { switch(listitem) { case 0: PaintballArenaSelection(playerid); case 1:PaintballTokenBuyMenu(playerid); case 2: { if(Igrac[playerid][pAdminNivo] >= 1337) { ShowPlayerDialog(playerid,PBADMINMENU,DIALOG_STYLE_LIST,"Paintball Arena - Admin Menu:","Edit Arena...\nLock All Arenas\nUnlock All Arenas\nSave Changes to All Arenas","Select","Back"); } } } } }
Код:
if(dialogid == PBMAINMENU) { if(!response) { ShowPlayerDialog(playerid,PBMAINMENU,DIALOG_STYLE_LIST,"Paintball Arena - Main Menu:","Choose an Arena\nPaintball Tokens\nAdmin Menu","Select","Leave"); } if(response) { switch(listitem) { case 0: PaintballArenaSelection(playerid); case 1:PaintballTokenBuyMenu(playerid); case 2: { if(Igrac[playerid][pAdminNivo] >= 1337) { ShowPlayerDialog(playerid,PBADMINMENU,DIALOG_STYLE_LIST,"Paintball Arena - Admin Menu:","Edit Arena...\nLock All Arenas\nUnlock All Arenas\nSave Changes to All Arenas","Select","Back"); } } } } } |
So can you receive on response for PBMAINMENU?
If yes, then what's not working? Be more clear and post the OnDialogResponse completely (just add stuff related to this) |