Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new airport_gate_01;
- new airport_gate_02;
- new airport_gate_03;
- forward CheckGate();
- public OnGameModeInit()
- {
- SetTimer("CheckGate",1000,true);
- airport_gate_01 = CreateObject(971, 1494.73, -2503.05, 16.20, 0.00, 0.00, 90.00);//Opens horizontally
- airport_gate_02 = CreateObject(971, 1494.73, -2487.65, 16.20, 0.00, 0.00, 90.00);//Opens horizontally
- airport_gate_03 = CreateObject(971, 1494.93, -2494.65, 16.20, 0.00, 0.00, 90.00);//Opens vertically
- }
- public CheckGate()
- {
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- //Airport Military Base 01
- if(IsPlayerInRangeOfPoint(i, 1494.73, -2503.05, 16.20, 15.0))
- {
- if(GetPlayerSkin(i) == 287)
- {
- MoveObject(airport_gate_01, 1494.73, -2513.05, 16.20, 5);
- }
- }
- else
- {
- MoveObject(airport_gate_01, 1494.73, -2503.05, 16.20, 5);
- }
- //Airport Military Base 02
- if(IsPlayerInRangeOfPoint(i, 1494.73, -2487.65, 16.20, 15.0))
- {
- if(GetPlayerSkin(i) == 287)
- {
- MoveObject(airport_gate_02, 1494.73, -2477.65, 16.20, 5);
- }
- }
- else
- {
- MoveObject(airport_gate_02, 1494.73, -2487.65, 16.20, 5);
- }
- //Airport Military Base 03
- if(IsPlayerInRangeOfPoint(i, 1494.93, -2494.65, 16.20, 15.0))
- {
- if(GetPlayerSkin(i) == 287)
- {
- MoveObject(airport_gate_03, 1494.93, -2494.65, 8.20, 5);
- }
- }
- else
- {
- MoveObject(airport_gate_03, 1494.93, -2494.65, 16.20, 5);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment