05.07.2013, 22:11
(
Последний раз редактировалось Yako; 05.07.2013 в 22:13.
Причина: Wrong posted
)
Hello, what's wrong can be with this:
When I go more than 10 points from the entrance it shows that robbery failed, but when I exit the business it just doesn't show the timer but when I enter again it again shows the timer and no failed message arrives
Код:
forward RobbingBiz(playerid); public RobbingBiz(playerid) { if(bizrobberytime[playerid] < 1) { } else { bizrobberytime[playerid]=bizrobberytime[playerid]-1; format(string, 128, "~r~%d ~w~seconds left", bizrobberytime[playerid]); GameTextForPlayer(playerid, string, 1000, 5); for(new i; i < MAX_PLAYERS; i++) { if(robbingbizid[i] == robbingbizid[playerid]&&!IsPlayerInRangeOfPoint(i, 10.0, bizintpacks[type][intx], bizintpacks[type][inty], bizintpacks[type][intz])) { ProxDetector(10.0, playerid, "========================================", COLOR_RED, COLOR_RED, COLOR_RED, COLOR_RED, COLOR_RED); ProxDetector(10.0, playerid, "Robbery failed! One or more people left the area!", COLOR_WHITE, COLOR_WHITE, COLOR_WHITE, COLOR_WHITE, COLOR_WHITE); ProxDetector(10.0, playerid, "========================================", COLOR_RED, COLOR_RED, COLOR_RED, COLOR_RED, COLOR_RED); robbingbizid[playerid] = -1; robbingbizid[i] = -1; KillTimer(bizrobberytimer[playerid]); } else if(robbingbizid[i] == robbingbizid[playerid]&&BizEntered[i] == -1) { ProxDetector(10.0, playerid, "========================================", COLOR_RED, COLOR_RED, COLOR_RED, COLOR_RED, COLOR_RED); ProxDetector(10.0, playerid, "Robbery failed! One or more people left the area!", COLOR_WHITE, COLOR_WHITE, COLOR_WHITE, COLOR_WHITE, COLOR_WHITE); ProxDetector(10.0, playerid, "========================================", COLOR_RED, COLOR_RED, COLOR_RED, COLOR_RED, COLOR_RED); robbingbizid[playerid] = -1; robbingbizid[i] = -1; KillTimer(bizrobberytimer[playerid]); } } } } return 1; }