nagroda = math.random(1000,10000) start = 0 blokada = 0 tworzenie = 0 addCommandHandler("skoki", function(plr,cmd,cel,ilosc) gracz = getPlayerName(plr) --[[ if not getElementData(player,"character") then outputChatBox("Najpierw wejdź do gry.", plr) return end ]]-- local rcon = isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(plr)), aclGetGroup ("Admin")) if not rcon then outputChatBox(" ",plr) outputChatBox(" ",plr) outputChatBox("Nie masz uprawnień do tworzenia eventów",plr) outputChatBox(" ",plr) outputChatBox(" ",plr) else if not cel then outputChatBox(" ",plr) outputChatBox(" ",plr) outputChatBox("/skoki stworz - Tworzy event o nazwie skoki spadochronowe oraz automatycznie oglasza.",plr) outputChatBox("/skoki ustawnagrode ilosc - Ustawia nagrode skokow, aktualna nagroda to: " ..nagroda.. "$.",plr) outputChatBox("/skoki start - Zaczyna event.",plr) outputChatBox("/skoki stop - Kończy event.",plr) outputChatBox("/skoki stopdolaczanie - Zamyka dolaczanie do eventu.",plr) end if tostring(cel)=="ustawnagrode" then if tonumber(ilosc) < 999 and tonumber(ilosc) > 10000 then outputChatBox("1000 jest wieksze od " ..ilosc.. "$") else outputChatBox("Twoja ilosc: " ..ilosc.. "$ jest za mała/duża") end end if tostring(cel)=="stworz" then if tworzenie == 0 then outputChatBox(" ") outputChatBox("Administrator " ..gracz.. " stworzył event o nazwie: skoki spadochronowe.") outputChatBox("Aby dołączyć na event prosimy o udanie się do znaku zapytania w Los Santos.") outputChatBox("Znajduje się tam marker do którego prosimy wejść!") outputChatBox(" ") objekt = createObject(4563,1570.53, -1243.01, 1292.39) brama = createObject(988,1560.3981933594,-1260.5499267578,1466.7554931641,0,0,161.99890136719) objekt1 = createObject(987,1551.0822753906, -1213.5316162109, 1466.7554931641) objekt2 = createObject(987,1563.0401611328, -1213.5316162109, 1466.7554931641) objekt3 = createObject(987,1575.0343017578, -1213.5316162109, 1466.7554931641) objekt4 = createObject(987,1598.8876953125, -1261.5849609375, 1466.7554931641,0,0,180) objekt5 = createObject(987,1587.0347900391, -1213.5316162109, 1466.7554931641) objekt6 = createObject(987,1598.9226074219, -1213.6387939453, 1466.7554931641,0,0,270) objekt7 = createObject(987,1598.9226074219, -1225.6296386719, 1466.7554931641,0,0,270) objekt8 = createObject(987,1598.9226074219, -1237.6307373047, 1466.7554931641,0,0,270) objekt9 = createObject(987,1598.9226074219, -1249.5809326172, 1466.7554931641,0,0,270) objekt11 = createObject(987,1586.9127197266, -1261.5849609375, 1466.7554931641,0,0,180) objekt12 = createObject(987,1574.9100341797, -1261.5849609375, 1466.7554931641,0,0,180) objekt13 = createObject(987,1551.7165527344, -1225.3676757813, 1466.7554931641,0,0,90) objekt14 = createObject(987,1551.7165527344, -1237.3370361328, 1466.7554931641,0,0,90) objekt15 = createObject(987,1551.7165527344, -1249.3145751953, 1466.7554931641,0,0,90) objekt16 = createObject(987,1557.6898193359, -1259.755859375, 1466.7554931641,0,0,120) objekt17 = createObject(987,1557.6898193359, -1259.755859375, 1466.7554931641,0,0,120) blip = createBlip(1574.07, -1274.08, 18,37,0,0,0,255) wejscie = createMarker(1573.97974, -1274.75024, 16.6,"cylinder",1,55,255,155,150) tworzenie = 1 else outputChatBox("Juz ktos stworzył event!") end end if tostring(cel)=="stopdolaczanie" then destroyElement(wejscie) destroyElement(blip) outputChatBox("Administrator " ..gracz.. " usunął możliwosć dołączania do eventu.") outputDebugString("Administrator " ..gracz.. " usunął możliwosć dołączania do eventu.") blokada = 1 end if tostring(cel)=="start" then if blokada == 1 then if start == 1 then outputChatBox("event juz wystartowal",prl) else outputChatBox("Administrator " ..gracz.. " wystartował event spadochronowy.") outputDebugString("Administrator " ..gracz.. " wystartował event spadochronowy.") moveObject(brama,5000,1560.3981933594,-1260.5499267578,1460.7554931641) start = 1 end else outputChatBox("Moze pierw zamkniesz dolaczanie?",plr) end end if tostring(cel)=="stop" then if start == 1 then destroyElement(objekt) destroyElement(brama) destroyElement(objekt1) destroyElement(objekt2) destroyElement(objekt3) destroyElement(objekt4) destroyElement(objekt5) destroyElement(objekt6) destroyElement(objekt7) destroyElement(objekt8) destroyElement(objekt9) destroyElement(objekt11) destroyElement(objekt12) destroyElement(objekt13) destroyElement(objekt14) destroyElement(objekt15) destroyElement(objekt16) destroyElement(objekt17) outputChatBox("Administrator " ..gracz.. " zakończył event spadochronowy.") outputDebugString("Administrator " ..gracz.. " zakończył event spadochronowy.") else outputChatBox("Event przeciez nie wystartowal!",plr) end end end function markery(markerHit) outputChatBox("Dolaczyles na event",source,255,255,0) setElementPosition(source, math.random(1560,1572) , -1240 , 1467.2) giveWeapon(source, 46) triggerClientEvent(source,"markery",source) end addEventHandler("onPlayerMarkerHit",getRootElement(),markery) end)