Store Dialog
#1

I have a problem, im new to using dialogs...
This is what i have, (also i havent set up my dialog responses yet...)
pawn Code:
{
    {
    if(!IsPlayerInRangeOfPoint(playerid, 8.0, 3167.4341, 500.0863, 4.7500)) return SendClientMessage(playerid,-1,"You need to be in the Galaxy Mall."); // change the co-ords to the ones you want

    ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Galaxy Mall : Ammunition","Spraycan [$100]\nBat [$50]\nGolf Club [$70]\nShovel [$70]\nKatana [$100]\nCamera [$60]","Purchase","Exit");
    }
    {
    if(!IsPlayerInRangeOfPoint(playerid, 8.0, 3164.3389, 522.0725, 11.9411)) return SendClientMessage(playerid,-1,"You need to be in the Galaxy Mall."); // change the co-ords to the ones you want

    ShowPlayerDialog(playerid,2,DIALOG_STYLE_LIST,"Galaxy Mall : Fashion","Mask [$350]\nRuffles [$10]\nCoca-Cola [$10]\nCheeseburger [$15]","Purchase","Exit");
    }
    {
    if(!IsPlayerInRangeOfPoint(playerid, 8.0, 3071.0244, 532.2115, 11.7497)) return SendClientMessage(playerid,-1,"You need to be in the Galaxy Mall."); // change the co-ords to the ones you want

    ShowPlayerDialog(playerid,3,DIALOG_STYLE_LIST,"Galaxy Mall : Bar","Cigarettes [$40]\nBeer [$20]","Purchase","Exit");
    }
    return 1;
}
But, the problem so far is that when i use this code, it only works for the first dialog, id1... It pops up, but the others dont, it compiles fine... But in game, doesnt work properly, can someone fix the code for me...? Also can someone show me how to set up the dialog responses for this?
Reply
#2

Can someone help? Please, urgent-help needed if possible!
Reply
#3

Quote:
Originally Posted by cray1100
View Post
I have a problem, im new to using dialogs...
This is what i have, (also i havent set up my dialog responses yet...)
pawn Code:
{
    {
    if(!IsPlayerInRangeOfPoint(playerid, 8.0, 3167.4341, 500.0863, 4.7500)) return SendClientMessage(playerid,-1,"You need to be in the Galaxy Mall."); // change the co-ords to the ones you want

    ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Galaxy Mall : Ammunition","Spraycan [$100]\nBat [$50]\nGolf Club [$70]\nShovel [$70]\nKatana [$100]\nCamera [$60]","Purchase","Exit");
    }
    {
    if(!IsPlayerInRangeOfPoint(playerid, 8.0, 3164.3389, 522.0725, 11.9411)) return SendClientMessage(playerid,-1,"You need to be in the Galaxy Mall."); // change the co-ords to the ones you want

    ShowPlayerDialog(playerid,2,DIALOG_STYLE_LIST,"Galaxy Mall : Fashion","Mask [$350]\nRuffles [$10]\nCoca-Cola [$10]\nCheeseburger [$15]","Purchase","Exit");
    }
    {
    if(!IsPlayerInRangeOfPoint(playerid, 8.0, 3071.0244, 532.2115, 11.7497)) return SendClientMessage(playerid,-1,"You need to be in the Galaxy Mall."); // change the co-ords to the ones you want

    ShowPlayerDialog(playerid,3,DIALOG_STYLE_LIST,"Galaxy Mall : Bar","Cigarettes [$40]\nBeer [$20]","Purchase","Exit");
    }
    return 1;
}
But, the problem so far is that when i use this code, it only works for the first dialog, id1... It pops up, but the others dont, it compiles fine... But in game, doesnt work properly, can someone fix the code for me...? Also can someone show me how to set up the dialog responses for this?
be more specific what is going on with it ? is it not showing? more info
Reply
#4

Only the first dialog shows... If you can come in my server, it would be easier to explain... Is that possible?

EDIT: The ip is in my signature...
Reply
#5

Quote:
Originally Posted by cray1100
View Post
Only the first dialog shows... If you can come in my server, it would be easier to explain... Is that possible?

