Dialogs?
#1

Hello, I have 2 dialogs which aren't responding to me, /diamondtoys and /diamondweapons.

here's the script for them

PHP код:
CMD:diamondtoys(playeridparams[])
{
    if(!
IsPlayerInRangeOfPoint(playerid42912.23, -2035.5211.01))
    {
        
SendClientMessageEx(playeridCOLOR_WHITE"    You are not in the Diamond Donator Toys room!");
        return 
1;
    }
    if(
PlayerInfo[playerid][pDonator] < 3)
    {
        
SendClientMessageEx(playeridCOLOR_WHITE"* You are not a Diamond Donator");
        return 
1;
    }
    if(
PlayerInfo[playerid][pDonator] == 3)
    {
        
ShowPlayerDialog(playeridBUYTOYSDIAMONDDIALOG_STYLE_MSGBOX"Toy Store""Welcome to the Diamond Donator Toy store! Here you can buy accessories to attach to your character.\n\nFirst, we will choose a slot to store the toy in.","Continue""Cancel");
    }
    return 
1;
}
CMD:diamondweapons(playeridparams[])
{
    if(
IsPlayerInRangeOfPoint(playerid42913.75, -2031.4811.01))
    {
        if(
PlayerInfo[playerid][pDonator] < 3)
        {
            
SendClientMessageEx(playeridCOLOR_WHITE"* You are not Diamond Donator");
        }
        else
        {
            
ShowPlayerDialog(playeridBUYWEPSDIAMONDDIALOG_STYLE_MSGBOX"Weapon Store""Welcome to the Diamond Donator Weapon store! Here you can buy weapons.\n\nFirst, you will choose a weapon.","Continue""Cancel");
        }
    }
    else
    {
        
SendClientMessageExplayeridCOLOR_WHITE"   You are not in the Diamond Weapon store !" );
    }
    return 
1;

by the way there are no errors !! just when i do it it dont respond ..

Thanks a lot for helpers !!
Reply
#2

The dialog don't show when you type that command?
Reply
#3

They might be conflicting with some other dialogs! Show us where are you #defining these two dialogs:

BUYTOYSDIAMOND,BUYWEPSDIAMOND

Are you using any filterscript?
Reply
#4

no filterscripts. this is my defines :

#define BUYTOYSDIAMOND 54684
#define BUYWEPSDIAMOND 84644
#define DONATORWEPSMENU 67113
#define BUYTOYSDIAMOND2 65464
#define BUYTOYSDIAMOND3 65462
Reply
#5

Use less, dialog defines, I don't know the dialogs limit, but I think you exceeded it.
Код:
#define BUYTOYSDIAMOND 15000
#define BUYWEPSDIAMOND 15001
Reply
#6

Try sequencing all these dialogs for once but make sure they are not equal to some other dialog's id.

pawn Код:
#define BUYTOYSDIAMOND 54684
#define BUYWEPSDIAMOND 54685
#define DONATORWEPSMENU 54686
#define BUYTOYSDIAMOND2 54687
#define BUYTOYSDIAMOND3 54688
Remove filterscripts for once if you have any!


Quote:
Originally Posted by Edvin
Посмотреть сообщение
Use less, dialog defines, I don't know the dialogs limit, but I think you exceeded it.
Код:
#define BUYTOYSDIAMOND 15000
#define BUYWEPSDIAMOND 15001
There is no limit for defining a dialog's id. Using less value doesnt matter!
Reply
#7

they aren't equal to any other.. i checked them all, this is really wierd... any solution ?
Reply
#8

Could you show us the code for this dialog under OnDialogResponse
Reply
#9

Yes:

PHP код:
if((dialogid == BUYWEPSDIAMOND) && response)
    {
        if(
PlayerInfo[playerid][pDonator] == 3)
        {
            
ShowPlayerDialog(playeridDONATORWEPSMENUDIALOG_STYLE_LIST"VIP Weapons""Desert Eagle\nSPAS-12\nM4\nAK-47\nShotgun\nMP5\nSniper\nSilenced Pistol\nGolf Club\nBat\nDildo\nSword""Select""Cancel");
        }
        else
        {
            
SendClientMessageEx(playeridCOLOR_WHITE"You are not diamond donator.");
            return 
1;
        }
    }
    if(
dialogid == DONATORWEPSMENU)
    {
        if(!
response) return 1;
        switch( 
listitem )
        {
            case 
0:
                
GivePlayerValidWeapon(playerid2460000);
             case 
1:
                
GivePlayerValidWeapon(playerid2760000);
            case 
2:
                
GivePlayerValidWeapon(playerid3160000);
            case 
3:
                
GivePlayerValidWeapon(playerid3060000);
            case 
4:
                
GivePlayerValidWeapon(playerid2560000);
            case 
5:
                
GivePlayerValidWeapon(playerid2960000);
            case 
6:
                
GivePlayerValidWeapon(playerid3460000);
            case 
7:
                
GivePlayerValidWeapon(playerid2360000);
            case 
8:
                
GivePlayerValidWeapon(playerid260000);
            case 
9:
                
GivePlayerValidWeapon(playerid560000);
            case 
10:
                
GivePlayerValidWeapon(playerid1060000);
            case 
11:
                
GivePlayerValidWeapon(playerid860000);
        }
    }
    if((
dialogid == BUYTOYSDIAMOND) && response)
    {
        if(
PlayerInfo[playerid][pDonator] < 3) return SendClientMessageEx(playeridCOLOR_WHITE"* You must be a Diamond Donator");
        new 
stringg[512];
        for(new 
x;x<MAX_PLAYERTOYS;x++)
        {
            new 
name[24] = "None";

            for(new 
i;i<sizeof(HoldingObjectsPlat);i++)
            {
                if(
HoldingObjectsPlat[i][holdingmodelid] == PlayerToyInfo[playerid][x][ptModelID])
                {
                    
format(namesizeof(name), "%s"HoldingObjectsPlat[i][holdingmodelname]);
                }
            }
            for(new 
i;i<sizeof(HoldingObjectsAll);i++)
            {
                if(
HoldingObjectsAll[i][holdingmodelid] == PlayerToyInfo[playerid][x][ptModelID])
                {
                    
format(namesizeof(name), "%s"HoldingObjectsAll[i][holdingmodelname]);
                }
            }
            
format(stringgsizeof(stringg), "%s(%d) %s (Bone: %s)\n"stringgxnameHoldingBones[PlayerToyInfo[playerid][x][ptBone]]);
        }
        
ShowPlayerDialog(playeridBUYTOYSDIAMOND2DIALOG_STYLE_LIST"Select a Slot"stringg"Select""Cancel");
    }
    if((
dialogid == BUYTOYSDIAMOND2) && response)
    {
        if(
PlayerInfo[playerid][pDonator] < 3) return SendClientMessageEx(playeridCOLOR_WHITE"* You must be a Diamond Donator");

        if(
PlayerToyInfo[playerid][listitem][ptModelID] != 0) return SendClientMessageEx(playeridCOLOR_YELLOW"* You already have something in that slot. Delete it with /toys");

        
slotselection[playerid] = listitem;

        new 
stringg[5256];
        for(new 
x;x<sizeof(HoldingObjectsPlat);x++)
        {
            
format(stringgsizeof(stringg), "%s%s ($%d)\n"stringgHoldingObjectsPlat[x][holdingmodelname], HoldingObjectsPlat[x][holdingprice]);
        }
        
ShowPlayerDialog(playeridBUYTOYSDIAMOND3DIALOG_STYLE_LIST"Select an Item"stringg"Buy""Cancel");
    }
    if((
dialogid == BUYTOYSDIAMOND3) && response)
    {
        if(
PlayerInfo[playerid][pDonator] < 3) return SendClientMessageEx(playeridCOLOR_WHITE"* You must be a Diamond Donator");

        if(
GetPlayerCash(playerid) < HoldingObjects[listitem][holdingprice])
        {
            
SendClientMessageEx(playeridCOLOR_WHITE"* You can't afford that!");
        }
        else
        {
            
GivePlayerCash(playerid, -HoldingObjectsPlat[listitem][holdingprice]);
            
PlayerToyInfo[playerid][slotselection[playerid]][ptModelID] = HoldingObjectsPlat[listitem][holdingmodelid];

            new 
modelid PlayerToyInfo[playerid][slotselection[playerid]][ptModelID];
            if((
modelid >= 19317 && modelid <= 19318))
            {
                
PlayerToyInfo[playerid][slotselection[playerid]][ptBone] = 2;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptPosX] = 0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptPosY] = 0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptPosZ] = 0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptRotX] = 0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptRotY] = 0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptRotZ] = 0.0;
            }
            else if(
modelid == 19472 || modelid == 19469)
            {
                
PlayerToyInfo[playerid][slotselection[playerid]][ptBone] = 2;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptPosX] = 0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptPosY] = 0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptPosZ] = 0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptRotX] = 0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptRotY] = 0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptRotZ] = 0.0;
            }
            else if(
modelid >= 19421 && modelid <= 19424)
            {
                
PlayerToyInfo[playerid][slotselection[playerid]][ptBone] = 2;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptPosX] = 0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptPosY] = 0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptPosZ] = 0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptRotX] = 0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptRotY] = 0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptRotZ] = 0.0;
            }
            else if(
modelid == 19352 || modelid >= 19350 && modelid <= 19351)
            {
                
PlayerToyInfo[playerid][slotselection[playerid]][ptBone] = 2;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptPosX] = 0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptPosY] = 0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptPosZ] = 0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptRotX] = 0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptRotY] = 0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptRotZ] = 0.0;
            }
            else if(
modelid == 19314 || modelid == 19315)
            {
                
PlayerToyInfo[playerid][slotselection[playerid]][ptBone] = 2;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptPosX] = 0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptPosY] = 0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptPosZ] = 0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptRotX] = 0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptRotY] = 0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptRotZ] = 0.0;
            }
            else if((
modelid >= 19006 && modelid <= 19035) || (modelid >= 19138 && modelid <= 19140))
            {
                
PlayerToyInfo[playerid][slotselection[playerid]][ptBone] = 2;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptPosX] = 0.9;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptPosY] = 0.0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptPosZ] = 0.35;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptRotX] = 90.0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptRotY] = 90.0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptRotZ] = 0.0;
            }
            else if(
modelid >= 18891 && modelid <= 18910)
            {
                
PlayerToyInfo[playerid][slotselection[playerid]][ptBone] = 2;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptPosX] = 0.15;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptPosY] = 0.0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptPosZ] = 0.0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptRotX] = 90.0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptRotY] = 180.0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptRotZ] = 90.0;
            }
            else if(
modelid >= 18926 && modelid <= 18935)
            {
                
PlayerToyInfo[playerid][slotselection[playerid]][ptBone] = 2;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptPosX] = 0.1;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptPosY] = 0.0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptPosZ] = 0.0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptRotX] = 0.0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptRotY] = 0.0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptRotZ] = 0.0;
            }
            else if(
modelid >= 18911 && modelid <= 18920)
            {
                
PlayerToyInfo[playerid][slotselection[playerid]][ptBone] = 2;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptPosX] = 0.1;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptPosY] = 0.035;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptPosZ] = 0.0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptRotX] = 90.0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptRotY] = 180.0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptRotZ] = 90.0;
            }
            else if(
modelid == 19078 || modelid == 19078)
            {
                
PlayerToyInfo[playerid][slotselection[playerid]][ptBone] = 16;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptPosX] = 0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptPosY] = 0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptPosZ] = 0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptRotX] = 180.0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptRotY] = 180.0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptRotZ] = 0.0;
            }
            else if((
modelid >= 18641 && modelid <= 18644) || (modelid >= 19080 && modelid <= 19084) || modelid == 18890)
            {
                
PlayerToyInfo[playerid][slotselection[playerid]][ptBone] = 6;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptPosX] = 0.0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptPosY] = 0.0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptPosZ] = 0.0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptRotX] = 0.0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptRotY] = 0.0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptRotZ] = 0.0;
            }
            else
            {
                
PlayerToyInfo[playerid][slotselection[playerid]][ptBone] = 2;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptPosX] = 0.0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptPosY] = 0.0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptPosZ] = 0.0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptRotX] = 0.0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptRotY] = 0.0;
                
PlayerToyInfo[playerid][slotselection[playerid]][ptRotZ] = 0.0;
            }
            
format(stringsizeof(string), "* You have purchased %s for $%d (Slot: %d)"HoldingObjectsPlat[listitem][holdingmodelname], HoldingObjectsPlat[listitem][holdingprice], slotselection[playerid]);
            
SendClientMessageEx(playeridCOLOR_REDstring);
            
SendClientMessageEx(playeridCOLOR_WHITE"HINT: Use /toys to wear/edit this");
        }
    } 
Reply
#10

Quote:
Originally Posted by Lido
Посмотреть сообщение
Could you show us the code for this dialog under OnDialogResponse
^^

You should return false;(0) in OnDialogResponse if it's filterscript, otherwise return true;(1).
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)