Advertisement
marcinszyk

Untitled

Feb 21st, 2012
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.03 KB | None | 0 0
  1. new dach[11];
  2. new bool:dach_otwarty = false;
  3.  
  4. public OnGameModeInit() //public wykonuje się kiedy włącza się serwer.
  5. {
  6.     dach[0] = CreateObject(10828,689.70141602,-1347.24926758,25.94055176,90.00,0.00,270.00);
  7.     dach[1] = CreateObject(10828,696.98474121,-1347.39160156,26.19055176,90.00,0.00,270.00);
  8.     dach[2] = CreateObject(10828,690.32824707,-1347.38232422,26.09944344,90.00,180.00,90.0);
  9.     dach[3] = CreateObject(10828,689.25305176,-1348.21545410,25.81766319,90.00,0.00,270.00);
  10.     dach[4] = CreateObject(10841,742.89801025,-1330.12097168,9.72108459,0.00,0.00,180.00);
  11.     dach[5] = CreateObject(10828,695.21020508,-1341.75585938,25.95745850,90.00,0.00,0.00);
  12.     dach[6] = CreateObject(10828,696.72833252,-1362.60815430,26.16795349,90.00,0.00,0.00);
  13.     dach[7] = CreateObject(10841,765.18634033,-1330.30444336,9.96829796,0.00,0.00,180.0);
  14.     dach[8] = CreateObject(10841,775.87628174,-1330.45715332,9.97706985,0.00,0.00,177.99);
  15.     dach[9] = CreateObject(10841,786.78125000,-1341.56616211,9.72625351,0.00,0.00,90.00);
  16.     dach[10] = CreateObject(10841,786.55401611,-1354.71276855,10.22625351,0.00,0.00,90.00);
  17.     return 1;
  18. }
  19.  
  20. CMD:gdach(playerid, params[]) //Komenda /gdach
  21. {
  22.     if(!IsPlayerInGang(playerid)) return 0; // "Jeżeli gracz nie jest w gangu, przerywa działanie komendy - czyli nie wykona się MoveObject"
  23.  
  24.     if(dach_otwarty == false)
  25.     {
  26.         MoveObject(dach[0], 775.71484375,-1347.72363281,25.94055176, 4);
  27.         MoveObject(dach[1], 760.98730469,-1347.79785156,26.19055176, 4);
  28.         MoveObject(dach[2], 746.38671875,-1348.05566406,26.09944344, 4);
  29.         MoveObject(dach[3], 740.87145996,-1348.28869629,25.81766319, 4);
  30.         MoveObject(dach[4], 742.89801025,-1330.12097168,24.72108459, 4);
  31.         MoveObject(dach[5], 743.99621582,-1342.33178711,25.95745850, 4);
  32.         MoveObject(dach[6], 742.74371338,-1362.91186523,26.16795349, 4);
  33.         MoveObject(dach[7], 765.18634033,-1330.30444336,24.71829796, 4);
  34.         MoveObject(dach[8], 775.87628174,-1330.45715332,24.72706985, 4);
  35.         MoveObject(dach[9], 786.78125000,-1341.56616211,24.72625351, 4);
  36.         MoveObject(dach[10], 786.55401611,-1354.71276855,24.47625351, 4);
  37.         dach_otwarty = true;
  38.     }else if(dach_otwarty == true)
  39.     {
  40.         //Tutaj MoveObject z zamkniętymi bramami.
  41.              
  42.                   MoveObject(dach[0], 10828,689.70141602,-1347.24926758,25.94055176, 4);
  43.         MoveObject(dach[1], 10828,696.98474121,-1347.39160156,26.19055176, 4);
  44.         MoveObject(dach[2], 10828,690.32824707,-1347.38232422,26.09944344, 4);
  45.         MoveObject(dach[3], 10828,689.25305176,-1348.21545410,25.81766319, 4);
  46.         MoveObject(dach[4], 10841,742.89801025,-1330.12097168,9.72108459, 4);
  47.         MoveObject(dach[5], 10828,695.21020508,-1341.75585938,25.95745850, 4);
  48.         MoveObject(dach[6], 10828,696.72833252,-1362.60815430,26.16795349, 4);
  49.         MoveObject(dach[7], 10841,765.18634033,-1330.30444336,9.96829796, 4);
  50.         MoveObject(dach[8], 10841,775.87628174,-1330.45715332,9.97706985, 4);
  51.         MoveObject(dach[9], 10841,786.78125000,-1341.56616211,9.72625351, 4);
  52.         MoveObject(dach[10], 10841,786.55401611,-1354.71276855,10.22625351, 4);
  53.  
  54.         dach_otwarty = false;
  55.     }  
  56.     return 1;
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement