16.06.2016, 08:09
You can use a timer which is verifying if that player is in a range of a point.
Then, you are using the rob variable.
For example:
use
to start the timer.
Don't forget to use
after rob.
Then, you are using the rob variable.
For example:
Код HTML:
new RobCheck[MAX_PLAYERS];
Код HTML:
RobCheck[playerid] = SetTimerEx("RobCheck[playerid]", 3000, 1, "d", playerid);
Код HTML:
forward RobCheck(forward); public RobCheck(playerid) { if(PlayerVariable[playerid][pRob] == 1) { if(IsPlayerInRangeOfPoint(playerid, 30.0, x,y,z)) { SendClientMessage(playerid, COLOR_WHITE,"Rob Accepted."); } else { SendClientMessage(playerid, COLOR_WHITE, " You are far away from the rob point. Rob Failed."); PlayerVariable[playerid][pRob] = 0; KillTimer(RobCheck[playerid]); } } return 1; }
Код HTML:
KillTimer(RobCheck[playerid]);