Timer problem
#1

Hello, what's wrong can be with this:
Код:
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;
}
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
Reply
#2

I tend not to help you as I believe you're probably using a stolen script, sorry.
Reply
#3

Are you kidding me? My gamemode is created from scratch...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)