OnDialogResponse isn't working
#1

When using the command:
pawn Код:
CMD:supply(playerid, params[])
{
    if(!IsPlayerInRangeOfPoint(playerid, 50, 1064.64, 2140.40, 10.9)) return SendClientMessage(playerid, -1, "You can only get supplies from the Department of Protection");
    {
        ShowPlayerDialog(playerid, 11112, DIALOG_STYLE_LIST, "Please make a weapon order", "Weapons\nFirst aid kits and vests\nAntidevoxal\nMap\nFood\nBULK PURCHASE", "Select", "Close");
    }
    return 1;
}
It opens the dialog showing the list... But when I click the items in the list, nothing happens.
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 11112)
    {
        if(response)
        {
            if(listitem == 0)
            {
                ShowPlayerDialog(playerid, 22221, DIALOG_STYLE_LIST, "Make a weapon order", "Deagle - 2,000\nSpas-12 - 5,000\nM4 - $3,900\nSniper - $3,700\nAK-47 - $3500\nMP5 - $1,500\nFlamethrower - $10,000Shovel - $60\nBat - $50\nKnife - $25\nChainsaw - $7,000", "Purchase", "Cancel order");
            }
            if(listitem == 1)
            {
                ShowPlayerDialog(playerid, 33331, DIALOG_STYLE_LIST, "First aid & vest order", "First aid kit - $4,500\nVest - $6,000", "Purchase", "Cancel order");
            }
            if(listitem == 2)
            {
                ShowPlayerDialog(playerid, 44441, DIALOG_STYLE_MSGBOX, "Department of Protection", "The Department of Protection (DOP) are currently\nworking on a cure called Antidevoxal.  An Antidevoxal\nwill cure infected human beings from the Vox virus.", "Okay", "");
            }
            if(listitem == 3)
            {
                ShowPlayerDialog(playerid, 66661, DIALOG_STYLE_MSGBOX, "Department of Protection", "There are currently no maps in stock at this department.\nVisit a D.O.P in another state for more supples!", "Okay", "");
            }
            if(listitem == 4)
            {
                ShowPlayerDialog(playerid, 77771, DIALOG_STYLE_MSGBOX, "Department of Protection", "There is no food available at this department.\nVisit a D.O.P in another state for more supplies!", "Okay", "");
            }
            if(listitem == 5)
            {
                ShowPlayerDialog(playerid, 88881, DIALOG_STYLE_LIST, "BULK BUY (SETTLEMENT SUPPORT SCHEME)", "Bulk buy weapons - $30,000\nBulk buy kits/armour - $10,000\nBulk buy maps\nBulk buy food", "Select", "Cancel");
            }
        }
    }

    if(dialogid == 22221)
    {
        if(response)
        {
            if(listitem == 0)
            {
                if(GetPlayerMoney(playerid) < 2000) return SendClientMessage(playerid, -1, "You don't have enough money to make an order for this item!");
                {
                    GivePlayerWeapon(playerid, 24, 200);
                    GivePlayerMoney(playerid, -2000);
                    SendClientMessage(playerid, -1, "AUTOMATED MESSAGE: Your order has been processed.  You have purchased a Deagle from the Department of Protection");
                    SendClientMessage(playerid, -1, "AUTOMATED MESSAGE: Stay safe out there, it's very dangerous! Group up, stay together and stay away from populated areas.");
                }
            }
            if(listitem == 1)
            {
                if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid, -1, "You don't have enough money to make an order for this item!");
                {
                    GivePlayerWeapon(playerid, 27, 250);
                    GivePlayerMoney(playerid, -5000);
                    SendClientMessage(playerid, -1, "AUTOMATED MESSAGE: Your order has been processed.  You have purchased a Spas12 from the Department of Protection");
                    SendClientMessage(playerid, -1, "AUTOMATED MESSAGE: Stay safe out there, it's very dangerous! Group up, stay together and stay away from populated areas.");
                }
            }
            if(listitem == 2)
            {
                if(GetPlayerMoney(playerid) < 3900) return SendClientMessage(playerid, -1, "You don't have enough money to make an order for this item!");
                {
                    GivePlayerWeapon(playerid, 31, 400);
                    GivePlayerMoney(playerid, -3900);
                    SendClientMessage(playerid, -1, "AUTOMATED MESSAGE: Your order has been processed.  You have purchased an M4 from the Department of Protection");
                    SendClientMessage(playerid, -1, "AUTOMATED MESSAGE: Stay safe out there, it's very dangerous! Group up, stay together and stay away from populated areas.");
                }
            }
            if(listitem == 3)
            {
                if(GetPlayerMoney(playerid) < 3700) return SendClientMessage(playerid, -1, "You don't have enough money to make an order for this item!");
                {
                    GivePlayerWeapon(playerid, 34, 200);
                    GivePlayerMoney(playerid, -3700);
                    SendClientMessage(playerid, -1, "AUTOMATED MESSAGE: Your order has been processed.  You have purchased a Sniper from the Department of Protection");
                    SendClientMessage(playerid, -1, "AUTOMATED MESSAGE: Stay safe out there, it's very dangerous! Group up, stay together and stay away from populated areas.");
                }
            }
            if(listitem == 4)
            {
                if(GetPlayerMoney(playerid) < 3500) return SendClientMessage(playerid, -1, "You don't have enough money to make an order for this item!");
                {
                    GivePlayerWeapon(playerid, 30, 400);
                    GivePlayerMoney(playerid, -3500);
                    SendClientMessage(playerid, -1, "AUTOMATED MESSAGE: Your order has been processed.  You have purchased an AK-47 from the Department of Protection");
                    SendClientMessage(playerid, -1, "AUTOMATED MESSAGE: Stay safe out there, it's very dangerous! Group up, stay together and stay away from populated areas.");
                }
            }
            if(listitem == 5)
            {
                if(GetPlayerMoney(playerid) < 1500) return SendClientMessage(playerid, -1, "You don't have enough money to make an order for this item!");
                {
                    GivePlayerWeapon(playerid, 29, 200);
                    GivePlayerMoney(playerid, -1500);
                    SendClientMessage(playerid, -1, "AUTOMATED MESSAGE: Your order has been processed.  You have purchased an MP5 from the Department of Protection");
                    SendClientMessage(playerid, -1, "AUTOMATED MESSAGE: Stay safe out there, it's very dangerous! Group up, stay together and stay away from populated areas.");
                }
            }
            if(listitem == 6)
            {
                if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, -1, "You don't have enough money to make an order for this item!");
                {
                    GivePlayerWeapon(playerid, 37, 300);
                    GivePlayerMoney(playerid, -10000);
                    SendClientMessage(playerid, -1, "AUTOMATED MESSAGE: Your order has been processed.  You have purchased an Flame Thrower from the Department of Protection");
                    SendClientMessage(playerid, -1, "AUTOMATED MESSAGE: Stay safe out there, it's very dangerous! Group up, stay together and stay away from populated areas.");
                }
            }
            if(listitem == 7)
            {
                if(GetPlayerMoney(playerid) < 60) return SendClientMessage(playerid, -1, "You don't have enough money to make an order for this item!");
                {
                    GivePlayerWeapon(playerid, 6, 200);
                    GivePlayerMoney(playerid, -60);
                    SendClientMessage(playerid, -1, "AUTOMATED MESSAGE: Your order has been processed.  You have purchased a Shovel from the Department of Protection");
                    SendClientMessage(playerid, -1, "AUTOMATED MESSAGE: Stay safe out there, it's very dangerous! Group up, stay together and stay away from populated areas.");
                }
            }
            if(listitem == 8)
            {
                if(GetPlayerMoney(playerid) < 50) return SendClientMessage(playerid, -1, "You don't have enough money to make an order for this item!");
                {
                    GivePlayerWeapon(playerid, 5, 200);
                    GivePlayerMoney(playerid, -50);
                    SendClientMessage(playerid, -1, "AUTOMATED MESSAGE: Your order has been processed.  You have purchased a Bat from the Department of Protection");
                    SendClientMessage(playerid, -1, "AUTOMATED MESSAGE: Stay safe out there, it's very dangerous! Group up, stay together and stay away from populated areas.");
                }
            }
            if(listitem == 9)
            {
                if(GetPlayerMoney(playerid) < 25) return SendClientMessage(playerid, -1, "You don't have enough money to make an order for this item!");
                {
                    GivePlayerWeapon(playerid, 4, 200);
                    GivePlayerMoney(playerid, -25);
                    SendClientMessage(playerid, -1, "AUTOMATED MESSAGE: Your order has been processed.  You have purchased a Knife from the Department of Protection");
                    SendClientMessage(playerid, -1, "AUTOMATED MESSAGE: Stay safe out there, it's very dangerous! Group up, stay together and stay away from populated areas.");
                }
            }
            if(listitem == 10)
            {
                if(GetPlayerMoney(playerid) < 7000) return SendClientMessage(playerid, -1, "You don't have enough money to make an order for this item!");
                {
                    GivePlayerWeapon(playerid, 9, 200);
                    GivePlayerMoney(playerid, -7000);
                    SendClientMessage(playerid, -1, "AUTOMATED MESSAGE: Your order has been processed.  You have purchased a Chainsaw from the Department of Protection");
                    SendClientMessage(playerid, -1, "AUTOMATED MESSAGE: Stay safe out there, it's very dangerous! Group up, stay together and stay away from populated areas.");
                }
            }
        }
    }
    if(dialogid == 3331)
    {
        if(response)
        {
            if(listitem == 0)
            {
                if(GetPlayerMoney(playerid) < 4500) return SendClientMessage(playerid, -1, "You don't have enough money to make an order for this item!");
                {
                    SetPlayerHealth(playerid, 100);
                    GivePlayerMoney(playerid, -4500);
                    SendClientMessage(playerid, -1, "AUTOMATED MESSAGE: Your order has been processed.  You have purchased a First aid kit from the Department of Protection");
                    SendClientMessage(playerid, -1, "AUTOMATED MESSAGE: Stay safe out there, it's very dangerous! Group up, stay together and stay away from populated areas.");
                }
            }
            if(listitem == 1)
            {
                if(GetPlayerMoney(playerid) < 6000) return SendClientMessage(playerid, -1, "You don't have enough money to make an order for this item!");
                {
                    SetPlayerArmour(playerid, 100);
                    GivePlayerMoney(playerid, -6000);
                    SendClientMessage(playerid, -1, "AUTOMATED MESSAGE: Your order has been processed.  You have purchased a Vest from the Department of Protection");
                    SendClientMessage(playerid, -1, "AUTOMATED MESSAGE: Stay safe out there, it's very dangerous! Group up, stay together and stay away from populated areas.");
                }
            }
        }
    }
    if(dialogid == 88881)
    {
        if(response)
        {
            if(listitem == 0)
            {
                if(GetPlayerMoney(playerid) < 30000) return SendClientMessage(playerid, -1, "You don't have enough money to make an order for this item!");
                {
                    GivePlayerWeapon(playerid, 24, 200);
                    GivePlayerWeapon(playerid, 27, 250);
                    GivePlayerWeapon(playerid, 31, 400);
                    GivePlayerWeapon(playerid, 34, 200);
                    GivePlayerWeapon(playerid, 30, 400);
                    GivePlayerWeapon(playerid, 29, 300);
                    GivePlayerWeapon(playerid, 37, 200);
                    GivePlayerWeapon(playerid, 6, 200);
                    GivePlayerWeapon(playerid, 5, 200);
                    GivePlayerWeapon(playerid, 4, 200);
                    GivePlayerWeapon(playerid, 9, 200);
                    GivePlayerMoney(playerid, -30000);
                    SendClientMessage(playerid, -1, "AUTOMATED MESSAGE: You have bought one each of every weapon in bulk purchase.  You paid $30,000 and saved $6,000!");
                    SendClientMessage(playerid, -1, "AUTOMATED MESSAGE: Stay safe courageous survivor. The outskirts of Los Santos are unsafe.");
                }
            }
            if(listitem == 1)
            {
                if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, -1, "You don't have enough money to make an order for this item!");
                {
                    SetPlayerHealth(playerid, 100);
                    SetPlayerArmour(playerid, 100);
                    GivePlayerMoney(playerid, -10000);
                    SendClientMessage(playerid, -1, "AUTOMATED MESSAGE: You have bought a first aid kit and vest in bulk purchase.  You paid $10,000 and saved $500!");
                }
            }
        }
    }
    return 0;
}
It's a filterscript by the way

