07.09.2018, 17:38
I have one problem, dialogs dont response, dialog work when I call him with command, but from ondialogresponse doesnt work.
With this command above I open succesfully next dialog:
But, everything next doesnt work (response)
my stock:
But when i call this dialog with command, it works, but next opening doesnt work:
Код:
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;
}
But, everything next doesnt work (response)
Код:
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;
}



