Unknown Command
#1

hey all i have a little probleme again ....
this time it's about commands
when i join he server and i type /shop nothing happen
pawn Код:
CMD:shop(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 40, 286.148986,-40.644397,1001.515625) || IsPlayerInRangeOfPoint(playerid, 40, 286.800994,-82.547599,1001.515625) || IsPlayerInRangeOfPoint(playerid, 40, 296.919982,-108.071998,1001.515625) || IsPlayerInRangeOfPoint(playerid, 40, 314.820983,-141.431991,999.601562) || IsPlayerInRangeOfPoint(playerid, 40, 316.524993,-167.706985,999.593750))
    ShowPlayerDialog(playerid, DIALOGWEAPONS, DIALOG_STYLE_LIST, "Hello, need gun ??", "Deagle(15k)\nShotgun(2.5k)\nMP5(2k)\nSpas12(5k)\nAK-47(3k)\nM4(3.5k)\nSniper(1k)\nHalf vest(5k)\nFull vest(2.5k)","Buy","Cancel");
    return 1;
}
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
if(dialogid == DIALOGWEAPONS)
    {
        if(response)
        {
            switch(listitem)
            {
                case 0:
            {
                if(GetPlayerMoney(playerid) <1500) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to buy this item! chea!");
                SendClientMessage(playerid, COLOR_GREEN , "You bought a deagle!");
                GivePlayerMoney(playerid, -1500);
                GivePlayerWeapon(playerid,24, 9999999);
            }
                case 1:
            {
                if(GetPlayerMoney(playerid) <2500) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to buy this item!");
                SendClientMessage(playerid, COLOR_GREEN , "You bought a shotgun ");
                GivePlayerMoney(playerid, -2500);
                GivePlayerWeapon(playerid, 25, 9999999);
            }
                case 2:
            {
                if(GetPlayerMoney(playerid) <2000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to buy this item!");
                SendClientMessage(playerid, COLOR_GREEN , "You bought an MP5!");
                GivePlayerMoney(playerid, -2000);
                GivePlayerWeapon(playerid, 29 ,9999999);
            }
                case 3:
            {
                if(GetPlayerMoney(playerid) <5000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to buy this item!");
                SendClientMessage(playerid, COLOR_GREEN , "You bought a spas");
                GivePlayerMoney(playerid, -5000);
                GivePlayerWeapon(playerid, 27, 9999999);
            }
                case 4:
            {
                if(GetPlayerMoney(playerid) <3000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to buy this item!");
                SendClientMessage(playerid, COLOR_GREEN , "You bought an AK-47 for 50k!");
                GivePlayerMoney(playerid, -3000);
                GivePlayerWeapon(playerid,30 ,9999999);
            }
                case 5:
            {
                if(GetPlayerMoney(playerid) <3500) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to buy this item!");
                SendClientMessage(playerid, COLOR_GREEN , "You bought an M4 for 60k!");
                GivePlayerMoney(playerid, -3500);
                GivePlayerWeapon(playerid, 31, 9999999);
            }
                case 6:
            {
                if(GetPlayerMoney(playerid) <10000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to buy this item!");
                SendClientMessage(playerid, COLOR_GREEN , "You bought a sniper for 150k!");
                GivePlayerMoney(playerid, -10000);
                GivePlayerWeapon(playerid, 34, 9999999);
            }
                case 7:
            {
                if(GetPlayerMoney(playerid) <5000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to buy this item!");

                new Float:armour;
                GetPlayerArmour(playerid, armour);
                if(armour == 100) return SendClientMessage(playerid, COLOR_RED,"You already have a full vest!");
                SendClientMessage(playerid, COLOR_GREEN , "You bought a half vest for 10k!");
                GivePlayerMoney(playerid, -5000);
                SetPlayerArmour(playerid, 50);
            }
                case 8:
            {
                if(GetPlayerMoney(playerid) <2500) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to buy this item!");

                new Float:armour;
                GetPlayerArmour(playerid, armour);
                if(armour == 100) return SendClientMessage(playerid, COLOR_RED, "You already have a full vest!");
                SendClientMessage(playerid, COLOR_GREEN , "You bought a full vest for 20k!");
                GivePlayerMoney(playerid, -2500);
                SetPlayerArmour(playerid, 100);
            }

            }
            return 1;
    }
}
thx for helping
Reply


Messages In This Thread
Unknown Command - by mehdi171996 - 29.06.2014, 09:34
Re: Unknown Command - by bradleyofniet - 29.06.2014, 09:37
Re: Unknown Command - by bradleyofniet - 29.06.2014, 09:39
Re : Re: Unknown Command - by mehdi171996 - 29.06.2014, 09:42
Re: Unknown Command - by bradleyofniet - 29.06.2014, 09:44
Re : Unknown Command - by mehdi171996 - 29.06.2014, 09:46
Re : Unknown Command - by mehdi171996 - 29.06.2014, 09:53
Re: Unknown Command - by AroseKhanNiazi - 29.06.2014, 10:34
Re : Unknown Command - by mehdi171996 - 29.06.2014, 10:41
Re: Unknown Command - by AroseKhanNiazi - 29.06.2014, 10:45

Forum Jump:


Users browsing this thread: 3 Guest(s)