How can i fix this?
#2

Quote:
Originally Posted by $$Money$$
View Post
pawn Code:
if(dialogid==012012) {
        if(response) {
            if(listitem==0) {                     // Deagle
                if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough Cash!");
                GivePlayerWeapon(playerid,24,99999);
                SendClientMessage(playerid, COLOR_PURPLE,"Desert Eagle purchased for $10000.");
            }
            if(listitem==1) {                     // MP5K
                if(GetPlayerMoney(playerid) < 15000) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough Cash!");
                GivePlayerWeapon(playerid,29,99999);
                SendClientMessage(playerid, COLOR_PURPLE,"MP5 purchased for $15000.");
            }
            if(listitem==2) {                     // AK47
                if(GetPlayerMoney(playerid) < 30000) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough Cash!");
                GivePlayerWeapon(playerid,30,999999);
                SendClientMessage(playerid, COLOR_PURPLE,"AK-47 purchased for $30000");
            }
            if(listitem==3) {                     // ARMOUR
                if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough Cash!");
                SetPlayerArmour(playerid,100.0);
                SendClientMessage(playerid, COLOR_PURPLE,"Full Armour purchased for $5000.");
            }

        }
    }
I buy a weapon from ammunation biz ..it say Desert eagle purchased for 10000..but my money is just the same value
VERY LAME MISTAKE
You Must Add :-
HTML Code:
GivePlayerMoney(playerid, -10000);
-10000 is the amount of money whihc will be reduced when he buy gun
and u need to edit the
lines

if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough Cash!");
etc...

Edit:- u need to add those lines some where before dialog response , Like when player click that dialog id it return first verification of money then the dialog must appear
hope i am clear !!
Reply


Messages In This Thread
How can i fix this? - by $$Money$$ - 20.12.2011, 09:20
Re: How can i fix this? - by Niko_boy - 20.12.2011, 09:23
Re: How can i fix this? - by $$Money$$ - 20.12.2011, 10:05
Re: How can i fix this? - by Hoborific - 20.12.2011, 10:18

Forum Jump:


Users browsing this thread: 1 Guest(s)