CMD : deposit
#1

What's wrong with it. It still shows me this msg even when i am in bank1. "you must be inside of a bank to use this command". I can't get what is wrong anyone help? also tell me whats the problem. thanks


PHP код:
CMD:deposit(playeridparams[])
{
    new 
amount;
    if(!
IsPlayerInDynamicCP(playeridBank1)) return SendClientMessage(playeridRED"You must be inside of a bank to use this command.");
    if(
sscanf(params"i"amount)) return SendClientMessage(playeridCOLOR_RED"/deposit [amount]");
    if(
amount GetPlayerMoney(playerid)) return SendClientMessage(playerid,COLOR_RED,"You dont have enough money.");
    if(
amount <= 0) return SendClientMessage(playerid,COLOR_RED,"You have to deposit atleast $1 into the bank!");
    if(
IsPlayerInDynamicCP(playeridBank1 || IsPlayerInDynamicCP(playeridBank2)))
    
GivePlayerCash(playerid,-amount);
    
pInfo[playerid][pBankMoney] += amount;
    new 
string[128];
    
format(string,sizeof(string),"You have deposited: $%d Total Money: $%d",amountpInfo[playerid][pBankMoney]);
    
SendClientMessage(playerid,GREEN,string);
       return 
1;

Reply


Messages In This Thread
CMD : deposit - by STONEGOLD - 13.06.2015, 13:40
Re: CMD : deposit - by STONEGOLD - 13.06.2015, 13:49
Re: CMD : deposit - by Konstantinos - 13.06.2015, 13:50
Re: CMD : deposit - by GuyYahood1 - 13.06.2015, 13:52

Forum Jump:


Users browsing this thread: 1 Guest(s)