I have recently added a 2nd bank to my server but 1 of them works and one says you have left the bank even tro you are standing at the spot. Can you help me
Код:
if(PlayerInfo[i][pRobbingBank] >= 1) {
new string[128];
if(!IsPlayerInRangeOfPoint(i, 15.0, 2308.7346, -11.0134, 26.7422)) {
GameTextForPlayer(i, "~r~Robbery Failed...~n~You left the bank...", 5000, 5);
PlayerInfo[i][pRobbingBank] =0;
return 1;
}
if(PlayerInfo[i][pRobbingBank] > 1) {
format(string,sizeof(string),"~r~Robbing Bank...~n~~w~Complete in ~b~%d ~w~seconds...",PlayerInfo[i][pRobbingBank]);
GameTextForPlayer(i, string, 1000, 5);
PlayerInfo[i][pRobbingBank] --;
return 1;
}
new rrand = random(300000);
new year,month,day,log[128];
format(string,sizeof(string),"* %s has robbed $%d from the bank safe.",GetPlayerNameEx(i),rrand);
ProxDetector(30.0, i, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GivePlayerCash(i, rrand);
getdate(year, month, day);
format(log, sizeof(log), "%s has just robbed the bank and recieved $%d (%d-%d-%d)", GetPlayerNameEx(i), rrand, month, day, year);
Log("logs/robs.log", log);
PlayerInfo[i][pRobbingBank] =0;
return 1;
}
if(PlayerInfo[i][pRobbingBank] >= 1) {
new string[128];
if(!IsPlayerInRangeOfPoint(i, 15.0, 2942.5620, -1769.4794, 1178.4684)) {
GameTextForPlayer(i, "~r~Robbery Failed...~n~You left the bank...", 5000, 5);
PlayerInfo[i][pRobbingBank] =0;
return 1;
}
if(PlayerInfo[i][pRobbingBank] > 1) {
format(string,sizeof(string),"~r~Robbing Bank...~n~~w~Complete in ~b~%d ~w~seconds...",PlayerInfo[i][pRobbingBank]);
GameTextForPlayer(i, string, 1000, 5);
PlayerInfo[i][pRobbingBank] --;
return 1;
}
new rrand = random(300000);
new year,month,day,log[128];
format(string,sizeof(string),"* %s has robbed $%d from the bank safe.",GetPlayerNameEx(i),rrand);
ProxDetector(30.0, i, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GivePlayerCash(i, rrand);
getdate(year, month, day);
format(log, sizeof(log), "%s has just robbed the bank and recieved $%d (%d-%d-%d)", GetPlayerNameEx(i), rrand, month, day, year);
Log("logs/robs.log", log);
PlayerInfo[i][pRobbingBank] =0;
return 1;
I suppose this is 1 coordinate, meaning 1 bank, meaning when the player ain't at that spot it will give the message: you have left the bank.