EDIT: The ip is in my signature...
i will as soon as my windows update finish i am installing 94 updates is on 93 ill be there my pc wont let me go to server
cuz of the resolution i factory reset it
Reply
#6

Ok, ill be on too in a second...
Reply
#7

pawn Code:
//HERES THE BUY COMMAND

CMD:buy(playerid, params[])
{
    {
    if(!IsPlayerInRangeOfPoint(playerid, 8.0, 3167.4341, 500.0863, 4.7500)) return SendClientMessage(playerid,-1,"You need to be in the Galaxy Mall."); // change the co-ords to the ones you want

    ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Galaxy Mall : Ammunition","Spraycan [$100]\nBat [$50]\nGolf Club [$70]\nShovel [$70]\nKatana [$100]\nCamera [$60]","Purchase","Exit");
    }
    {
    if(!IsPlayerInRangeOfPoint(playerid, 8.0, 3164.3389, 522.0725, 11.9411)) return SendClientMessage(playerid,-1,"You need to be in the Galaxy Mall."); // change the co-ords to the ones you want

    ShowPlayerDialog(playerid,2,DIALOG_STYLE_LIST,"Galaxy Mall : Fashion","Mask [$350]\nRuffles [$10]\nCoca-Cola [$10]\nCheeseburger [$15]","Purchase","Exit");
    }
    {
    if(!IsPlayerInRangeOfPoint(playerid, 8.0, 3071.0244, 532.2115, 11.7497)) return SendClientMessage(playerid,-1,"You need to be in the Galaxy Mall."); // change the co-ords to the ones you want

    ShowPlayerDialog(playerid,3,DIALOG_STYLE_LIST,"Galaxy Mall : Bar","Cigarettes [$40]\nBeer [$20]","Purchase","Exit");
    }
    return 1;
}