Thanks
Reply
#2

Max dialogid is 32767. Using negative values will close any open dialog.
Reduce your dialog ID's, and you'd better switch(listitem)
Reply
#3

Thanks, but still doesn't work. Nothing happens when I click on one of the options.

Changed the dialog ID's and changed it to switch(listitem) and used cases etc.
Reply
#4

bump
Reply
#5

Quote:
Originally Posted by Shinja
Посмотреть сообщение
Max dialogid is 32767. Using negative values will close any open dialog.
Reduce your dialog ID's, and you'd better switch(listitem)
Well as Shinja said you kinda exceeded the max dialog id. I'd suggest you to create a dialogid enum and just switch through them, not only it increases the optimization of your script but also gives your script a decent readability also saves you from the effort of searching through IDs to figure out which ID you've used last.

Try reducing your dialog IDs. Switch instead of listitem isn't really mandatory but is recommended to increase readability&optimization.
Reply
#6

I already did that all man, sub-dialog still won't show up! Don't know why?
Reply
#7

Fixed script:

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == 11112)
    {
        if(
response)
        {
            if(
listitem == 0)
            {
                
ShowPlayerDialog(playerid22221DIALOG_STYLE_LIST"Make a weapon order""Deagle - 2,000\nSpas-12 - 5,000\nM4 - $3,900\nSniper - $3,700\nAK-47 - $3500\nMP5 - $1,500\nFlamethrower - $10,000Shovel - $60\nBat - $50\nKnife - $25\nChainsaw - $7,000""Purchase""Cancel order");
            }
            if(
listitem == 1)
            {
                
ShowPlayerDialog(playerid33331DIALOG_STYLE_LIST"First aid & vest order""First aid kit - $4,500\nVest - $6,000""Purchase""Cancel order");
            }
            if(
listitem == 2)
            {
                
ShowPlayerDialog(playerid44441DIALOG_STYLE_MSGBOX"Department of Protection""The Department of Protection (DOP) are currently\nworking on a cure called Antidevoxal.  An Antidevoxal\nwill cure infected human beings from the Vox virus.""Okay""");
            }
            if(
listitem == 3)
            {
                
ShowPlayerDialog(playerid66661DIALOG_STYLE_MSGBOX"Department of Protection""There are currently no maps in stock at this department.\nVisit a D.O.P in another state for more supples!""Okay""");
            }
            if(
listitem == 4)
            {
                
ShowPlayerDialog(playerid77771DIALOG_STYLE_MSGBOX"Department of Protection""There is no food available at this department.\nVisit a D.O.P in another state for more supplies!""Okay""");
            }
            if(
listitem == 5)
            {
                
ShowPlayerDialog(playerid88881DIALOG_STYLE_LIST"BULK BUY (SETTLEMENT SUPPORT SCHEME)""Bulk buy weapons - $30,000\nBulk buy kits/armour - $10,000\nBulk buy maps\nBulk buy food""Select""Cancel");
            }
        }
    }
    if(
dialogid == 22221)
    {
        if(
response)
        {
            if(
listitem == 0)
            {
                if(
GetPlayerMoney(playerid) < 2000) return SendClientMessage(playerid, -1"You don't have enough money to make an order for this item!");
                {
                    
GivePlayerWeapon(playerid24200);
                    
GivePlayerMoney(playerid, -2000);
                    
SendClientMessage(playerid, -1"AUTOMATED MESSAGE: Your order has been processed.  You have purchased a Deagle from the Department of Protection");
                    
SendClientMessage(playerid, -1"AUTOMATED MESSAGE: Stay safe out there, it's very dangerous! Group up, stay together and stay away from populated areas.");
                }
            }
            if(
listitem == 1)
            {
                if(
GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid, -1"You don't have enough money to make an order for this item!");
                {
                    
GivePlayerWeapon(playerid27250);
                    
GivePlayerMoney(playerid, -5000);
                    
SendClientMessage(playerid, -1"AUTOMATED MESSAGE: Your order has been processed.  You have purchased a Spas12 from the Department of Protection");
                    
SendClientMessage(playerid, -1"AUTOMATED MESSAGE: Stay safe out there, it's very dangerous! Group up, stay together and stay away from populated areas.");
                }
            }
            if(
listitem == 2)
            {
                if(
GetPlayerMoney(playerid) < 3900) return SendClientMessage(playerid, -1"You don't have enough money to make an order for this item!");
                {
                    
GivePlayerWeapon(playerid31400);
                    
GivePlayerMoney(playerid, -3900);
                    
SendClientMessage(playerid, -1"AUTOMATED MESSAGE: Your order has been processed.  You have purchased an M4 from the Department of Protection");
                    
SendClientMessage(playerid, -1"AUTOMATED MESSAGE: Stay safe out there, it's very dangerous! Group up, stay together and stay away from populated areas.");
                }
            }
            if(
listitem == 3)
            {
                if(
GetPlayerMoney(playerid) < 3700) return SendClientMessage(playerid, -1"You don't have enough money to make an order for this item!");
                {
                    
GivePlayerWeapon(playerid34200);
                    
GivePlayerMoney(playerid, -3700);
                    
SendClientMessage(playerid, -1"AUTOMATED MESSAGE: Your order has been processed.  You have purchased a Sniper from the Department of Protection");
                    
SendClientMessage(playerid, -1"AUTOMATED MESSAGE: Stay safe out there, it's very dangerous! Group up, stay together and stay away from populated areas.");
                }
            }
            if(
listitem == 4)
            {
                if(
GetPlayerMoney(playerid) < 3500) return SendClientMessage(playerid, -1"You don't have enough money to make an order for this item!");
                {
                    
GivePlayerWeapon(playerid30400);
                    
GivePlayerMoney(playerid, -3500);
                    
SendClientMessage(playerid, -1"AUTOMATED MESSAGE: Your order has been processed.  You have purchased an AK-47 from the Department of Protection");
                    
SendClientMessage(playerid, -1"AUTOMATED MESSAGE: Stay safe out there, it's very dangerous! Group up, stay together and stay away from populated areas.");
                }
            }
            if(
listitem == 5)
            {
                if(
GetPlayerMoney(playerid) < 1500) return SendClientMessage(playerid, -1"You don't have enough money to make an order for this item!");
                {
                    
GivePlayerWeapon(playerid29200);
                    
GivePlayerMoney(playerid, -1500);
                    
SendClientMessage(playerid, -1"AUTOMATED MESSAGE: Your order has been processed.  You have purchased an MP5 from the Department of Protection");
                    
SendClientMessage(playerid, -1"AUTOMATED MESSAGE: Stay safe out there, it's very dangerous! Group up, stay together and stay away from populated areas.");
                }
            }
            if(
listitem == 6)
            {
                if(
GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, -1"You don't have enough money to make an order for this item!");
                {
                    
GivePlayerWeapon(playerid37300);
                    
GivePlayerMoney(playerid, -10000);
                    
SendClientMessage(playerid, -1"AUTOMATED MESSAGE: Your order has been processed.  You have purchased an Flame Thrower from the Department of Protection");
                    
SendClientMessage(playerid, -1"AUTOMATED MESSAGE: Stay safe out there, it's very dangerous! Group up, stay together and stay away from populated areas.");
                }
            }
            if(
listitem == 7)
            {
                if(
GetPlayerMoney(playerid) < 60) return SendClientMessage(playerid, -1"You don't have enough money to make an order for this item!");
                {
                    
GivePlayerWeapon(playerid6200);
                    
GivePlayerMoney(playerid, -60);
                    
SendClientMessage(playerid, -1"AUTOMATED MESSAGE: Your order has been processed.  You have purchased a Shovel from the Department of Protection");
                    
SendClientMessage(playerid, -1"AUTOMATED MESSAGE: Stay safe out there, it's very dangerous! Group up, stay together and stay away from populated areas.");
                }
            }
            if(
listitem == 8)
            {
                if(
GetPlayerMoney(playerid) < 50) return SendClientMessage(playerid, -1"You don't have enough money to make an order for this item!");
                {
                    
GivePlayerWeapon(playerid5200);
                    
GivePlayerMoney(playerid, -50);
                    
SendClientMessage(playerid, -1"AUTOMATED MESSAGE: Your order has been processed.  You have purchased a Bat from the Department of Protection");
                    
SendClientMessage(playerid, -1"AUTOMATED MESSAGE: Stay safe out there, it's very dangerous! Group up, stay together and stay away from populated areas.");
                }
            }
            if(
listitem == 9)
            {
                if(
GetPlayerMoney(playerid) < 25) return SendClientMessage(playerid, -1"You don't have enough money to make an order for this item!");
                {
                    
GivePlayerWeapon(playerid4200);
                    
GivePlayerMoney(playerid, -25);
                    
SendClientMessage(playerid, -1"AUTOMATED MESSAGE: Your order has been processed.  You have purchased a Knife from the Department of Protection");
                    
SendClientMessage(playerid, -1"AUTOMATED MESSAGE: Stay safe out there, it's very dangerous! Group up, stay together and stay away from populated areas.");
                }
            }
            if(
listitem == 10)
            {
                if(
GetPlayerMoney(playerid) < 7000) return SendClientMessage(playerid, -1"You don't have enough money to make an order for this item!");
                {
                    
GivePlayerWeapon(playerid9200);
                    
GivePlayerMoney(playerid, -7000);
                    
SendClientMessage(playerid, -1"AUTOMATED MESSAGE: Your order has been processed.  You have purchased a Chainsaw from the Department of Protection");
                    
SendClientMessage(playerid, -1"AUTOMATED MESSAGE: Stay safe out there, it's very dangerous! Group up, stay together and stay away from populated areas.");
                }
            }
        }
    }
    if(
dialogid == 3331)
    {
        if(
response)
        {
            if(
listitem == 0)
            {
                if(
GetPlayerMoney(playerid) < 4500) return SendClientMessage(playerid, -1"You don't have enough money to make an order for this item!");
                {
                    
SetPlayerHealth(playerid100);
                    
GivePlayerMoney(playerid, -4500);
                    
SendClientMessage(playerid, -1"AUTOMATED MESSAGE: Your order has been processed.  You have purchased a First aid kit from the Department of Protection");
                    
SendClientMessage(playerid, -1"AUTOMATED MESSAGE: Stay safe out there, it's very dangerous! Group up, stay together and stay away from populated areas.");
                }
            }
            if(
listitem == 1)
            {
                if(
GetPlayerMoney(playerid) < 6000) return SendClientMessage(playerid, -1"You don't have enough money to make an order for this item!");
                {
                    
SetPlayerArmour(playerid100);
                    
GivePlayerMoney(playerid, -6000);
                    
SendClientMessage(playerid, -1"AUTOMATED MESSAGE: Your order has been processed.  You have purchased a Vest from the Department of Protection");
                    
SendClientMessage(playerid, -1"AUTOMATED MESSAGE: Stay safe out there, it's very dangerous! Group up, stay together and stay away from populated areas.");
                }
            }
        }
    }
    if(
dialogid == 88881)
    {
        if(
response)
        {
            if(
listitem == 0)
            {
                if(
GetPlayerMoney(playerid) < 30000) return SendClientMessage(playerid, -1"You don't have enough money to make an order for this item!");
                {
                    
GivePlayerWeapon(playerid24200);
                    
GivePlayerWeapon(playerid27250);
                    
GivePlayerWeapon(playerid31400);
                    
GivePlayerWeapon(playerid34200);
                    
GivePlayerWeapon(playerid30400);
                    
GivePlayerWeapon(playerid29300);
                    
GivePlayerWeapon(playerid37200);
                    
GivePlayerWeapon(playerid6200);
                    
GivePlayerWeapon(playerid5200);
                    
GivePlayerWeapon(playerid4200);
                    
GivePlayerWeapon(playerid9200);
                    
GivePlayerMoney(playerid, -30000);
                    
SendClientMessage(playerid, -1"AUTOMATED MESSAGE: You have bought one each of every weapon in bulk purchase.  You paid $30,000 and saved $6,000!");
                    
SendClientMessage(playerid, -1"AUTOMATED MESSAGE: Stay safe courageous survivor. The outskirts of Los Santos are unsafe.");
                }
            }
            if(
listitem == 1)
            {
                if(
GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, -1"You don't have enough money to make an order for this item!");
                {
                    
SetPlayerHealth(playerid100);
                    
SetPlayerArmour(playerid100);
                    
GivePlayerMoney(playerid, -10000);
                    
SendClientMessage(playerid, -1"AUTOMATED MESSAGE: You have bought a first aid kit and vest in bulk purchase.  You paid $10,000 and saved $500!");
                }
            }
        }
       return 
1;
    }
    return 
0;

There should also be a "return 1;" at the end. Please calculate the braces and place the "return 1;" where it should be IF THERE ARE ERRORS.

Visit this: Click here
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)