Problem Weapon Shop
#1

i don't know what is problem when i buy weapon nothing i don't have buyed weapon helpp fasttt
pawn Код:
#include <a_samp>
            public OnPlayerCommandText(playerid, cmdtext[])
            {
            if(!strcmp(cmdtext, "/shop"))
            {
            ShowPlayerDialog(playerid, 67, DIALOG_STYLE_LIST, "Weapon shop", "Knife - 100$\nChainsaw - 100$\nGrenade - 1500$\nMolotov Cocktail - 2000$\nDesert Eagle - 1150$\nSawnoff Shotgun - 1000$\nMicro SMG - 1000$/Uzi - 500$\nMP5 - 500$\nSniper Rifle - 1000$\nFlamethower - 2000$\nSatchel Charge - 5000$\nFire Extinguisher - 5000$\nDildo1 - 50$\nDildo2 - 200$\nParachute - 100$", "Buy", "Cancel");
            return 1;
            }
            return 0;
            }
            public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
            {
            if(dialogid == 67)
            {
            if(!response)
            return 1;
            switch(listitem)
    {
        case 0:
        {
        if(GetPlayerMoney(playerid) < 100)
        return SendClientMessage(playerid, 0x33FF00AA, "You don't have enough cash to buy this Weapon.");
        GivePlayerMoney(playerid, -100);
        GivePlayerWeapon(playerid, 4, 1);
        SendClientMessage(playerid, 0x33FF00AA, "You have succesfully buyed your weapon.");
        }
        case 1:
        {
        if(GetPlayerMoney(playerid) < 100)
        return SendClientMessage(playerid, 0x33FF00AA, "You don't have enough cash to buy this Weapon.");
        GivePlayerMoney(playerid, -100);
        GivePlayerWeapon(playerid, 9, 1);
        SendClientMessage(playerid, 0x33FF00AA, "You have succesfully buyed your weapon.");
        }
        case 2:
        {
        if(GetPlayerMoney(playerid) < 1500)
        return SendClientMessage(playerid, 0x33FF00AA, "You don't have enough cash to buy this Weapon.");
        GivePlayerMoney(playerid, -1500);
        GivePlayerWeapon(playerid, 16, 1);
        SendClientMessage(playerid, 0x33FF00AA, "You have succesfully buyed your weapon.");
        }
        case 3:
        {
        if(GetPlayerMoney(playerid) < 2000)
        return SendClientMessage(playerid, 0x33FF00AA, "You don't have enough cash to buy this Weapon.");
        GivePlayerMoney(playerid, -2000);
        GivePlayerWeapon(playerid, 18, 2);
        SendClientMessage(playerid, 0x33FF00AA, "You have succesfully buyed your weapon.");
        }
        case 4:
        {
        if(GetPlayerMoney(playerid) < 1150)
        return SendClientMessage(playerid, 0x33FF00AA, "You don't have enough cash to buy this Weapon.");
        GivePlayerMoney(playerid, -1150);
        GivePlayerWeapon(playerid, 24, 100);
        SendClientMessage(playerid, 0x99FF00AA, "You have succesfully buyed your weapon.");
        }
        case 5:
        {
        if(GetPlayerMoney(playerid) < 1000)
        return SendClientMessage(playerid, 0x33FF00AA, "You don't have enough cash to buy this Weapon.");
        GivePlayerMoney(playerid, -1000);
        GivePlayerWeapon(playerid, 26, 100);
        SendClientMessage(playerid, 0x33FF00AA, "You have succesfully buyed your weapon.");
        }
        case 6:
        {
        if(GetPlayerMoney(playerid) < 1000)
        return SendClientMessage(playerid, 0x33FF00AA, "You don't have enough cash to buy this Weapon.");
        GivePlayerMoney(playerid, -1000);
        GivePlayerWeapon(playerid, 28, 100);
        SendClientMessage(playerid, 0x33FF00AA, "You have succesfully buyed your weapon.");
        }
        case 7:
        {
        if(GetPlayerMoney(playerid) < 500)
        return SendClientMessage(playerid, 0x33FF00AA, "You don't have enough cash to buy this Weapon.");
        GivePlayerMoney(playerid, -500);
        GivePlayerWeapon(playerid, 29, 150);
        SendClientMessage(playerid, 0x33FF00AA, "You have succesfully buyed your weapon.");
        }
        case 8:
        {
        if(GetPlayerMoney(playerid) < 1000)
        return SendClientMessage(playerid, 0x33FF00AA, "You don't have enough cash to buy this Weapon.");
        GivePlayerMoney(playerid, -1000);
        GivePlayerWeapon(playerid, 34, 10);
        SendClientMessage(playerid, 0x33FF00AA, "You have succesfully buyed your weapon.");
        }
        case 9:
        {
        if(GetPlayerMoney(playerid) < 2000)
        return SendClientMessage(playerid, 0x33FF00AA, "You don't have enough cash to buy this Weapon.");
        GivePlayerMoney(playerid, -2000);
        GivePlayerWeapon(playerid, 37, 10);
        SendClientMessage(playerid, 0x33FF00AA, "You have succesfully buyed your weapon.");
        }
        case 10:
        {
        if(GetPlayerMoney(playerid) < 5000)
        return SendClientMessage(playerid, 0x33FF00AA, "You don't have enough cash to buy this Weapon.");
        GivePlayerMoney(playerid, -5000);
        GivePlayerWeapon(playerid, 39, 1);
        SendClientMessage(playerid, 0x33FF00AA, "You have succesfully buyed your weapon.");
        }
        case 11:
        {
        if(GetPlayerMoney(playerid) < 5000)
        return SendClientMessage(playerid, 0x33FF00AA, "You don't have enough cash to buy this Weapon.");
        GivePlayerMoney(playerid, -5000);
        GivePlayerWeapon(playerid, 42, 50);
        SendClientMessage(playerid, 0x33FF00AA, "You have succesfully buyed your weapon.");
        }
        case 12:
        {
        if(GetPlayerMoney(playerid) < 50)
        return SendClientMessage(playerid, 0x33FF00AA, "You don't have enough cash to buy this Weapon.");
        GivePlayerMoney(playerid, -50);
        GivePlayerWeapon(playerid, 11, 1);
        SendClientMessage(playerid, 0x33FF00AA, "You have succesfully buyed your weapon.");
        }
        case 13:
        {
        if(GetPlayerMoney(playerid) < 200)
        return SendClientMessage(playerid, 0x33FF00AA, "You don't have enough cash to buy this Weapon.");
        GivePlayerMoney(playerid, -200);
        GivePlayerWeapon(playerid, 12, 1);
        SendClientMessage(playerid, 0x33FF00AA, "You have succesfully buyed your weapon.");
        }
        case 14:
        {
        if(GetPlayerMoney(playerid) < 100)
        return SendClientMessage(playerid, 0x33FF00AA, "You don't have enough cash to buy this Weapon.");
        GivePlayerMoney(playerid, -100);
        GivePlayerWeapon(playerid, 46, 1);
        SendClientMessage(playerid, 0x33FF00AA, "You have succesfully buyed your weapon.");
            }
            }
            }
            return 1;
            }
Reply


Messages In This Thread
Problem Weapon Shop - by Mijata - 09.01.2015, 16:11
Re: Problem Weapon Shop - by nezo2001 - 09.01.2015, 16:14
Re: Problem Weapon Shop - by Mijata - 09.01.2015, 16:21
Re: Problem Weapon Shop - by UltraScripter - 09.01.2015, 16:27
Re: Problem Weapon Shop - by nezo2001 - 09.01.2015, 16:29
Re: Problem Weapon Shop - by Mijata - 09.01.2015, 16:34
Re: Problem Weapon Shop - by Mijata - 09.01.2015, 17:06

Forum Jump:


Users browsing this thread: 1 Guest(s)