else if(IsPlayerInRangeOfPoint(playerid, 10.0, SFX, SFY, SFZ) && PLANESTAGE[playerid] == SFA) { new string[64]; format(string, sizeof(string), "Your Passengers Are Boarding The plane(I want to add a 30 second timer ) ",); SendClientMessage(playerid, COLOR_ORANGE, string); PLANESTAGE[playerid] = LVB; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, -1370.4148, -224.8594, 13.8710, 10.0); GivePlayerMoney(playerid, MONEY_EARNT); } |
if(IsPlayerInRangeOfPoint(playerid, 10.0, x, y, z) && PLANESTAGE[playerid] == SFA) { new string[64], disable; format(string, sizeof(string), "Your Passengers Are Boarding The plane(I want to add a 30 second timer ) ",); SendClientMessage(playerid, COLOR_ORANGE, string); PLANESTAGE[playerid] = LVB; SetTimer("disable",20000,20000,true); // 20 second for stop ; Will restart after 20 seconds again; Disable checks after 20sec and re-enable after 20seg, and so over and over. disable = DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, -1370.4148, -224.8594, 13.8710, 10.0); GivePlayerMoney(playerid, MONEY_EARNT); }
if(IsPlayerInRangeOfPoint(playerid, 10.0, x, y, z) && PLANESTAGE[playerid] == SFA) { new string[64], dxx, exx; format(string, sizeof(string), "Your Passengers Are Boarding The plane(I want to add a 30 second timer ) ",); SendClientMessage(playerid, COLOR_ORANGE, string); PLANESTAGE[playerid] = LVB; dxx = DisablePlayerCheckpoint(playerid); exx = SetPlayerCheckpoint(playerid, -1370.4148, -224.8594, 13.8710, 10.0); GivePlayerMoney(playerid, MONEY_EARNT); }
forward enable(); // top
forward disable(); // top
public enable() { SetPlayerCheckpoint(playerid, -1370.4148, -224.8594, 13.8710, 10.0); SetTimer("disable",20000,true); return 1; } public disable() { DisablePlayerCheckpoint(playerid, exx); SetTimer("enable",20000,true); return 1; }
Код:
if(IsPlayerInRangeOfPoint(playerid, 10.0, x, y, z) && PLANESTAGE[playerid] == SFA) { new string[64], disable; format(string, sizeof(string), "Your Passengers Are Boarding The plane(I want to add a 30 second timer ) ",); SendClientMessage(playerid, COLOR_ORANGE, string); PLANESTAGE[playerid] = LVB; SetTimer("disable",20000,20000,true); // 20 second for stop ; Will restart after 20 seconds again; Disable checks after 20sec and re-enable after 20seg, and so over and over. disable = DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, -1370.4148, -224.8594, 13.8710, 10.0); GivePlayerMoney(playerid, MONEY_EARNT); } |