Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2019-01-29, 15:55


Jodla

Majster






Wiek: 22
Na forum: 3126 dni
Posty: 41
Nick w MP: Stajl

Piwa: 817

Respekt: 20,5

Siema mam tutaj taki kod z ITS'a i nie wiem dla czego /tt /vth itd. nie dzia?a.
Szuka?em b??d?w w kodzie ale nic nie znalaz?em.
Je?li kto? ma dzia?aj?cy to prosze.


addCommandHandler("kick", function(plr,cmd,cel,...)
    if getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1then
        local reason table.concat({...}, " ")
        if not cel or not reason then
            outputChatBox("* U?ycie: /kick <nick/ID> <pow?d>"plr)
            return
        end
        local target exports["ogrpg-core"]:findPlayer(plr,cel)
        if not target then
            triggerClientEvent(plr"iyw_notifications:send"plr"error""Nie znaleziono podanego gracza.")
            return
        end
        exports["ogrpg-db"]:dbSet("insert into kartoteka (typ,karajacy,data,powod,ofiara) VALUES(?,?,NOW(),?,?)""KICK"plr.name:gsub("#%x%x%x%x%x%x",""), reasongetElementData(target"player:uid"))
        triggerClientEvent(root"adminRender"root"Gracz "..getPlayerName(target).." zosta? wyrzucony przez "..plr.name..", pow?d: "..reason.."")
        exports["ogrpg-db"]:dbSet("INSERT INTO admin_logs_cmd (uid,moderator,cmd) VALUES (?,?,?)"getElementData(plr,"player:uid"), plr.name:gsub("#%x%x%x%x%x%x",""), "kick "..getPlayerName(target).."")
        kickPlayer(targetplrreason)
    end
end)
addCommandHandler("prezent", function(plrcmdmoney, ...)
    if getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2then
        local help table.concat({...}, " ")
        if (not money or not helpthen
            outputChatBox("U?yj: /prezent <hajsy> <podpowied?>"plr)
        return end
        if not tonumber(money) or not help then
            outputChatBox("U?yj: /prezent <hajsy> <podpowied?>"plr)
        return end
            money tonumber(money)
        if money <= 0 then
            outputChatBox("Podana warto??, musi by? wi?ksza od zera!"plr)
        return end
        if money 300000 then
            outputChatBox("Maksymalna kwota w prezencie to 300.000PLN!"plr)
        return end
        if not ... then outputChatBox("U?yj: /prezent <hajsy> <podpowied?>"plr) return end
        takePlayerMoney(plr,money)
        local x,y,getElementPosition(plr)
        local city getZoneName(xyztrue)
        local street getZoneName(xyzfalse)
        plr:setData("player:created"true)
        local cub createPickup(xyz3127450)
        local t createElement("text")
        setElementPosition(t,x,y,z)
        setElementData(t,"name","Prezent o warto?ci "..money.." PLN\nPozdrawiamy, administracja!")
        outputChatBox("Kto? z administracji, wyrzuci? prezent o warto?ci "..money.." PLN."root02550)
        outputChatBox("Podpowied?: "..help.."."root02550)
        addEventHandler("onPickupHit"cub, function(elmd)
            if getElementType el) == "player" then
                if not el:getData("player:created"then
                    plr:getData("player:created"false)
                    outputChatBox(""..getPlayerName(el):gsub("#%x%x%x%x%x%x","").." zgarnia prezent o warto?ci "..money.."PLN!",root,0,255,0)
                    givePlayerMoney(el,money)
                    destroyElement(source)
                    destroyElement(t)
                end
            end
        end)
        setTimer(function() if isElement(cubthen destroyElement(cub); destroyElement(tend end,60000*30,1)
    end
end)
addCommandHandler("portfel", function(plrcmdmoney)
    if getAdmin(plr,4) or getAdmin(plr,3then
        if (not moneythen
            outputChatBox("U?yj: /portfel <hajsy>"plr)
        return end
        if not tonumber(moneythen
        outputChatBox("* /portfel <hahsy>"plr)
        return end
        money tonumber(money)
        if money <= 0 then
        outputChatBox("* Za mala ilosc pieniedzy w portfelu"plr)
        return end
        if money 5000 then
        outputChatBox("* Za duza ilosc pieniedzy w portfelu max: 5000 PLN"plr)
        return end
        takePlayerMoney(plr,money)
        local x,y,getElementPosition(plr)
        local cub createMarker (x,y+2,,"corona"101530155 )
        local t createElement("text")
        setElementPosition(t,x,y+2,z)
        setElementData(t,"name","Zgubiony Portfel")
        outputChatBox("#00FF00* Kto? zgubi? portfel, ciekawe gdzie on le?y."root0,153,0,true)
        addEventHandler("onMarkerHit"cub, function(elmd)
        if getElementType el) == "player" then
        outputChatBox("#00FF00*Gracz "..getPlayerName(el):gsub("#%x%x%x%x%x%x","").." znalaz?/a czyj? portfel, a w nim #FFFF00"..money.."PLN!",root,0,153,0,true)
        givePlayerMoney(el,money)
        destroyElement(source)
        destroyElement(t)
        end
        end)
        setTimer(function() if isElement(cubthen destroyElement(cub); destroyElement(tend end,60000 30,1)
    end
end)
addCommandHandler("rprezent", function(plrcmdmoney)
    if getAdmin(plr,4) or getAdmin(plr,3then
        if (not moneythen
            outputChatBox("U?yj: /rprezent <hajsy>"plr)
        return end
        if not tonumber(moneythen
        outputChatBox("* /rprezent <hajsy>"plr)
        return end
        money tonumber(money)
        if money <= 0 then
        outputChatBox("* Za mala odleglosc"plr)
        return end
takePlayerMoney(plr,money)
        local x,y,getElementPosition(plr)
        local cub createMarker (x,y+2,,"corona"1255120255155 )
        local t createElement("text")
        setElementPosition(t,x,y+2,z)
        setElementData(t,"name","Prezent :)")
        addEventHandler("onMarkerHit"cub, function(elmd)
        if getElementType el) == "player" then
        outputChatBox("*Gracz "..getPlayerName(el):gsub("#%x%x%x%x%x%x","").." zgarnia prezent o wartosci "..money.."PLN!",root,255,0,0)
        givePlayerMoney(el,money)
        destroyElement(source)
        destroyElement(t)
        end
        end)
        setTimer(function() if isElement(cubthen destroyElement(cub); destroyElement(tend end,15000,1)
    end
end)

addCommandHandler("ztp", function(plrcmd)
    if getAdmin(plrthen
        setElementPosition(plr, -4550.882888.549.45)
        giveWeapon(plr381000)
        triggerClientEvent(plr"onClientAddNotification"plr"Otrzyma?e?(a?) miniguna - pami?taj, ?eby przedstawi? wszystkim zasady ZTP""success")
    end
end)

addCommandHandler("tt", function(plrcmdcel)
    if getAdmin(plrthen
        if not cel then
                triggerClientEvent(plr"onClientAddNotification"plr"Podaj u?ytkownika, do kt?rego chcesz si? przeteleportowa?!""error") 
                triggerEvent("admin:addText"resourceRoot"TT > "..plr.name:gsub("#%x%x%x%x%x%x","").." - u?yto z?ej sk?adni! (brak u?ytkownika)"math.random(099)) 
            return
        end
        
        local target exports["ogrpg-core"]:findPlayer(plrcel)
        if not target then
                triggerClientEvent(plr"onClientAddNotification"plr"Taki u?ytkownik nie istnieje!""error") 
                triggerEvent("admin:addText"resourceRoot"TT > "..plr.name:gsub("#%x%x%x%x%x%x","").." > "..cel.." - taki u?ytkownik nie istnieje!"math.random(099)) 
            return
        end
        
        if isPedInVehicle(plrthen
                triggerClientEvent(plr"onClientAddNotification"plr"Aby u?y? tej komendy, musisz znajdowa? si? poza pojazdem!""error") 
                triggerEvent("admin:addText"resourceRoot"TT > "..plr.name:gsub("#%x%x%x%x%x%x","").." > "..cel.." - pr?ba teleportowania z pojazdem."math.random(099)) 
            return
        end
        
        local position = {getElementPosition(target)}
        setElementInterior(plrgetElementInterior(target))
        setElementDimension(plrgetElementDimension(target))
        setElementPosition(plrposition[1] + math.random(12), position[2] + math.random(12), position[3])
        triggerEvent("admin:addText"resourceRoot"TT > "..plr.name:gsub("#%x%x%x%x%x%x","").." > "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." (UID: "..getElementData(target"player:uid")..")"math.random(099))
    end
end)

addCommandHandler("th", function(plrcmdcel)
    if getAdmin(plrthen
        if not cel then
                triggerClientEvent(plr"onClientAddNotification"plr"Podaj u?ytkownika, kt?rego chcesz przeteleportowa? do siebie!""error") 
                triggerEvent("admin:addText"resourceRoot"TH > "..plr.name:gsub("#%x%x%x%x%x%x","").." - u?yto z?ej sk?adni! (brak u?ytkownika)"math.random(099)) 
            return
        end
        
        local target exports["ogrpg-core"]:findPlayer(plrcel)
        if not target then
                triggerClientEvent(plr"onClientAddNotification"plr"Taki u?ytkownik nie istnieje!""error") 
                triggerEvent("admin:addText"resourceRoot"TH > "..plr.name:gsub("#%x%x%x%x%x%x","").." > "..cel.." - taki u?ytkownik nie istnieje!"math.random(099)) 
            return
        end
        
        if isPedInVehicle(targetthen
            removePedFromVehicle(target)
        end
        
        local position = {getElementPosition(plr)}
        setElementInterior(targetgetElementInterior(plr))
        setElementDimension(targetgetElementDimension(plr))
        setElementPosition(targetposition[1] + math.random(12), position[2] + math.random(12), position[3])
        triggerEvent("admin:addText"resourceRoot"TH > "..plr.name:gsub("#%x%x%x%x%x%x","").." > "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." (UID: "..getElementData(target"player:uid")..")"math.random(099))
    end
end)

addCommandHandler("vth", function(plr,cmd,cel)
    if getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2then
        if not cel then
            outputChatBox("* U?ycie: /vth <ID>"plr)
            return
        end
        local target exports["ogrpg-core"]:findPlayer(plr,cel)
        if not target then
            triggerClientEvent(plr"iyw_notifications:send"plr"error""Nie znaleziono podanego gracza.")
            return
        end
  veh getPedOccupiedVehicle(target)
  x,y,getElementPosition(plr)
  
  if(veh)then
   setElementInterior(veh,getElementInterior(plr))
   setElementDimension(veh,getElementDimension(plr))
   setElementPosition(veh,x+math.random(1,2),y+math.random(1,2),z)
        exports["ogrpg-db"]:dbSet("INSERT INTO admin_logs_cmd (uid,moderator,cmd) VALUES (?,?,?)"getElementData(plr,"player:uid"), plr.name:gsub("#%x%x%x%x%x%x",""), "thv "..getPlayerName(target).."")
  else
   setElementInterior(target,getElementInterior(plr))
   setElementDimension(target,getElementDimension(plr))
   setElementPosition(target,x+math.random(1,2),y+math.random(1,2),z)
        exports["ogrpg-db"]:dbSet("INSERT INTO admin_logs_cmd (uid,moderator,cmd) VALUES (?,?,?)"getElementData(plr,"player:uid"), plr.name:gsub("#%x%x%x%x%x%x",""), "thv "..getPlayerName(target).."")
  end
    end
end)


Komentarz DsJ3 dodany 2019-01-29, 17:00Następnym razem dodaj załącznik[BBCode] [lua]Kod[./lua] bez kropki
Podpis
znam jakieś tam podstawy

==
Skrypt wojsko ACL -
https://gtao.pl/skrypt-wojsko-acl-vt134899.htm#833500
--
Skrypt Whitelista -
https://gtao.pl/skrypt-whitelista-vt135327.htm#835548
===
Ostatnio zmieniony przez DsJ3 2019-01-29, 17:00, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-01-29, 16:57


Wilq







Wiek: 24
Na forum: 4428 dni
Posty: 3410

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

Wstaw konkretnie kod komend, ktore nie dzia?aj? a nie caly skrypt.
Uzyj znacznik?w [.lua] [./lua] bez kropek

Jakies bledy /debugscript 3?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-01-30, 02:24


OCBSlim







Wiek: 26
Na forum: 2703 dni
Posty: 43
Nick w MP: OCBSlim

Piwa: 415

Respekt: 60

Czy aby napewno masz dost?p do /duty? Sorry, ?e pytam ale widzia?em te? takich agent?w :mrgreen:

Podpis
Może kiedyś wrócę z nowym projektem! ;-) Pozdrawiam!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-02-03, 10:51


Mezo.

Mod-Team






Wiek: 24
Na forum: 3211 dni
Posty: 548
Nick w MP: Mezo

Piwa: 6070

Respekt: 517
Respekt: 517

Bez jakiegokolwiek infa b?dziemy tutaj sta? i ci??ko b?dzie nam Ci pom?c. Najlepiej by by?o jakby? poda? nam jakie? b?edy, je?eli takowe s? pod /debugscript 3. Je?eli masz dost?p do duty, odpal wcze?niej /debugscript3, wykonaj komende na kicka, i je?eli on faktycznie nie dzia?a, to wtedy na db3 wy?wietl? si? jakie? b??dy kt?re nam podaj tutaj.

Podpis
- Na forum pomagam na miarę swoich możliwości, oraz bezpłatnie.
- Jeżeli potrzebujesz pomocy, pisz do mnie w prywatnej wiadomości, pomoc uzyskasz szybciej.
Współpraca - [email protected]


Użytkownik - 19.08.2017
GTAO MEMBER - 29.03.2019
Support-Team - 03.02.2019 - 07.05.2019
Moderator - 07.05.2019 - 02.08.2020
Mod-Team - 02.08.2020 - 25.03.2022

Postaw piwo autorowi tego posta
 

 
Tagi: its :: /tt :: itd. :: nie :: dziala
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » IT's /tt itd. nie dziala Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku