OnDialogResponse (Dialog_Style_Input) need help! T_T
#10

pawn Код:
switch(strval(inputtext))
{
        //Some more here, for example: case 9:
        case 10:
        {
            if(GetPlayerMoney(playerid) < 9000) return SendClientMessage(playerid, 0xFFFFFFFF, NEC);
            else
            {
                GivePlayerMoney(playerid, -9000);
                GivePlayerWeapon(playerid, 33, 800);
                SendClientMessage(playerid, 0xFFFFFFFF, "Buying weapon success.");
            }
        }
        case 11:
        {
            if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, 0xFFFFFFFF, NEC);
            else
            {
                GivePlayerMoney(playerid, -10000);
                GivePlayerWeapon(playerid, 34, 800);
                SendClientMessage(playerid, 0xFFFFFFFF, "Buying weapon success.");
            }
        }
        case 12:
        {
            if(GetPlayerMoney(playerid) < 6500) return SendClientMessage(playerid, 0xFFFFFFFF, NEC);
            else
            {
                GivePlayerMoney(playerid, -6500);
                GivePlayerWeapon(playerid, 30, 1000);
                SendClientMessage(playerid, 0xFFFFFFFF, "Buying weapon success.");
            }
        }
        case 13:
        {
            if(GetPlayerMoney(playerid) < 7000) return SendClientMessage(playerid, 0xFFFFFFFF, NEC);
            else
            {
                GivePlayerMoney(playerid, -7000);
                GivePlayerWeapon(playerid, 31, 1000);
                SendClientMessage(playerid, 0xFFFFFFFF, "Buying weapon success.");
            }
        }
        case 14:
        {
            if(GetPlayerMoney(playerid) < 300) return SendClientMessage(playerid, 0xFFFFFFFF, NEC);
            else
            {
                GivePlayerMoney(playerid, -300);
                SetPlayerHealth(playerid, 100);
                SetPlayerArmour(playerid, 100);
                SendClientMessage(playerid, 0xFFFFFFFF, "Buying weapon success.");
            }
        }
}
Actually #5 and #7 are correct. You get wrong weapon is because the parameters in your GivePlayerWeapon are wrong.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)