08.04.2011, 17:19
hi all
can someone help me to make that when I type /withdraw command outside range of bank system says to me : "You are not in the bank".
help please
here is my withdraw script:
can someone help me to make that when I type /withdraw command outside range of bank system says to me : "You are not in the bank".
help please
here is my withdraw script:
Код:
/*------------------------------------------------------------------------------*/ if(strcmp(cmd, "/withdraw", true) == 0) { if(IsPlayerConnected(playerid)) { } if(IsPlayerInRangeOfPoint(playerid, 6.0, 330.8681,129.4855,1007.9657)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, CRVENA, "Komanda: /withdraw [Kolicina]"); format(string, sizeof(string), " Imate $%d na racunu.", PlayerInfo[playerid][pAccount]); SendClientMessage(playerid, COLOR_GRAD3, string); return 1; } new cashdeposit = strvalEx(tmp); if(!strlen(tmp)) { SendClientMessage(playerid, CRVENA, "Komanda: /withdraw [Kolicina]"); format(string, sizeof(string), " Imate $%d na racunu.", PlayerInfo[playerid][pAccount]); SendClientMessage(playerid, COLOR_GRAD3, string); return 1; } if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1) { SendClientMessage(playerid, COLOR_GRAD2, "Nemate toliko !"); return 1; } ConsumingMoney[playerid] = 1; JB_GivePlayerMoney(playerid,cashdeposit); PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit; format(string, sizeof(string), "Podigli ste $%d sa racuna, Preostalo: $%d ", cashdeposit,PlayerInfo[playerid][pAccount]); SendClientMessage(playerid, ZUTA, string); return 1; } return 1; } /*------------------------------------------------------------------------------*/