[pawn] if(strcmp(cmd, "/withdraw", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerToPoint(6.0, playerid, 1504.2522,-1038.8168,601.5460) || IsAtATMSystem(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "{00A1FF}USAGE{FFFFFF}: /withdraw [amount]"); format(string, sizeof(string), "[server]: You Have %s in your account.", DecimalPoint(PlayerInfo[playerid][pAccount])); SendClientMessage(playerid, COLOR_GRAD3, string); return 1; } new cashdeposit = strval(tmp); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "{00A1FF}USAGE{FFFFFF}: /withdraw [amount]"); format(string, sizeof(string), "[server]: You Have %s in your account.", DecimalPoint(PlayerInfo[playerid][pAccount])); SendClientMessage(playerid, COLOR_GRAD3, string); return 1; } if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1) { SendClientMessage(playerid, COLOR_GRAD2, "[Eroare]: You dont have that much !"); return 1; } //ConsumingMoney[playerid] = 1; SafeGivePlayerMoney(playerid,cashdeposit); PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit; format(string, sizeof(string), "[server]: You Have Withdrawn %s from your account Total: %s", DecimalPoint(cashdeposit),DecimalPoint(PlayerInfo[playerid][pAccount])); SendClientMessage(playerid, COLOR_YELLOW, string); return 1; } else { SendClientMessage(playerid, COLOR_GREY, "[Eroare]: You are not at the Bank !"); return 1; } } return 1; } if(strcmp(cmd, "/bank", true) == 0 || strcmp(cmd, "/deposit", true) == 0) { if(IsPlayerConnected(playerid)) { if(!PlayerToPoint(6.0, playerid, 1500.3766,-1038.3237,601.5460) && !IsAtATMSystem(playerid)) { SendClientMessage(playerid, COLOR_GREY, "[Eroare]: You are not at the Bank !"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "{00A1FF}USAGE{FFFFFF}: /bank [amount]"); format(string, sizeof(string), "[server]: You Have %s in your account.", DecimalPoint(PlayerInfo[playerid][pAccount])); SendClientMessage(playerid, COLOR_GRAD3, string); return 1; } new cashdeposit = strval(tmp); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "{00A1FF}USAGE{FFFFFF}: /bank [amount]"); format(string, sizeof(string), "[server]: You Have %s in your account.", DecimalPoint(PlayerInfo[playerid][pAccount])); SendClientMessage(playerid, COLOR_GRAD3, string); return 1; } if (cashdeposit > GetPlayerMoney(playerid) || cashdeposit < 1) { SendClientMessage(playerid, COLOR_GRAD2, "[Eroare]: You dont have that much"); return 1; } SafeGivePlayerMoney(playerid,-cashdeposit); new curfunds = PlayerInfo[playerid][pAccount]; PlayerInfo[playerid][pAccount]=cashdeposit+PlayerInfo[playerid][pAccount]; SendClientMessage(playerid, COLOR_WHITE, "|___ BANK STATMENT ___|"); format(string, sizeof(string), "Old Balance: %s", DecimalPoint(curfunds)); SendClientMessage(playerid, COLOR_GRAD2, string); format(string, sizeof(string), "Deposit: %s",DecimalPoint(cashdeposit)); SendClientMessage(playerid, COLOR_GRAD4, string); SendClientMessage(playerid, COLOR_GRAD6, "|-----------------------------------------|"); format(string, sizeof(string), "New Balance: %s", DecimalPoint(PlayerInfo[playerid][pAccount])); SendClientMessage(playerid, COLOR_WHITE, string); return 1; } return 1; } if(strcmp(cmd, "/balance", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerToPoint(6.0, playerid, 1496.6987,-1038.3569,601.5460) || IsAtATMSystem(playerid)) { format(string, sizeof(string), "[server]: You Have %s in your account.",DecimalPoint(PlayerInfo[playerid][pAccount])); SendClientMessage(playerid, COLOR_YELLOW, string); } else { SendClientMessage(playerid, COLOR_GREY, "[Eroare]: You are not at the Bank !"); return 1; } } return 1; }[/pawn] [pawn]if(strcmp(cmd, "/transfer", true) == 0 || strcmp(cmd, "/wiretransfer", true) == 0) { if(IsPlayerConnected(playerid)) { new playersip[24]; new playerspi[24]; if(PlayerInfo[playerid][pLevel] < 3) { SendClientMessage(playerid, COLOR_GRAD1, "[Eroare]: You must be level 3 !"); return 1; } if(!PlayerToPoint(6.0, playerid, 1496.3708,-1027.3900,601.5460)) { SendClientMessage(playerid, COLOR_GREY, "[Eroare]: You are not at the Bank !"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD1, "{00A1FF}USAGE{FFFFFF}: /transfer [playerid/PartOfName] [amount]"); return 1; } giveplayerid = ReturnUser(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD1, "{00A1FF}USAGE{FFFFFF}: /transfer [playerid/PartOfName] [amount]"); return 1; } moneys = strval(tmp); if (IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); GetPlayerIp(giveplayerid, playerspi, sizeof(playerspi)); GetPlayerIp(playerid, playersip, sizeof(playersip)); playermoney = PlayerInfo[playerid][pAccount] ; if (moneys > 0 && playermoney >= moneys) { PlayerInfo[playerid][pAccount] -= moneys; PlayerInfo[giveplayerid][pAccount] += moneys; format(string, sizeof(string), "[server]: You have transferd %s to %s's account.", DecimalPoint(moneys), giveplayer,giveplayerid); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); SendClientMessage(playerid, COLOR_GRAD1, string); format(string, sizeof(string), "[server]: You have recieved %s to into your account from %s.", DecimalPoint(moneys), sendername, playerid); SendClientMessage(giveplayerid, COLOR_GRAD1, string); format(string, sizeof(string), "%s(IP: %s) transferd %s to %s(IP: %s)", sendername, playersip, DecimalPoint(moneys), giveplayer, playerspi); PayLog(string); format(string, sizeof(string), "[WARNING]: %s{FFFFFF}(IP: %s){E42217} transferd %s to %s{FFFFFF}(IP: %s)", sendername, playersip, DecimalPoint(moneys), giveplayer, playerspi); if(moneys >= 1) { ABroadCast(0xE42217FF,string,1); } printf("%s", string); PayLog(string); PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0); } else { SendClientMessage(playerid, COLOR_GRAD1, "[Eroare]: Invalid transaction amount."); } } } else { format(string, sizeof(string), "[Eroare]: %d is not an active player.", giveplayerid); SendClientMessage(playerid, COLOR_GRAD1, string); } } return 1; }[/pawn] AddPlayerClass(23,2305.7991,-15.8193,26.7496,260.7323,0,0,0,0,0,0); // banca ls