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
#2

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    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(string, sizeof(string), "** %s hands out some cash to the Cashier", NAMEGET(playerid));
                NearMessageSender(playerid, 7, string, 0x2B95FFFF,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(string, sizeof(string), "** %s hands out some cash to the Cashier ", NAMEGET(playerid));
                NearMessageSender(playerid, 7, string, 0x2B95FFFF,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(string, sizeof(string), "** %s hands out some cash to the Cashier ", NAMEGET(playerid));
                NearMessageSender(playerid, 7, string, 0x2B95FFFF,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(string, sizeof(string), "** %s hands out some cash to the Cashier. ", NAMEGET(playerid));
                NearMessageSender(playerid, 7, string, 0x2B95FFFF,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(string, sizeof(string), "** %s hands out some cash to the Cashier. ", NAMEGET(playerid));
                NearMessageSender(playerid, 7, string, 0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                GivePlayerWeapon(playerid, 5, 1);
                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(string, sizeof(string), "** %s hands out some cash to the Cashier. ", NAMEGET(playerid));
                NearMessageSender(playerid, 7, string, 0x2B95FFFF,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(string, sizeof(string), "** %s Takes out the Cadet Gear and the Weapon`s", NAMEGET(playerid));
                NearMessageSender(playerid, 7, string, 0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                GivePlayerWeapon(playerid, 24, 64);
                SetPlayerArmour(playerid, 100.0);
                SetPlayerSkin(playerid, 71);
            }
            if (listitem == 1)// same like above that ive explained.
            {
                format(string, sizeof(string), "** %s Takes out the Officer Gear and the Weapon`s", NAMEGET(playerid));
                NearMessageSender(playerid, 7, string, 0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                GivePlayerWeapon(playerid, 24, 64);
                GivePlayerWeapon(playerid, 25, 64);
                SetPlayerArmour(playerid, 100.0);
                SetPlayerSkin(playerid, 280);
            }
            if (listitem == 2)// same like above that ive explained.
            {
                format(string, sizeof(string), "** %s Takes out the Senior Lead Officer Gear and the Weapon`s", NAMEGET(playerid));
                NearMessageSender(playerid, 7, string, 0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                GivePlayerWeapon(playerid, 24, 64);
                GivePlayerWeapon(playerid, 25, 64);
                GivePlayerWeapon(playerid, 29, 64);
                SetPlayerArmour(playerid, 100.0);
                SetPlayerSkin(playerid, 281);
            }
            if (listitem == 3)// same like above that ive explained.
            {
                format(string, sizeof(string), "** %s Takes out the Detective Gear and the Weapon`s", NAMEGET(playerid));
                NearMessageSender(playerid, 7, string, 0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                GivePlayerWeapon(playerid, 24, 64);
                GivePlayerWeapon(playerid, 25, 64);
                GivePlayerWeapon(playerid, 29, 64);
                SetPlayerArmour(playerid, 100.0);
                SetPlayerSkin(playerid, 165);
            }
            if (listitem == 4)// same like above that ive explained.
            {
                format(string, sizeof(string), "** %s Takes out the Sergeant Gear and the Weapon`s", NAMEGET(playerid));
                NearMessageSender(playerid, 7, string, 0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                GivePlayerWeapon(playerid, 24, 64);
                GivePlayerWeapon(playerid, 25, 64);
                GivePlayerWeapon(playerid, 29, 64);
                SetPlayerArmour(playerid, 100.0);
                SetPlayerSkin(playerid, 283);
            }
            if (listitem == 5)// same like above that ive explained.
            {
                format(string, sizeof(string), "** %s Takes out the Liutenant Gear and the Weapon`s", NAMEGET(playerid));
                NearMessageSender(playerid, 7, string, 0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                GivePlayerWeapon(playerid, 24, 64);
                GivePlayerWeapon(playerid, 25, 64);
                GivePlayerWeapon(playerid, 29, 64);
                SetPlayerArmour(playerid, 100.0);
                SetPlayerSkin(playerid, 286);
            }
            if (listitem == 6)// same like above that ive explained.
            {
                format(string, sizeof(string), "** %s Takes out the Captain Gear and the Weapon`s", NAMEGET(playerid));
                NearMessageSender(playerid, 7, string, 0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                GivePlayerWeapon(playerid, 24, 64);
                GivePlayerWeapon(playerid, 25, 64);
                GivePlayerWeapon(playerid, 29, 64);
                SetPlayerArmour(playerid, 100.0);
                SetPlayerSkin(playerid, 288);
            }
            if (listitem == 7)// same like above that ive explained.
            {
                format(string, sizeof(string), "** %s Takes out the Commander Gear and the Weapon`s", NAMEGET(playerid));
                NearMessageSender(playerid, 7, string, 0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                GivePlayerWeapon(playerid, 24, 64);
                GivePlayerWeapon(playerid, 25, 64);
                GivePlayerWeapon(playerid, 29, 64);
                SetPlayerArmour(playerid, 100.0);
                SetPlayerSkin(playerid, 282);
            }
            if (listitem == 8)// same like above that ive explained.
            {
                format(string, sizeof(string), "** %s Takes out the Deputy Chief Gear and the Weapon`s", NAMEGET(playerid));
                NearMessageSender(playerid, 7, string, 0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                GivePlayerWeapon(playerid, 24, 64);
                GivePlayerWeapon(playerid, 25, 64);
                GivePlayerWeapon(playerid, 29, 64);
                SetPlayerArmour(playerid, 100.0);
                SetPlayerSkin(playerid, 282);
            }
            if (listitem == 9)// same like above that ive explained.
            {
                format(string, sizeof(string), "** %s Takes out the Chief of Police Gear and the Weapon`s", NAMEGET(playerid));
                NearMessageSender(playerid, 7, string, 0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                GivePlayerWeapon(playerid, 24, 64);
                GivePlayerWeapon(playerid, 25, 64);
                GivePlayerWeapon(playerid, 29, 64);
                SetPlayerArmour(playerid, 100.0);
                SetPlayerSkin(playerid, 282);
            }
        }
    }
    if(dialogid == DIALOG_WEAPONS)
    {
        if(response) // If they clicked 'Select' or double-clicked a weapon
        {
// Give them the weapon
            switch(listitem)
            {
                case 0: GivePlayerWeapon(playerid, WEAPON_DEAGLE, 14); // Give them a desert eagle
                case 1: GivePlayerWeapon(playerid, WEAPON_AK47, 120); // Give them an AK-47
                case 2: GivePlayerWeapon(playerid, WEAPON_SHOTGSPA, 2; // Give them a Combat Shotgun
            }
        }
        return 1;
    }
    return 0; // We handled a dialog, so return 1. Just like OnPlayerCommandText.
}
Reply
#3

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
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(string, sizeof(string), "** %s hands out some cash to the Cashier", NAMEGET(playerid));
                    NearMessageSender(playerid, 7, string, 0x2B95FFFF,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(string, sizeof(string), "** %s hands out some cash to the Cashier ", NAMEGET(playerid));
                    NearMessageSender(playerid, 7, string, 0x2B95FFFF,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(string, sizeof(string), "** %s hands out some cash to the Cashier ", NAMEGET(playerid));
                    NearMessageSender(playerid, 7, string, 0x2B95FFFF,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(string, sizeof(string), "** %s hands out some cash to the Cashier. ", NAMEGET(playerid));
                    NearMessageSender(playerid, 7, string, 0x2B95FFFF,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(string, sizeof(string), "** %s hands out some cash to the Cashier. ", NAMEGET(playerid));
                    NearMessageSender(playerid, 7, string, 0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                    GivePlayerWeapon(playerid, 5, 1);
                    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(string, sizeof(string), "** %s hands out some cash to the Cashier. ", NAMEGET(playerid));
                    NearMessageSender(playerid, 7, string, 0x2B95FFFF,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(string, sizeof(string), "** %s Takes out the Cadet Gear and the Weapon`s", NAMEGET(playerid));
                    NearMessageSender(playerid, 7, string, 0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                    GivePlayerWeapon(playerid, 24, 64);
                    SetPlayerArmour(playerid, 100.0);
                    SetPlayerSkin(playerid, 71);
            }
            if (listitem == 1)// same like above that ive explained.
            {
            format(string, sizeof(string), "** %s Takes out the Officer Gear and the Weapon`s", NAMEGET(playerid));
                    NearMessageSender(playerid, 7, string, 0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                    GivePlayerWeapon(playerid, 24, 64);
                    GivePlayerWeapon(playerid, 25, 64);
                    SetPlayerArmour(playerid, 100.0);
                    SetPlayerSkin(playerid, 280);
            }
            if (listitem == 2)// same like above that ive explained.
            {
                        format(string, sizeof(string), "** %s Takes out the Senior Lead Officer Gear and the Weapon`s", NAMEGET(playerid));
                    NearMessageSender(playerid, 7, string, 0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                    GivePlayerWeapon(playerid, 24, 64);
                    GivePlayerWeapon(playerid, 25, 64);
                    GivePlayerWeapon(playerid, 29, 64);
                    SetPlayerArmour(playerid, 100.0);
                    SetPlayerSkin(playerid, 281);
            }
            if (listitem == 3)// same like above that ive explained.
            {
            format(string, sizeof(string), "** %s Takes out the Detective Gear and the Weapon`s", NAMEGET(playerid));
                    NearMessageSender(playerid, 7, string, 0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                    GivePlayerWeapon(playerid, 24, 64);
                    GivePlayerWeapon(playerid, 25, 64);
                    GivePlayerWeapon(playerid, 29, 64);
                    SetPlayerArmour(playerid, 100.0);
                    SetPlayerSkin(playerid, 165);
            }
            if (listitem == 4)// same like above that ive explained.
            {
            format(string, sizeof(string), "** %s Takes out the Sergeant Gear and the Weapon`s", NAMEGET(playerid));
                    NearMessageSender(playerid, 7, string, 0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                    GivePlayerWeapon(playerid, 24, 64);
                    GivePlayerWeapon(playerid, 25, 64);
                    GivePlayerWeapon(playerid, 29, 64);
                    SetPlayerArmour(playerid, 100.0);
                    SetPlayerSkin(playerid, 283);
            }
            if (listitem == 5)// same like above that ive explained.
            {
            format(string, sizeof(string), "** %s Takes out the Liutenant Gear and the Weapon`s", NAMEGET(playerid));
                    NearMessageSender(playerid, 7, string, 0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                    GivePlayerWeapon(playerid, 24, 64);
                    GivePlayerWeapon(playerid, 25, 64);
                    GivePlayerWeapon(playerid, 29, 64);
                    SetPlayerArmour(playerid, 100.0);
                    SetPlayerSkin(playerid, 286);
            }
            if (listitem == 6)// same like above that ive explained.
            {
            format(string, sizeof(string), "** %s Takes out the Captain Gear and the Weapon`s", NAMEGET(playerid));
                    NearMessageSender(playerid, 7, string, 0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                    GivePlayerWeapon(playerid, 24, 64);
                    GivePlayerWeapon(playerid, 25, 64);
                    GivePlayerWeapon(playerid, 29, 64);
                    SetPlayerArmour(playerid, 100.0);
                    SetPlayerSkin(playerid, 288);
            }
            if (listitem == 7)// same like above that ive explained.
            {
            format(string, sizeof(string), "** %s Takes out the Commander Gear and the Weapon`s", NAMEGET(playerid));
                    NearMessageSender(playerid, 7, string, 0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                    GivePlayerWeapon(playerid, 24, 64);
                    GivePlayerWeapon(playerid, 25, 64);
                    GivePlayerWeapon(playerid, 29, 64);
                    SetPlayerArmour(playerid, 100.0);
                    SetPlayerSkin(playerid, 282);
            }
            if (listitem == 8)// same like above that ive explained.
            {
            format(string, sizeof(string), "** %s Takes out the Deputy Chief Gear and the Weapon`s", NAMEGET(playerid));
                    NearMessageSender(playerid, 7, string, 0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                    GivePlayerWeapon(playerid, 24, 64);
                    GivePlayerWeapon(playerid, 25, 64);
                    GivePlayerWeapon(playerid, 29, 64);
                    SetPlayerArmour(playerid, 100.0);
                    SetPlayerSkin(playerid, 282);
            }
            if (listitem == 9)// same like above that ive explained.
            {
            format(string, sizeof(string), "** %s Takes out the Chief of Police Gear and the Weapon`s", NAMEGET(playerid));
                    NearMessageSender(playerid, 7, string, 0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF,0x2B95FFFF);
                    GivePlayerWeapon(playerid, 24, 64);
                    GivePlayerWeapon(playerid, 25, 64);
                    GivePlayerWeapon(playerid, 29, 64);
                    SetPlayerArmour(playerid, 100.0);
                    SetPlayerSkin(playerid, 282);
            }
         }
       }
     }
     if(dialogid == DIALOG_WEAPONS)
{
if(response) // If they clicked 'Select' or double-clicked a weapon
{
// Give them the weapon
switch(listitem)
{
case 0: GivePlayerWeapon(playerid, WEAPON_DEAGLE, 14); // Give them a desert eagle
case 1: GivePlayerWeapon(playerid, WEAPON_AK47, 120); // Give them an AK-47
case 2: GivePlayerWeapon(playerid, WEAPON_SHOTGSPA, 2; // 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.
}
Reply
#4

Guys when i choose a weapon the checkpoint disapear i want it to to still on it's place and still opening to choose. Translation :-

If the player choose ak-47 it gives him ak-47 but then it close and disapear
i want when the player choose ak-47 it must give the player ak-47 and still opening and player can choose ak-47 again

I'm sorry because i am asking alot but you are the best and i am learing from you.
Please help me
Reply
#5

Are you using dynamic checkpoints or normal ones?
Reply
#6

Quote:
Originally Posted by MrViolence101
Посмотреть сообщение
Are you using dynamic checkpoints or normal ones?
PHP код:
SetPlayerCheckpoint(playerid2743.8545,-2454.1199,13.86233.0); 
This is normal i think
Reply
#7

Yes, Dynamic checkpoints is more trustable, if i were you i would change to dynamic ones. All you need to do is download the latest streamer includes and plugins for your server. the includes would go to your Pawno include folder.
Reply
#8

Quote:
Originally Posted by MrViolence101
Посмотреть сообщение
Yes, Dynamic checkpoints is more trustable, if i were you i would change to dynamic ones. All you need to do is download the latest streamer includes and plugins for your server. the includes would go to your Pawno include folder.
I have just updated it two days ago and i think there is other solution
Plz help
Reply
#9

Explain be thorougly what the problem is. Whats wrong?
Reply
#10

Ok , When i enter the checkpoint the menu appear then i choose the weapon and then it disapear from the world i want when i choose the weapon the menu still open and let me to choose again untill i click close and it still at the world plzzzzz help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)