Poftim. [pawn]CMD:fdeposit(playerid, params[]) { if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first."); if(IsPlayerConnected(playerid)) { if(DepositMoney(playerid)) { new x = PlayerInfo[playerid][pMember],string[100],cashdeposit; if(sscanf(params, "d", cashdeposit)) return SendClientMessage(playerid, 0xFFFFFFFF, "{8EC837}Scrie:{FFFFFF} /fdeposit <money>"); if(cashdeposit < 1 || cashdeposit > 10000000) return SCM(playerid,COLOR_WHITE,"{FFB870}Money limit is $1 - $10,000,000."); if(IsPlayerInRangeOfPoint(playerid,50.0,DynamicFactions[x][fcX],DynamicFactions[x][fcY],DynamicFactions[x][fcZ])) { if(GetPlayerCash(playerid) >= cashdeposit) { new oldbalance = DynamicFactions[x][fBank]; DynamicFactions[x][fBank] += cashdeposit; GivePlayerCash(playerid, -cashdeposit); Update(playerid,pCashx); new str[184]; format(str,sizeof(str),"UPDATE `factions` SET `Bank`='%d' WHERE `ID`='%d'",DynamicFactions[x][fBank],x); mysql_query(SQL,str); SendClientMessage(playerid, CRISTIAN, "Safebox:"); format(string, sizeof(string), " Old Balance: $%s", FormatNumber(oldbalance)); SendClientMessage(playerid, COLOR_WHITE, string); format(string, sizeof(string), " Deposit: +$%s ", FormatNumber(cashdeposit)); SendClientMessage(playerid, COLOR_WHITE, string); format(string, sizeof(string), " New balance: $%s", FormatNumber(DynamicFactions[x][fBank])); SendClientMessage(playerid, COLOR_WHITE, string); return 1; } else return SendClientMessage(playerid, COLOR_WHITE, "{FFB870}You don't have that amount of money."); } else return SendClientMessage(playerid, COLOR_WHITE, "{FFB870}You are not in HQ."); } } return 1; } CMD:fwithdraw(playerid, params[]) { if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first."); if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pLeader] !=0) { if(PlayerInfo[playerid][pLeader] >= 1) { new cashdwithdraw,x = PlayerInfo[playerid][pLeader],string[100]; if(sscanf(params, "d", cashdwithdraw)) return SendClientMessage(playerid, 0xFFFFFFFF, "{8EC837}Scrie:{FFFFFF} /fwithdraw <money>"); if(GetPlayerInterior(playerid) == 0) return SCM(playerid,COLOR_WHITE,"{FFB870}You are not in HQ."); if(IsPlayerInRangeOfPoint(playerid,50.0,DynamicFactions[x][fcX],DynamicFactions[x][fcY],DynamicFactions[x][fcZ])) { if(cashdwithdraw <= DynamicFactions[x][fBank] || cashdwithdraw < 1 || cashdwithdraw > 10000000) { new oldbalance1 = DynamicFactions[x][fBank]; GivePlayerCash(playerid,cashdwithdraw); Update(playerid,pCashx); DynamicFactions[x][fBank] -= cashdwithdraw; new str[184]; format(str,sizeof(str),"UPDATE `factions` SET `Bank`='%d' WHERE `ID`='%d'",DynamicFactions[x][fBank],x); mysql_query(SQL,str); SCM(playerid, CRISTIAN, "Safebox:"); format(string, sizeof(string), "Old Balance: $%s ", FormatNumber(oldbalance1)); SCM(playerid, COLOR_WHITE, string); format(string, sizeof(string), "Withdraw: -$%s ", FormatNumber(cashdwithdraw)); SCM(playerid, COLOR_WHITE, string); format(string, sizeof(string), "New balance: %s %", FormatNumber(DynamicFactions[x][fBank])); SCM(playerid, COLOR_WHITE, string); return 1; } else return SCM(playerid, COLOR_WHITE, "{FFB870}You don't have that amount of money in your faction seif."); } } } else return SCM(playerid,COLOR_WHITE, "{5CAD5C}Error: Only leaders can use this command.."); } return 1; }[/pawn]