16.06.2016, 11:55
Quote:
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: Код 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]); |
Код HTML:
forward RobCheck(forward); public RobCheck(playerid) { if(PlayerVariable[playerid][pRob] == 1) { if(!IsPlayerInRangeOfPoint(playerid, r, x,y,z)) { SendClientMessage(playerid, COLOR_RED, "You exited the bank! Rob failed!"); PlayerVariable[playerid][pRob] = 0; KillTimer(RobCheck[playerid]); } } return 1; }