Dialog
#1

I have these OnDialog
PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
new 
string[128];
            if(
dialogid == 3)// this is for check, if the dialog id = 999, we will do these below
          
{
        if(
response)// if they response for the menus of dialog
        
{
            if (
listitem == 0)// same like above that ive explained.
            
{
                    if(
GetPlayerMoney(playerid) <100) return SendClientMessage(playerid,0xAA3333AA"You do not have enough money!");
                    
SendClientMessage(playerid, -1"You've bought an package of Beer.");
                    
format(stringsizeof(string), "** %s hands out some cash to the Cashier"NAMEGET(playerid));
                    
NearMessageSender(playerid7string0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                    (
HasBoughtBeer[playerid] = 1);
                    
GivePlayerMoney(playerid, -100);
            }
            if (
listitem == 1)// same like above tha    t ive explained.
            
{
                    if(
GetPlayerMoney(playerid) <100) return SendClientMessage(playerid,0xAA3333AA"You do not have enough money!");
                    
format(stringsizeof(string), "** %s hands out some cash to the Cashier "NAMEGET(playerid));
                    
NearMessageSender(playerid7string0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                    (
HasBoughtCigar[playerid] = 1);
                    
GivePlayerMoney(playerid, -100);
            }
            if (
listitem == 2)
            {
                    if(
GetPlayerMoney(playerid) <300) return SendClientMessage(playerid,0xAA3333AA"You do not have enough money!");
                    
SendClientMessage(playerid, -1"You've bought an Mask.");
                    
format(stringsizeof(string), "** %s hands out some cash to the Cashier "NAMEGET(playerid));
                    
NearMessageSender(playerid7string0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                    (
HasBoughtMask[playerid] = 1);
                    
GivePlayerMoney(playerid, -300);
            }
            if (
listitem == 3)
            {
                    if(
GetPlayerMoney(playerid) <500) return SendClientMessage(playerid,0xAA3333AA"You do not have enough money!");
                    
SendClientMessage(playerid, -1"You've bought an Boombox.");
                    
format(stringsizeof(string), "** %s hands out some cash to the Cashier. "NAMEGET(playerid));
                    
NearMessageSender(playerid7string0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                    (
HasBoughtBoombox[playerid] = 1);
                    
GivePlayerMoney(playerid, -500);
            }
            if (
listitem == 4)
            {
                    if(
GetPlayerMoney(playerid) <300) return SendClientMessage(playerid,0xAA3333AA"You do not have enough money!");
                    
SendClientMessage(playerid, -1"You've bought an Bat.");
                    
format(stringsizeof(string), "** %s hands out some cash to the Cashier. "NAMEGET(playerid));
                    
NearMessageSender(playerid7string0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                    
GivePlayerWeapon(playerid51);
                    
GivePlayerMoney(playerid, -300);
            }
            if (
listitem == 5)
            {
                    if(
GetPlayerMoney(playerid) <100) return SendClientMessage(playerid,0xAA3333AA"You do not have enough money!");
                    
SendClientMessage(playerid, -1"You've bought a Dice.");
                    
format(stringsizeof(string), "** %s hands out some cash to the Cashier. "NAMEGET(playerid));
                    
NearMessageSender(playerid7string0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                    (
HasBoughtDice[playerid] = 1);
                    
GivePlayerMoney(playerid, -100);
            }
         }
         return 
1;
        }
        
            if(
dialogid == 2)// this is for check, if the dialog id = 999, we will do these below
          
{
        if(
response)// if they response for the menus of dialog
        
{
            if (
listitem == 0)// same like above that ive explained.
            
{
            
format(stringsizeof(string), "** %s Takes out the Cadet Gear and the Weapon`s"NAMEGET(playerid));
                    
NearMessageSender(playerid7string0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                    
GivePlayerWeapon(playerid2464);
                    
SetPlayerArmour(playerid100.0);
                    
SetPlayerSkin(playerid71);
            }
            if (
listitem == 1)// same like above that ive explained.
            
{
            
format(stringsizeof(string), "** %s Takes out the Officer Gear and the Weapon`s"NAMEGET(playerid));
                    
NearMessageSender(playerid7string0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                    
GivePlayerWeapon(playerid2464);
                    
GivePlayerWeapon(playerid2564);
                    
SetPlayerArmour(playerid100.0);
                    
SetPlayerSkin(playerid280);
            }
            if (
listitem == 2)// same like above that ive explained.
            
{
                        
format(stringsizeof(string), "** %s Takes out the Senior Lead Officer Gear and the Weapon`s"NAMEGET(playerid));
                    
NearMessageSender(playerid7string0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                    
GivePlayerWeapon(playerid2464);
                    
GivePlayerWeapon(playerid2564);
                    
GivePlayerWeapon(playerid2964);
                    
SetPlayerArmour(playerid100.0);
                    
SetPlayerSkin(playerid281);
            }
            if (
listitem == 3)// same like above that ive explained.
            
{
            
format(stringsizeof(string), "** %s Takes out the Detective Gear and the Weapon`s"NAMEGET(playerid));
                    
NearMessageSender(playerid7string0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                    
GivePlayerWeapon(playerid2464);
                    
GivePlayerWeapon(playerid2564);
                    
GivePlayerWeapon(playerid2964);
                    
SetPlayerArmour(playerid100.0);
                    
SetPlayerSkin(playerid165);
            }
            if (
listitem == 4)// same like above that ive explained.
            
{
            
format(stringsizeof(string), "** %s Takes out the Sergeant Gear and the Weapon`s"NAMEGET(playerid));
                    
NearMessageSender(playerid7string0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                    
GivePlayerWeapon(playerid2464);
                    
GivePlayerWeapon(playerid2564);
                    
GivePlayerWeapon(playerid2964);
                    
SetPlayerArmour(playerid100.0);
                    
SetPlayerSkin(playerid283);
            }
            if (
listitem == 5)// same like above that ive explained.
            
{
            
format(stringsizeof(string), "** %s Takes out the Liutenant Gear and the Weapon`s"NAMEGET(playerid));
                    
NearMessageSender(playerid7string0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                    
GivePlayerWeapon(playerid2464);
                    
GivePlayerWeapon(playerid2564);
                    
GivePlayerWeapon(playerid2964);
                    
SetPlayerArmour(playerid100.0);
                    
SetPlayerSkin(playerid286);
            }
            if (
listitem == 6)// same like above that ive explained.
            
{
            
format(stringsizeof(string), "** %s Takes out the Captain Gear and the Weapon`s"NAMEGET(playerid));
                    
NearMessageSender(playerid7string0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                    
GivePlayerWeapon(playerid2464);
                    
GivePlayerWeapon(playerid2564);
                    
GivePlayerWeapon(playerid2964);
                    
SetPlayerArmour(playerid100.0);
                    
SetPlayerSkin(playerid288);
            }
            if (
listitem == 7)// same like above that ive explained.
            
{
            
format(stringsizeof(string), "** %s Takes out the Commander Gear and the Weapon`s"NAMEGET(playerid));
                    
NearMessageSender(playerid7string0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                    
GivePlayerWeapon(playerid2464);
                    
GivePlayerWeapon(playerid2564);
                    
GivePlayerWeapon(playerid2964);
                    
SetPlayerArmour(playerid100.0);
                    
SetPlayerSkin(playerid282);
            }
            if (
listitem == 8)// same like above that ive explained.
            
{
            
format(stringsizeof(string), "** %s Takes out the Deputy Chief Gear and the Weapon`s"NAMEGET(playerid));
                    
NearMessageSender(playerid7string0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                    
GivePlayerWeapon(playerid2464);
                    
GivePlayerWeapon(playerid2564);
                    
GivePlayerWeapon(playerid2964);
                    
SetPlayerArmour(playerid100.0);
                    
SetPlayerSkin(playerid282);
            }
            if (
listitem == 9)// same like above that ive explained.
            
{
            
format(stringsizeof(string), "** %s Takes out the Chief of Police Gear and the Weapon`s"NAMEGET(playerid));
                    
NearMessageSender(playerid7string0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                    
GivePlayerWeapon(playerid2464);
                    
GivePlayerWeapon(playerid2564);
                    
GivePlayerWeapon(playerid2964);
                    
SetPlayerArmour(playerid100.0);
                    
SetPlayerSkin(playerid282);
            }
         }
       }
     } 
And i want to ads this

PHP код:
if(dialogid == DIALOG_WEAPONS)
{
if(
response// If they clicked 'Select' or double-clicked a weapon
{
// Give them the weapon
switch(listitem)
{
case 
0GivePlayerWeapon(playeridWEAPON_DEAGLE14); // Give them a desert eagle
case 1GivePlayerWeapon(playeridWEAPON_AK47120); // Give them an AK-47
case 2GivePlayerWeapon(playeridWEAPON_SHOTGSPA2// Give them a Combat Shotgun
}
}
return 
1// We handled a dialog, so return 1. Just like OnPlayerCommandText.
}
return 
0// You MUST return 0 here! Just like OnPlayerCommandText.

Can any one help me
Reply


Messages In This Thread
Dialog - by nezo2001 - 11.12.2014, 18:56
Re: Dialog - by HY - 11.12.2014, 19:04
Re: Dialog - by UltraScripter - 11.12.2014, 19:04
Re: Dialog - by nezo2001 - 11.12.2014, 19:20
Re: Dialog - by MrViolence101 - 11.12.2014, 19:39
Re: Dialog - by nezo2001 - 11.12.2014, 19:42
Re: Dialog - by MrViolence101 - 11.12.2014, 19:43
Re: Dialog - by nezo2001 - 11.12.2014, 19:49
Re: Dialog - by MrViolence101 - 11.12.2014, 20:01
Re: Dialog - by nezo2001 - 11.12.2014, 20:21

Forum Jump:


Users browsing this thread: 1 Guest(s)