//AND HERES THE RESPONSE CODE...
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid==1 && response==1)
    {

    switch(listitem)
    {
        case 0:
        {
        if(GetPlayerMoney(playerid) <100) return SendClientMessage(playerid,0xAA3333AA, "You do not have enough money!");
        SendClientMessage(playerid,-1,"You purchased a Spraycan for $100!");
        GivePlayerWeapon(playerid, 41, 100);
        GivePlayerMoney(playerid, -100);
        }
        case 1:
        {
        if(GetPlayerMoney(playerid) <50) return SendClientMessage(playerid,0xAA3333AA, "You do not have enough money!");
        SendClientMessage(playerid, -1, "John:You purchased a Baseball Bat for $50!");
        GivePlayerWeapon(playerid, 5, 1);
        GivePlayerMoney(playerid, -50);
        }
        case 2:
        {
        if(GetPlayerMoney(playerid) <70) return SendClientMessage(playerid,0xAA3333AA, "You do not have enough money!");
        SendClientMessage(playerid, -1, "John:You purchased a Golf Club for $70!");
        GivePlayerWeapon(playerid, 2, 1);
        GivePlayerMoney(playerid, -70);
        }
        case 3:
        {
        if(GetPlayerMoney(playerid) <70) return SendClientMessage(playerid,0xAA3333AA, "You do not have enough money!");
        SendClientMessage(playerid, -1, "John:You purchased a Shovel for $70!");
        GivePlayerWeapon(playerid, 6, 1);
        GivePlayerMoney(playerid, -70);
        }
        case 4:
        {
        if(GetPlayerMoney(playerid) <100) return SendClientMessage(playerid,0xAA3333AA, "You do not have enough money!");
        SendClientMessage(playerid, -1, "John:You purchased a Katana for $100!");
        GivePlayerWeapon(playerid, 8, 1);
        GivePlayerMoney(playerid, -100);
        }
        case 5:
        {
        if(GetPlayerMoney(playerid) <60) return SendClientMessage(playerid,0xAA3333AA, "You do not have enough money!");
        SendClientMessage(playerid, -1, "John:You purchased a Camera for $60!");
        GivePlayerMoney(playerid, -60);
        GivePlayerWeapon(playerid, 43, 100);
        }
        case 6:
        {
        if(GetPlayerMoney(playerid) <350) return SendClientMessage(playerid,0xAA3333AA, "You do not have enough money!");
        SendClientMessage(playerid, -1, "John:You purchased a Mask for $350! ((/maskon & /maskoff))");
        GivePlayerMoney(playerid, -350);
        (HasBoughtMask[playerid] = 1);
        }
        case 7:
        {
        if(GetPlayerMoney(playerid) <10) return SendClientMessage(playerid,0xAA3333AA, "You do not have enough money!");
        new Float:pHealth;
        GetPlayerHealth(playerid, Float:pHealth);
        SendClientMessage(playerid, -1, "John:You purchased a pack of Ruffles for $10! ((+20 HP))");
        ApplyAnimation(playerid,"VENDING", "vend_eat1_P",4.1,0,1,1,1,1,1);
        GivePlayerMoney(playerid, -10);
        SetPlayerHealth(playerid, pHealth+20);
        }
        case 8:
        {
        if(GetPlayerMoney(playerid) <10) return SendClientMessage(playerid,0xAA3333AA, "You do not have enough money!");
        new Float:pHealth;
        GetPlayerHealth(playerid, Float:pHealth);
        SendClientMessage(playerid, -1, "John:You purchased a bottle of Coca-Cola for $10! ((+10 HP))");
        GivePlayerMoney(playerid, -10);
        SetPlayerHealth(playerid, pHealth+10);
        }
        case 9:
        {
        if(GetPlayerMoney(playerid) <15) return SendClientMessage(playerid,0xAA3333AA, "You do not have enough money!");
        new Float:pHealth;
        GetPlayerHealth(playerid, Float:pHealth);
        SendClientMessage(playerid, -1, "John:You purchased a Cheese Burger for $15! ((+30 HP))");
        ApplyAnimation(playerid,"VENDING", "vend_eat1_P",4.1,0,1,1,1,1,1);
        GivePlayerMoney(playerid, -15);
        SetPlayerHealth(playerid, pHealth+30);
        }
        case 10:
        {
        if(GetPlayerMoney(playerid) <40) return SendClientMessage(playerid,0xAA3333AA, "You do not have enough money!");
        SendClientMessage(playerid, -1, "John:You purchased a box of cigars for $40! ((/cigar))");
        GivePlayerMoney(playerid, -40);
        (HasBoughtCigar[playerid] = 1);
        }
        case 11:
        {
        if(GetPlayerMoney(playerid) <20) return SendClientMessage(playerid,0xAA3333AA, "You do not have enough money!");
        SendClientMessage(playerid, -1, "John:You purchased a bottle of beer for $20!");
        GivePlayerMoney(playerid, -20);
        (HasBoughtBeer[playerid] = 1);
        }
    }
}
return 1;
}
I moved the bottom lines to the other dialogs...
Reply
#8

PHP Code:
CMD:buy(playeridparams[])
{
    if(
IsPlayerInRangeOfPoint(playerid3.01920.5144,-1795.2943,13.3828))
    {
        
ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Galaxy Mall : Ammunition","Spraycan [$100]\nBat [$50]\nGolf Club [$70]\nShovel [$70]\nKatana [$100]\nCamera [$60]","Purchase","Exit");
        return 
1;
    }
       if(
IsPlayerInRangeOfPoint(playerid8.03164.3389,522.0725,11.9411))
    {
        
ShowPlayerDialog(playerid,2,DIALOG_STYLE_LIST,"Galaxy Mall : Fashion","Mask [$350]\nRuffles [$10]\nCoca-Cola [$10]\nCheeseburger [$15]","Purchase","Exit");
        return 
1;
    }
    if(
IsPlayerInRangeOfPoint(playerid8.03071.0244,532.2115,11.7497))
    {
        
ShowPlayerDialog(playerid,3,DIALOG_STYLE_LIST,"Galaxy Mall : Bar","Cigarettes [$40]\nBeer [$20]","Purchase","Exit");
        return 
1;
    }
    else
    {
         
SendClientMessage(playerid,-1,"You need to be in the Galaxy Mall.");
    }
    return 
1;

Reply
#9

Thanks...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)