Facebook
From Innocent Anoa, 7 Years ago, written in Lua.
Embed
Download Paste or View Raw
Hits: 299
  1. nagroda = math.random(1000,10000)
  2. start = 0
  3. blokada = 0
  4. tworzenie = 0
  5. addCommandHandler("skoki",
  6. function(plr,cmd,cel,ilosc)
  7.  
  8. gracz = getPlayerName(plr)
  9. --[[    if not getElementData(player,"character") then
  10. outputChatBox("Najpierw wejdź do gry.", plr)
  11. return
  12. end             ]]--
  13.  
  14. local rcon = isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(plr)), aclGetGroup ("Admin"))
  15.  
  16. if not rcon then
  17.         outputChatBox(" ",plr)
  18.         outputChatBox(" ",plr)
  19.         outputChatBox("Nie masz uprawnień do tworzenia eventów",plr)
  20.         outputChatBox(" ",plr)
  21.         outputChatBox(" ",plr)
  22. else
  23.         if not cel then
  24.         outputChatBox(" ",plr)
  25.         outputChatBox(" ",plr)
  26.         outputChatBox("/skoki stworz - Tworzy event o nazwie skoki spadochronowe oraz automatycznie oglasza.",plr)
  27.         outputChatBox("/skoki ustawnagrode ilosc - Ustawia nagrode skokow, aktualna nagroda to: " ..nagroda.. "$.",plr)
  28.         outputChatBox("/skoki start - Zaczyna event.",plr)
  29.         outputChatBox("/skoki stop - Kończy event.",plr)
  30.         outputChatBox("/skoki stopdolaczanie - Zamyka dolaczanie do eventu.",plr)
  31.         end
  32.  
  33.         if tostring(cel)=="ustawnagrode" then
  34.                 if tonumber(ilosc) < 999 and tonumber(ilosc) > 10000 then
  35.                 outputChatBox("1000 jest wieksze od " ..ilosc.. "$")
  36.                 else
  37.                 outputChatBox("Twoja ilosc: " ..ilosc.. "$ jest za mała/duża")
  38.                 end
  39.         end
  40.        
  41.         if tostring(cel)=="stworz" then
  42.                 if tworzenie == 0 then
  43.                 outputChatBox(" ")
  44.                 outputChatBox("Administrator " ..gracz.. " stworzył event o nazwie: skoki spadochronowe.")
  45.                 outputChatBox("Aby dołączyć na event prosimy o udanie się do znaku zapytania w Los Santos.")
  46.                 outputChatBox("Znajduje się tam marker do którego prosimy wejść!")
  47.                 outputChatBox(" ")
  48.                 objekt = createObject(4563,1570.53, -1243.01, 1292.39)
  49.                 brama = createObject(988,1560.3981933594,-1260.5499267578,1466.7554931641,0,0,161.99890136719)
  50.                 objekt1 = createObject(987,1551.0822753906, -1213.5316162109, 1466.7554931641)
  51.                 objekt2 = createObject(987,1563.0401611328, -1213.5316162109, 1466.7554931641)
  52.                 objekt3 = createObject(987,1575.0343017578, -1213.5316162109, 1466.7554931641)
  53.                 objekt4 = createObject(987,1598.8876953125, -1261.5849609375, 1466.7554931641,0,0,180)
  54.                 objekt5 = createObject(987,1587.0347900391, -1213.5316162109, 1466.7554931641)
  55.                 objekt6 = createObject(987,1598.9226074219, -1213.6387939453, 1466.7554931641,0,0,270)
  56.                 objekt7 = createObject(987,1598.9226074219, -1225.6296386719, 1466.7554931641,0,0,270)
  57.                 objekt8 = createObject(987,1598.9226074219, -1237.6307373047, 1466.7554931641,0,0,270)
  58.                 objekt9 = createObject(987,1598.9226074219, -1249.5809326172, 1466.7554931641,0,0,270)
  59.                 objekt11 = createObject(987,1586.9127197266, -1261.5849609375, 1466.7554931641,0,0,180)
  60.                 objekt12 = createObject(987,1574.9100341797, -1261.5849609375, 1466.7554931641,0,0,180)
  61.                 objekt13 = createObject(987,1551.7165527344, -1225.3676757813, 1466.7554931641,0,0,90)
  62.                 objekt14 = createObject(987,1551.7165527344, -1237.3370361328, 1466.7554931641,0,0,90)
  63.                 objekt15 = createObject(987,1551.7165527344, -1249.3145751953, 1466.7554931641,0,0,90)
  64.                 objekt16 = createObject(987,1557.6898193359, -1259.755859375, 1466.7554931641,0,0,120)
  65.                 objekt17 = createObject(987,1557.6898193359, -1259.755859375, 1466.7554931641,0,0,120)
  66.                 blip = createBlip(1574.07, -1274.08, 18,37,0,0,0,255)
  67.                 wejscie = createMarker(1573.97974, -1274.75024, 16.6,"cylinder",1,55,255,155,150)
  68.                 tworzenie = 1
  69.                 else
  70.                 outputChatBox("Juz ktos stworzył event!")
  71.                 end
  72.                
  73.  
  74.         end
  75.                
  76.         if tostring(cel)=="stopdolaczanie" then
  77.         destroyElement(wejscie)
  78.         destroyElement(blip)
  79.         outputChatBox("Administrator " ..gracz.. " usunął możliwosć dołączania do eventu.")
  80.         outputDebugString("Administrator " ..gracz.. " usunął możliwosć dołączania do eventu.")
  81.         blokada = 1
  82.         end
  83.        
  84.         if tostring(cel)=="start" then
  85.                 if blokada == 1 then
  86.                         if start == 1 then
  87.                         outputChatBox("event juz wystartowal",prl)
  88.                         else
  89.                         outputChatBox("Administrator " ..gracz.. " wystartował event spadochronowy.")
  90.                         outputDebugString("Administrator " ..gracz.. " wystartował event spadochronowy.")
  91.                         moveObject(brama,5000,1560.3981933594,-1260.5499267578,1460.7554931641)
  92.                         start = 1
  93.                         end
  94.                 else
  95.                         outputChatBox("Moze pierw zamkniesz dolaczanie?",plr)
  96.                 end
  97.         end
  98.        
  99.         if tostring(cel)=="stop" then
  100.                 if start == 1 then
  101.                 destroyElement(objekt)
  102.                 destroyElement(brama)
  103.                 destroyElement(objekt1)
  104.                 destroyElement(objekt2)
  105.                 destroyElement(objekt3)
  106.                 destroyElement(objekt4)
  107.                 destroyElement(objekt5)
  108.                 destroyElement(objekt6)
  109.                 destroyElement(objekt7)
  110.                 destroyElement(objekt8)
  111.                 destroyElement(objekt9)
  112.                 destroyElement(objekt11)
  113.                 destroyElement(objekt12)
  114.                 destroyElement(objekt13)
  115.                 destroyElement(objekt14)
  116.                 destroyElement(objekt15)
  117.                 destroyElement(objekt16)
  118.                 destroyElement(objekt17)
  119.                 outputChatBox("Administrator " ..gracz.. " zakończył event spadochronowy.")
  120.                 outputDebugString("Administrator " ..gracz.. " zakończył event spadochronowy.")
  121.                 else
  122.                 outputChatBox("Event przeciez nie wystartowal!",plr)
  123.                 end
  124.         end
  125.        
  126. end
  127.  
  128.  
  129. function markery(markerHit)
  130.                 outputChatBox("Dolaczyles na event",source,255,255,0)
  131.                 setElementPosition(source, math.random(1560,1572) , -1240 , 1467.2)
  132.                 giveWeapon(source, 46)
  133.                 triggerClientEvent(source,"markery",source)
  134. end
  135. addEventHandler("onPlayerMarkerHit",getRootElement(),markery)
  136.  
  137.  
  138. end)
  139.  
  140.