05.01.2014, 17:44
Hey guys, so I am making a system where you need to type a command to get into the airport, and it checks the player for a drivers license, flying license and other things (Still in the works command is not 100% complete)
here is the code for the command
But I want a timer to go off after each check like when it checks their license it make them wait a couple seconds then it goes to the next part.
Also the gate system, I am trying to have it open the gate for 6 seconds and then close to reset the command.
public for the gate
I got to here, and then I was confused on how I would set up a timer.
If you see anything wrong or have any help it is much appreciated!
here is the code for the command
Код:
CMD:checkme(playerid, params[]) { if(!IsPlayerInRangeOfPoint(playerid, 5.0, 1960.4540,-2188.0190,13.5469)) { SendClientMessage(playerid, COLOR_RED, "You are not near the airport!"); } else { SendClientMessage(playerid, COLOR_GREEN, "Please wait while the airport security checks your vehicle and registration."); if(PlayerInfo[playerid][pCarLic] != 1) { if(PlayerInfo[playerid][pSex] == 1) { SendClientMessage(playerid, COLOR_WHITE, "Secruity Guard: Sir, you do not have a drivers license, the police have been informed and are on their way."); } else { SendClientMessage(playerid, COLOR_WHITE, "Secruity Guard: Ma'am, you do not have a drivers license, the police have been informed and are on their way."); } } else if(PlayerInfo[playerid][pFlyLic] != 1) { if(PlayerInfo[playerid][pSex] == 1) { SendClientMessage(playerid, COLOR_WHITE, "Secruity Guard: Sir, you do not have a flying license, the police have been informed and are on their way to question you."); } else { SendClientMessage(playerid, COLOR_WHITE, "Secruity Guard: Ma'am, you do not have a flying license, the police have been informed and are on their way to question you."); } } else { SendClientMessage(playerid, COLOR_WHITE, "Secruity Guard: Ok, you are free to enter the airport, have a wonderful day!(Gate will close in 6 seconds.)"); SetTimeer("AirportGate", 6000, false); } } return 1; }
Also the gate system, I am trying to have it open the gate for 6 seconds and then close to reset the command.
public for the gate
Код:
public AirportGate() { MoveDynamicObject(1095, 0.0, 0.0, 0.0, 1, 90.0, 0.0, 0.0); }
If you see anything wrong or have any help it is much appreciated!