I need help please help me in this
#1

i am having problem in this deposit DialogBox if a player dont have cash for deposit then it sending a message you dont have enough cash to deposit money but bug is when we enter like 100000000 then its working player is not having that much money but when any player doing it its working i want to prevent this it if a player do 10000000 then it wont work until player dont have that much money here is the code

Code:
case DEPOSIT_MENU:
	{
        if(response)
        if(!IsNumeric(inputtext)) return SendClientMessage(playerid, RED, "Characters detected, numbers only.");
		if(!strlen(inputtext)) return SendClientMessage(playerid, RED, "You need to enter an amount to deposit.");
		if(strval(inputtext) > GetPlayerCash(playerid))
		{
		    SendClientMessage(playerid, RED, "You Don't Have Enough Cash To Complete This Task.");
			return 1;
		}
		if(strval(inputtext) > 10000000) return SendClientMessage(playerid, RED, "You can only deposit $10M at a time");
		BankInfo[playerid][Balance] = BankInfo[playerid][Balance] + strval(inputtext);
		GivePlayerCash(playerid, - strval(inputtext));
		format(fstr, sizeof(fstr), "{30ACAC}You Have Deposited {00FF22}$%d {30ACAC}Into Your Bank Account,Your New Balance: {00FF22}$%d", strval(inputtext), BankInfo[playerid][Balance]);
		SendClientMessage(playerid, -1, fstr);
		BankInfo[playerid][Transactions] = BankInfo[playerid][Transactions] + 1;
		BankInfo[playerid][Fees] = BankInfo[playerid][Fees] + 4;
		GivePlayerCash(playerid, - 4);
		new astring[100];
		format(astring, sizeof(astring), "%s (%d) Has Deposited $%d Into His Bank Account", GetName(playerid), playerid, strval(inputtext));
		SendAdminMessage(GREY, astring);
	}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)