Jump to content

Radu1307

Membru
  • Posts

    2
  • Joined

  • Last visited

    Never

Radu1307's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Conversation Starter
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. Salutare, am si eu o mica mare problema, legata de banii din inventar ai caracterului. Folosesc un script pe care incerc sa il editez pentru a il face sa mearga. Sa va dau un exemplu: Daca cumpar o casa, un business, sau folosesc comanda /pay = din banii totali din inventar, se scade suma respectiva si e totul ok. Insa daca folosesc pay&spray ul - daca cumpar de la burger/chicken , si cand incerc sa folosesc /fdeposit . baniii imi sunt scazuti din inventar, si imediat apar laloc. de ex: /fdeposit 50000 = imi spune ca in depozit au fost adaugati 50 000 dolari, dar in inventar tot acolo sunt. daca dau /fbalance - imi spune ca am 50 000 in depozit ul factiunii. daca dau /fwithdraw 50000 banii incep sa se adune, dar imediat scad la loc la suma care o aveam, este ca si cum ar fii ni depozit niste bani falsi, care defapt sunt la mine in inventar. Ce problema ar putea fii? ati avut vrodata aceasta eroare? Am mai cautat pe google si am gasit undeva ca trebuie sa fie peste tot GivePlayerMoney si sa nu existe GivePlayerMoneyEx = cand am cautat in script nu era si cu EX nicaieri, apoi am gasit ceva de genul ca toate trebuie sa fie cu EX, am incercat sa modific. si aceasi problema este:) Help ' neeed help [pawn]if(strcmp(cmd, "/fdeposit", true) == 0) { if(IsAMember(playerid)) { if (PlayerToPoint(30.0, playerid,-2159.122802,641.517517,1052.381713) || PlayerToPoint(30.0, playerid,2324.419921,-1145.568359,1050.710083) || PlayerToPoint(30.0, playerid,1277.9442,-837.3730,1085.6328) || PlayerToPoint(30.0, playerid,1710.433715,-1669.379272,20.225049) || PlayerToPoint(30.0, playerid,942.171997,-16.542755,1000.929687) || PlayerToPoint(30.0, playerid,964.106994,-53.205497,1001.124572)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /fdeposit [amount]"); format(string, sizeof(string), " You Have $%d in your hq.", PlayerInfo[playerid][pAccf]); SendClientMessage(playerid, COLOR_GRAD3, string); return 1; } new cashdeposit = strval(tmp); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /fdeposit [amount]"); format(string, sizeof(string), " You Have $%d in your hq.", PlayerInfo[playerid][pAccf]); SendClientMessage(playerid, COLOR_GRAD3, string); return 1; } if (cashdeposit > GetPlayerMoney(playerid) || cashdeposit < 1) { SendClientMessage(playerid, COLOR_GRAD2, " You dont have that much"); return 1; } GivePlayerMoney(playerid,-cashdeposit); new curfunds = PlayerInfo[playerid][pAccf]; PlayerInfo[playerid][pAccf]=cashdeposit+PlayerInfo[playerid][pAccf]; SendClientMessage(playerid, COLOR_WHITE, "|___ SAFE BOX ___|"); format(string, sizeof(string), " Old Balance: $%d", curfunds); SendClientMessage(playerid, COLOR_GRAD2, string); format(string, sizeof(string), " Deposit: $%d",cashdeposit); SendClientMessage(playerid, COLOR_GRAD4, string); SendClientMessage(playerid, COLOR_GRAD6, "|-----------------|"); format(string, sizeof(string), " New Balance: $%d", PlayerInfo[playerid][pAccf]); SendClientMessage(playerid, COLOR_WHITE, string); return 1; } } return 1; }[/pawn] [pawn]if(strcmp(cmd, "/fwithdraw", true) == 0) { if(PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pLeader] == 13 || PlayerInfo[playerid][pLeader] == 15 || PlayerInfo[playerid][pLeader] == 16) { if (PlayerToPoint(30.0, playerid,-2159.122802,641.517517,1052.381713) || PlayerToPoint(30.0, playerid,2324.419921,-1145.568359,1050.710083) || PlayerToPoint(30.0, playerid,1277.9442,-837.3730,1085.6328) || PlayerToPoint(30.0, playerid,1710.433715,-1669.379272,20.225049) || PlayerToPoint(30.0, playerid,942.171997,-16.542755,1000.929687) || PlayerToPoint(30.0, playerid,964.106994,-53.205497,1001.124572)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /fwithdraw [amount]"); format(string, sizeof(string), " You Have $%d in your hq.", PlayerInfo[playerid][pAccf]); SendClientMessage(playerid, COLOR_GRAD3, string); return 1; } new cashdeposit = strval(tmp); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /fwithdraw [amount]"); format(string, sizeof(string), " You Have $%d in your hq.", PlayerInfo[playerid][pAccf]); SendClientMessage(playerid, COLOR_GRAD3, string); return 1; } if (cashdeposit > PlayerInfo[playerid][pAccf] || cashdeposit < 1) { SendClientMessage(playerid, COLOR_GRAD2, " You dont have that much !"); return 1; } //ConsumingMoney[playerid] = 1; GivePlayerMoney(playerid,cashdeposit); PlayerInfo[playerid][pAccf]=PlayerInfo[playerid][pAccf]-cashdeposit; format(string, sizeof(string), " You Have Withdrawn $%d from your hq Total: $%d ", cashdeposit,PlayerInfo[playerid][pAccf]); SendClientMessage(playerid, COLOR_YELLOW, string); return 1; } } return 1; }[/pawn] [pawn]public SafeGivePlayerMoney(plyid, amounttogive) { new curHour, curMinute, curSecond; gettime(curHour, curMinute, curSecond); ScriptMoneyUpdated[plyid] = curSecond; if (amounttogive < 0) { GivePlayerMoney(plyid, amounttogive); ScriptMoney[plyid] = (ScriptMoney[plyid] + amounttogive); } else { ScriptMoney[plyid] = (ScriptMoney[plyid] + amounttogive); GivePlayerMoney(plyid, amounttogive); } return 1; }[/pawn]
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.