Dialogs?
#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


Messages In This Thread
Dialogs? - by HarryPotter - 28.11.2012, 10:58
Re: Dialogs? - by Edvin - 28.11.2012, 11:01
Re: Dialogs? - by Ballu Miaa - 28.11.2012, 11:01
Re: Dialogs? - by HarryPotter - 28.11.2012, 11:05
Re: Dialogs? - by Edvin - 28.11.2012, 11:09
Re: Dialogs? - by Ballu Miaa - 28.11.2012, 11:10
Re: Dialogs? - by HarryPotter - 28.11.2012, 11:12
Re: Dialogs? - by Smally - 28.11.2012, 11:14
Re: Dialogs? - by HarryPotter - 28.11.2012, 11:17
Re: Dialogs? - by Konstantinos - 28.11.2012, 11:19

Forum Jump:


Users browsing this thread: 1 Guest(s)