Guest User

Untitled

a guest
Feb 8th, 2011
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.80 KB | None | 0 0
  1. new airport_gate_01;
  2. new airport_gate_02;
  3. new airport_gate_03;
  4.  
  5. forward CheckGate();
  6.  
  7. public OnGameModeInit()
  8. {
  9. SetTimer("CheckGate",1000,true);
  10. airport_gate_01 = CreateObject(971, 1494.73, -2503.05, 16.20,   0.00, 0.00, 90.00);//Opens horizontally
  11. airport_gate_02 = CreateObject(971, 1494.73, -2487.65, 16.20,   0.00, 0.00, 90.00);//Opens horizontally
  12. airport_gate_03 = CreateObject(971, 1494.93, -2494.65, 16.20,   0.00, 0.00, 90.00);//Opens vertically
  13. }
  14.  
  15. public CheckGate()
  16. {
  17.     for(new i=0; i<MAX_PLAYERS; i++)
  18.     {
  19.         if(IsPlayerConnected(i))
  20.         {
  21.             //Airport Military Base 01
  22.             if(IsPlayerInRangeOfPoint(i, 1494.73, -2503.05, 16.20, 15.0))
  23.             {
  24.                 if(GetPlayerSkin(i) == 287)
  25.                 {
  26.                     MoveObject(airport_gate_01, 1494.73, -2513.05, 16.20, 5);
  27.                 }
  28.             }
  29.             else
  30.             {
  31.                 MoveObject(airport_gate_01, 1494.73, -2503.05, 16.20, 5);
  32.             }
  33.             //Airport Military Base 02
  34.             if(IsPlayerInRangeOfPoint(i, 1494.73, -2487.65, 16.20, 15.0))
  35.             {
  36.                 if(GetPlayerSkin(i) == 287)
  37.                 {
  38.                     MoveObject(airport_gate_02, 1494.73, -2477.65, 16.20, 5);
  39.                 }
  40.             }
  41.             else
  42.             {
  43.                 MoveObject(airport_gate_02, 1494.73, -2487.65, 16.20, 5);
  44.             }
  45.             //Airport Military Base 03
  46.             if(IsPlayerInRangeOfPoint(i, 1494.93, -2494.65, 16.20, 15.0))
  47.             {
  48.                 if(GetPlayerSkin(i) == 287)
  49.                 {
  50.                     MoveObject(airport_gate_03, 1494.93, -2494.65, 8.20, 5);
  51.                 }
  52.             }
  53.             else
  54.             {
  55.                 MoveObject(airport_gate_03, 1494.93, -2494.65, 16.20, 5);
  56.             }
  57.         }
  58.     }
  59. }
Advertisement
Add Comment
Please, Sign In to add comment