How can i fix this?
#1

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
Reply
#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
#3

Its a roleplay script..Its fixed..but the money return to its original value
Reply
#4

1, Stop using an edit, 2, Get to know your anticheat, you obviously have to call a specific function to change money value.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)