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

Wysłany: 2019-02-21, 11:00


EinfachFischi







Wiek: 23
Na forum: 2744 dni
Posty: 9
Nick w MP: Damianek



Respekt: 50

Witam mam problem z komendami one po prostu nie dzialaja. prosze o pomoc

addCommandHandler("ucho", function(plr,cmd)
    if getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1then
    local x getElementData(plr,"player:ucho")
    setElementData(plr,"player:ucho",not x)
    end
end)




addCommandHandler("daj.ogp", function(plr,cmd,cel,value)
    if getAdmin(plr,3) or getAdmin(plr,4then
        if not cel or not tonumber(valuethen
            outputChatBox("* U?ycie: /daj.ogp <nick/ID> <ilosc>"plr)
            return
        end
        local target=exports["ogrpg-core"]:findPlayer(plr,cel)
        if not target then
            outputChatBox("* Nie znaleziono podanego gracza."plr25500)
            return
        end
        setElementData(target,"player:reputation"getElementData(target,"player:reputation")+value)
        outputChatBox("* Otrzyma?e?(a?)  "..value.." Reputacji!"target)
    end
end)

addCommandHandler("tune", function(plr,cmd,cel,value)
    if getAdmin(plr,5) or getAdmin(plr,6then
        if not cel or not tonumber(valuethen
            outputChatBox("* U?ycie: /tune <nick/ID> <id>"plr)
            return
        end
        local target=exports["ogrpg-core"]:findPlayer(plr,cel)
        if not target then
            outputChatBox("* Nie znaleziono podanego gracza."plr25500)
            return
        end
        local veh=getPedOccupiedVehicle(target)
        addVehicleUpgrade(veh,value)
        outputChatBox("* Do twojego pojazdu dodano tuning, o id: "..value..""target)
        outputChatBox("* Doda?e? tuning ID "..value.." do pojazdu gracza "..getPlayerName(target):gsub("#%x%x%x%x%x%x",""),plr)
    end

end)

addCommandHandler("turbo", function(plr,cmd,cel,value)
        if getAdmin(plr,5) or getAdmin(plr,6then
        local pojazd getPedOccupiedVehicle(plr)
        outputChatBox("* Zamontowa?e?(a?) uk?ad Turbo."plr)
        setVehicleHandling(pojazd"engineAcceleration"getVehicleHandling pojazd ).engineAcceleration )
        setVehicleHandling(pojazd"maxVelocity"getVehicleHandling pojazd ).maxVelocity 35 )
        setVehicleHandling(pojazd"tractionMultiplier"0.8)
        setVehicleHandling(pojazd"steeringLock"50)
        setVehicleHandling(pojazd"driveType""awd")
    end
end)













addCommandHandler("kolor", function(plr,cmd,cel,value,value2,value3)
    if  getAdmin(plr,2) or getAdmin(plr,3) or getAdmin(plr,4then
        if not cel or not tonumber(value) or not tonumber(value2) or not tonumber(value3then
            outputChatBox("* U?ycie: /kolor <nick/ID> <r g b>"plr)
            return
        end
        local target=exports["ogrpg-core"]:findPlayer(plr,cel)
        if not target then
            outputChatBox("* Nie znaleziono podanego gracza."plr25500)
            return
        end
        local veh=getPedOccupiedVehicle(target)
        setVehicleColor(veh,value,value2,value3,value,value2,value3)
        outputChatBox("* Twojemy pojazdu zmieniono kolor."target)
        outputChatBox("* Zmieni?e? kolor pojazdu graczu: "..getPlayerName(target):gsub("#%x%x%x%x%x%x",""),plr)
    end

end)

addCommandHandler("przeb", function(plr,cmd,cel,value,value2,value3)
        if getAdmin(plr,3) or getAdmin(plr,4then
        if not cel or not tonumber(valuethen
            outputChatBox("* U?ycie: /przeb <nick/ID> <km>"plr)
            return
        end
        local target=exports["ogrpg-core"]:findPlayer(plr,cel)
        if not target then
            outputChatBox("* Nie znaleziono podanego gracza."plr25500)
            return
        end
        local veh=getPedOccupiedVehicle(target)
        setElementData(veh,"vehicle:mileage",value)
        outputChatBox("* Twojemy pojazdu zmieniono przebieg."target)
        outputChatBox("* Zmieni?e? przebieg pojazdu graczu: "..getPlayerName(target):gsub("#%x%x%x%x%x%x",""),plr)
    end

end)

addCommandHandler("name", function(plr,cmd,cel,value)
    if getAdmin(plr,6then
        if not cel or not value then
            outputChatBox("* U?ycie: /name <nick/ID> <name>"plr)
            return
        end
        local target=exports["ogrpg-core"]:findPlayer(plr,cel)
        if not target then
            outputChatBox("* Nie znaleziono podanego gracza."plr25500)
            return
        end
        setPlayerName(target,value)
        outputChatBox("* Administrator ".. getPlayerName   plr ) .." zmieni?(a) ci nick na: "..value..""target)
        outputChatBox("* Zmieni?e? graczu ID ("..getElementData(target,"id")..") nick na: "..value.."",plr)
    end
end)

-- Komendy admin?w



addCommandHandler("jp", function(plr,cmd)
    if getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1then
        if isPedInVehicle(plrthen
            removePedFromVehicle(plr)
        end
        if doesPedHaveJetPack(plrthen
            removePedJetPack(plr)
        else
            givePedJetPack(plr)
        end
    end
end)














addCommandHandler("k", 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: /k <nick/ID> <pow?d>"plr)
            return
        end
        local target=exports["ogrpg-core"]:findPlayer(plr,cel)
        if not target then
            outputChatBox("* Nie znaleziono podanego gracza."plr25500)
            return
        end
        triggerClientEvent(root"admin:rendering"root"* "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").."("..getElementData(target,"id")..") zosta?(a) wyrzucony(a) przez "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","")..": "..reason.."")
        kickPlayer(targetplrreason)
    end
end)

addCommandHandler("kick", function(plr,cmd,cel,...)
    if 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
            outputChatBox("* Nie znaleziono podanego gracza."plr25500)
            return
        end
        triggerClientEvent(root"admin:rendering"root"* "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").."("..getElementData(target,"id")..") zosta?(a) wyrzucony(a) przez "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","")..": "..reason.."")
        kickPlayer(targetplrreason)
    end
end)
addCommandHandler("prezent", function(plrcmdmoney)
    if getAdmin(plr,3) or getAdmin(plr,2then
        if (not moneythen
            outputChatBox("U?yj: /prezent <hajsy>"plr)
        return end
        if not tonumber(moneythen
        outputChatBox("* /prezent <hahsy>"plr)
        return end
        money tonumber(money)
        if money <= 0 then
        outputChatBox("* Za mala odleglosc"plr)
        return end
        if money 10000 then 
        outputChatBox("* Za duza odleglosc maks 10k"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).." 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("tt", function(plr,cmd,cel)
    if  getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1then
        if not cel then
            outputChatBox("* U?ycie: /tt <nick/ID>"plr)
            return
        end
        local target=exports["ogrpg-core"]:findPlayer(plr,cel)
        if not target then
            outputChatBox("* Nie znaleziono podanego gracza."plr25500)
            return
        end
        if isPedInVehicle(plrthen
            removePedFromVehicle(plr)
        end
        local x,y,z=getElementPosition(target)
        setElementInterior(plr,getElementInterior(target))
        setElementDimension(plr,getElementDimension(target))
        setElementPosition(plr,x+math.random(1,2),y+math.random(1,2),z)
    end
end)

addCommandHandler("th", function(plr,cmd,cel)
    if  getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1then
        if not cel then
            outputChatBox("* U?ycie: /th <nick/ID>"plr)
            return
        end
        local target=exports["ogrpg-core"]:findPlayer(plr,cel)
        if not target then
            outputChatBox("* Nie znaleziono podanego gracza."plr25500)
            return
        end
        if isPedInVehicle(targetthen
            removePedFromVehicle(target)
        end
        local x,y,z=getElementPosition(plr)
        setElementInterior(target,getElementInterior(plr))
        setElementDimension(target,getElementDimension(plr))
        setElementPosition(target,x+math.random(1,2),y+math.random(1,2),z)
    end
end)








addCommandHandler("warn", function(plr,cmd,cel,...)
    if 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: /warn <nick/ID> <powod>"plr)
            return
        end
        local target=exports["ogrpg-core"]:findPlayer(plr,cel)
        if not target then
            outputChatBox("* Nie znaleziono podanego gracza."plr25500)
            return
        end
        outputChatBox("******************************"target25500)
        outputChatBox("* Otrzyma?e?(a?) ostrze?enie..."target25500)
        outputChatBox("* Nie stosowanie si? do ostrze?e?,"target25500)
        outputChatBox("* Mo?e skutkowa? kicki'em lub ban'em."target25500)
        outputChatBox("*****************************"target25500)
        outputChatBox("Pow?d: "..reasontarget25500)
        triggerClientEvent(root"admin:rendering"root"* "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").."("..getElementData(target,"id")..") otrzyma?(a) ostrze?enie od "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","")..": "..reason.."")
    end
end)

addCommandHandler("zpj", function(plr,cmd,cel,time,type,...)
    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 tonumber(time) or not type or not reason then
            outputChatBox("* U?ycie: /zpj <nick/ID> <czas> <jednostka: m/h/d/w> <pow?d>"plr)
            return
        end
        local target=exports["ogrpg-core"]:findPlayer(plr,cel)
        if not target then
            outputChatBox("* Nie znaleziono podanego gracza."plr25500)
            return
        end
        local query=string.format("SELECT * FROM ogrpg_punish WHERE type=%q AND active=1 AND serial=%q AND time>NOW() LIMIT 1","prawko"getPlayerSerial(target))
        local result=exports["ogrpg-db"]:pobierzWyniki(query)
        if (resultthen
            return outputChatBox(" Gracz Posiada zawieszone prawo jazdy do "..result["time"]..", za: "..result["reason"], plr25500)
        else
            exports["ogrpg-db"]:dbSet("DELETE FROM ogrpg_punish WHERE type=? AND active=1 AND serial=?""prawko"getPlayerSerial(plr))
        end
        if isPedInVehicle(targetthen
            removePedFromVehicle(target)
        end
        result=pobierzDate(type,time)
        reason reason.." |od "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").."|"
        
        triggerClientEvent(root"admin:rendering"root"* "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").."("..getElementData(target,"id")..") otrzyma?(a) zakaz prowadzenia pojazd?w kat(ABC) "..reason.."("..time .. type ..")")
        exports["ogrpg-db"]:dbSet("INSERT INTO ogrpg_punish (serial,reason,time,type) VALUES (?,?,?,?)"getPlayerSerial(target), reasonresult"prawko")
        --outputChatBox("* Dodanych rekord"plr)
    end
end)

addCommandHandler("zpl", function(plr,cmd,cel,time,type,...)
    if getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1then
        local reason=table.concat({...}, " ")
        if not cel or not tonumber(time) or not type or not reason then
            outputChatBox("* U?ycie: /zpl <nick/ID> <czas> <jednostka: m/h/y/w> <pow?d>"plr)
            return
        end
        local target=exports["ogrpg-core"]:findPlayer(plr,cel)
        if not target then
            outputChatBox("* Nie znaleziono podanego gracza."plr25500)
            return
        end
        local query=string.format("SELECT * FROM ogrpg_punish WHERE type=%q AND active=1 AND serial=%q AND time>NOW() LIMIT 1","L"getPlayerSerial(target))
        local result=exports["ogrpg-db"]:pobierzWyniki(query)
        if (resultthen
            return outputChatBox(" Gracz Posiada zawieszone prawo jazdy do "..result["time"]..", za: "..result["reason"], plr25500)
        else
            exports["ogrpg-db"]:dbSet("DELETE FROM ogrpg_punish WHERE type=? AND active=1 AND serial=?""L"getPlayerSerial(plr))
        end
        if isPedInVehicle(targetthen
            removePedFromVehicle(target)
        end
        result=pobierzDate(type,time)
        reason reason.." |od "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").."|"
        
        triggerClientEvent(root"admin:rendering"root"* "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").."("..getElementData(target,"id")..") otrzyma?(a) zakaz prowadzenia pojazd?w lotniczych(L) "..reason.."("..time .. type ..")")
        exports["ogrpg-db"]:dbSet("INSERT INTO ogrpg_punish (serial,reason,time,type) VALUES (?,?,?,?)"getPlayerSerial(target), reasonresult"L")
        --outputChatBox("* Dodanych rekord"plr)
    end
end)
addCommandHandler("opj", function(plr,cmd,cel)
    if  getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1then
        if not cel then
            outputChatBox("* U?ycie: /opj <nick/ID> "plr)
            return
        end
        local target=exports["ogrpg-core"]:findPlayer(plr,cel)
        if not target then
            outputChatBox("* Nie znaleziono podanego gracza."plr25500)
            return
        end
        local query=string.format("SELECT * FROM ogrpg_punish WHERE type=%q AND active=1 AND serial=%q AND time>NOW() LIMIT 1","prawko"getPlayerSerial(target))
        local result=exports["ogrpg-db"]:pobierzWyniki(query)
        if (resultthen
            exports["ogrpg-db"]:dbSet("DELETE FROM ogrpg_punish WHERE type=? AND active=1 AND serial=?""prawko"getPlayerSerial(target))
            outputChatBox("* Gracz "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." odzyskal swoje prawo jazdy!"plr02550)
            outputChatBox("* "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").." oddal Twoje prawo jazdy!"target02550)
        else
            outputChatBox("* Gracz "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." nie posiada zabranego prawka!"plr02550)
        end
    end
end)
addCommandHandler("opl", function(plr,cmd,cel)
    if getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1then
        if not cel then
            outputChatBox("* U?ycie: /opl <nick/ID> "plr)
            return
        end
        local target=exports["ogrpg-core"]:findPlayer(plr,cel)
        if not target then
            outputChatBox("* Nie znaleziono podanego gracza."plr25500)
            return
        end
        local query=string.format("SELECT * FROM ogrpg_punish WHERE type=%q AND active=1 AND serial=%q AND time>NOW() LIMIT 1","L"getPlayerSerial(target))
        local result=exports["ogrpg-db"]:pobierzWyniki(query)
        if (resultthen
            exports["ogrpg-db"]:dbSet("DELETE FROM ogrpg_punish WHERE type=? AND active=1 AND serial=?""L"getPlayerSerial(target))
            outputChatBox("* Gracz "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." odzyskal swoja Licencje!"plr02550)
            outputChatBox("* "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").." oddal Twoja Licencje!"target02550)
        else
            outputChatBox("* Gracz "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." nie posiada zabranej Licencji!"plr02550)
        end
    end
end)

addCommandHandler("b", function(plr,cmd,cel,time,type,...)
    if  getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2then
        local reason=table.concat({...}, " ")
        if not cel or not tonumber(time) or not type or not reason then
            outputChatBox("* U?ycie: /b <nick/ID> <czas> <jednostka: m/h/d/w> <pow?d>"plr)
            return
        end
        local target=exports["ogrpg-core"]:findPlayer(plr,cel)
        if not target then
            outputChatBox("* Nie znaleziono podanego gracza."plr25500)
            return
        end
        if (getAdmin(plr,3) == false) and getAdmin(target,3then outputChatBox("Nie mozesz tego zrobic na rconie!",plr,255,0,0) return end
        local query=string.format("SELECT * FROM ogrpg_ban WHERE type=%q AND active=1 AND serial=%q AND time>NOW() LIMIT 1","ban"getPlayerSerial(target))
        local result=exports["ogrpg-db"]:pobierzWyniki(query)
        if (resultthen
            return outputChatBox(" Gracz Posiada Bana do "..result["time"]..", za: "..result["reason"], plr25500)
        else
            exports["ogrpg-db"]:dbSet("DELETE FROM ogrpg_ban WHERE type=? AND active=1 AND serial=?""ban"getPlayerSerial(target))
        end
        result=pobierzDate(type,time)
        reason reason.." |od "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").."|"
        if not result then outputChatBox("*Wpisales zla date **",plr,255,0,0) return end
        
        triggerClientEvent(root"admin:rendering"root"* "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").."("..getElementData(target,"id")..") otrzyma?(a) bana. Pow?d:"..reason.."("..time .. type ..")")
        exports["ogrpg-db"]:dbSet("INSERT INTO ogrpg_ban (serial,reason,time,type) VALUES (?,?,?,?)"getPlayerSerial(target), reasonresult"ban")
        kickPlayer(target,reason)
        --outputChatBox("* Dodanych rekord"plr)
    end
end)

addCommandHandler("pban", function(plr,cmd,cel,...)
    if  getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2then
        local reason=table.concat({...}, " ")
        if not cel or not reason then
            outputChatBox("* U?ycie: /pban <nick/ID> <pow?d>"plr)
            return
        end
        local target=exports["ogrpg-core"]:findPlayer(plr,cel)
        if not target then
            outputChatBox("* Nie znaleziono podanego gracza."plr25500)
            return
        end
        if (getAdmin(plr,3) == false) and getAdmin(target,3then outputChatBox("Nie mozesz tego zrobic na rconie!",plr,255,0,0) return end
        local query=string.format("SELECT * FROM ogrpg_ban WHERE type=%q AND active=1 AND serial=%q AND time>NOW() LIMIT 1","ban"getPlayerSerial(target))
        local result=exports["ogrpg-db"]:pobierzWyniki(query)
        if (resultthen
            return outputChatBox(" Gracz Posiada Bana do "..result["time"]..", za: "..result["reason"], plr25500)
        else
            exports["ogrpg-db"]:dbSet("DELETE FROM ogrpg_ban WHERE type=? AND active=1 AND serial=?""ban"getPlayerSerial(target))
        end
        reason reason.." |od "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").."|"
        
        triggerClientEvent(root"admin:rendering"root"* "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").."("..getElementData(target,"id")..") otrzyma?(a) bana "..reason.."(Na zawsze!)")
        exports["ogrpg-db"]:dbSet("INSERT INTO ogrpg_ban (serial,reason,time,type) VALUES (?,?,?,?)"getPlayerSerial(target), reason,"2030-12-31 23:59:59""ban")
        kickPlayer(target,reason)
        --outputChatBox("* Dodanych rekord"plr)
    end
end)







addCommandHandler("unban", function(plr,cmd,cel)
    if  getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2then
        if not cel then
            outputChatBox("* U?ycie: /unban <serial> "plr)
            return
        end
    --    if string.len(cel) ~= 32 then return outputChatBox("* B??dny serial "plrend
        local query=string.format("SELECT * FROM ogrpg_ban WHERE type=%q AND active=1 AND serial=%q AND time>NOW() LIMIT 1","ban"cel)
        local result=exports["ogrpg-db"]:pobierzWyniki(query)
        if (resultthen
            exports["ogrpg-db"]:dbSet("DELETE FROM ogrpg_ban WHERE type=? AND active=1 AND serial=?""ban"cel)
            outputChatBox("* Usunieto bana o serialu ("..cel..")!"plr02550)
        else
            outputChatBox("* Nie wykryto bana o serialu ("..cel..")!"plr02550)
        end
    end
end)

addCommandHandler("fix", function(plr,cmd)
    if getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1then
        local veh=getPedOccupiedVehicle(plr)
        if not veh then
            outputChatBox("* Nie znajdujesz si? w poje?dzie"plr)
            return
        end
        setElementHealth(veh1000)
        fixVehicle(veh)
    end
end)

addCommandHandler("vtt", function(plr,cmd,vid)
    if  getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1then
        if not vid or not tonumber(vidthen return end
        vid=tonumber(vid)
        for i,v in ipairs(getElementsByType("vehicle")) do
            local dbid=getElementData(v,"vehicle:id")
            if dbid and tonumber(dbid) == vid then
                local x,y,z=getElementPosition(v)
                setElementPosition(plr,x,y,z+4)
                setElementInterior(plrgetElementInterior(v))
                setElementDimension(plrgetElementDimension(v))
                if getAdmin(plr,3then
                warpPedIntoVehicle(plr,v)
                end
                return
            end
        end
        local query=exports["ogrpg-db"]:dbGet("SELECT 1 FROM ogrpg_vehicles WHERE id=? AND parking>0"vid)
        if query then
            outputChatBox("* Pojazd znajduje sie na parkingu/w przechowalni."plr25500)
        else
            outputChatBox("* Nie znaleziono podanego pojazdu na mapie."plr25500)
        end
    end
end)

addCommandHandler("vth", function(plr,cmd,vid)
    if  getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1then
        if not vid or not tonumber(vidthen return end
        vid=tonumber(vid)
        for i,v in ipairs(getElementsByType("vehicle")) do
            local dbid=getElementData(v,"vehicle:id")
            if dbid and tonumber(dbid) == vid then
                if getElementData(v,"vehicle:police_parking"then outputChatBox("*Auto jest na parkingu policyjnym!",plr,255,0,0) return end
                local x,y,z=getElementPosition(plr)
                setElementPosition(v,x,y,z+0.1)
                setElementInterior(vgetElementInterior(plr))
                setElementDimension(vgetElementDimension(plr))
                if getAdmin(plr,3then
                warpPedIntoVehicle(plr,v)
                end
                return
               end
        end
        local query=exports["ogrpg-db"]:dbGet("SELECT 1 FROM ogrpg_vehicles WHERE id=? AND parking>0"vid)
        if query then
            outputChatBox("* Pojazd znajduje sie na parkingu/w przechowalni."plr25500)
        else
            outputChatBox("* Nie znaleziono podanego pojazdu na mapie."plr25500)
        end
    end
end)


addCommandHandler("heal", function(plr,cmd,cel)
    if getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1then
        if not cel then
            outputChatBox("Uzyj: /heal <id/nick>"plr)
            return
        end
        local target=exports["ogrpg-core"]:findPlayer(plr,cel)
        if not target then
            outputChatBox("* Nie znaleziono podanego gracza."plr25500)
            return
        end
        setElementHealth(target100)
        outputChatBox("* Uleczy?e?(a?) gracza " ..getPlayerName(target):gsub("#%x%x%x%x%x%x",""), plr)
        outputChatBox("* Zosta?e? uleczony(a) przez "..getPlayerName(plr):gsub("#%x%x%x%x%x%x",""), target)
    end
end)

addCommandHandler("sserial", function(plr,cmd,cel)
    if getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1then
        if not cel then
            outputChatBox("Uzyj: /checkserial <id/nick>"plr)
            return
        end
        local target=exports["ogrpg-core"]:findPlayer(plr,cel)
        if not target then
            outputChatBox("* Nie znaleziono podanego gracza."plr25500)
            return
        end
        outputChatBox("* Serial gracza("..getPlayerName(target):gsub("#%x%x%x%x%x%x","").."): "..getPlayerSerial(target), plr)
    end
end)

addCommandHandler("spec", function(plr,cmd,cel)
    if  getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1then
        if not cel then
            outputChatBox("Uzyj: /spec <id/nick>"plr)
            return
        end
        local target=exports["ogrpg-core"]:findPlayer(plr,cel)
        if not target then
            outputChatBox("* Nie znaleziono podanego gracza."plr25500)
            return
        end
        local x,y,z=getElementPosition(plr)
        removePedFromVehicle(plr)
        setElementInterior(plrgetElementInterior(target))
        setElementDimension(plrgetElementDimension(target))
        setCameraTarget(plrtarget)
        setElementData(plr,"spec:pos",{x,y,z})
    end
end)

addCommandHandler("specoff", function(plr,cmd)
    if  getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1then
        local spec=getElementData(plr,"spec:pos")
        if not spec then return end
        setElementPosition(plrspec[1], spec[2], spec[3])
        setCameraTarget(plrplr)
    end
end)
function destroyBlipsAttachedTo(player)
    local attached getAttachedElements player )
    if ( attached then
        for k,element in ipairs(attached) do
            if getElementType element ) == "blip" then
                destroyElement element )
            end
        end
    end
end







addCommandHandler("inv", function(plr)
    if  getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1then
        if getElementAlpha(plr) > 0 then
            setElementAlpha(plr,0)
            destroyBlipsAttachedTo plr )
        else
            setElementAlpha(plr,255)
            local newValue getElementData(plr,"player:admin") -- find the new value
            if newValue == true then
                destroyBlipsAttachedTo (plr)
                createBlipAttachedTo plr02255255255 )
            else
                destroyBlipsAttachedTo plr )
                createBlipAttachedTo plr02255255255 )
            end
        end
    end
end)

addCommandHandler("invveh", function(plr)
    if  getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1then
        local plr=getPedOccupiedVehicle(plr)
        if not plr then return end
        if getElementAlpha(plr) > 0 then
            setElementAlpha(plr,0)
        else
            setElementAlpha(plr,255)
        end
    end
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-02-21, 13:06


kondisz357







Wiek: 25
Na forum: 3052 dni
Posty: 7
Nick w MP: discopolo



Respekt: 50

Da?e? skryptowi permisje admina resource.(nazwa skyptu np pystories-core)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-02-21, 15:21


EinfachFischi







Wiek: 23
Na forum: 2744 dni
Posty: 9
Nick w MP: Damianek



Respekt: 50

A.co zrobi? ?eby dzia?a?o?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-02-21, 15:23


Gravgor







Wiek: 22
Na forum: 3619 dni
Posty: 380
Nick w MP: 1944

Piwa: 702

Respekt: 57,8

Nadaj permisj? admina, jak napisali Ci powy?ej, powinno zadzia?a?. A je?li dalej nie b?dzie dzia?a?, sprawd? czy na pewno masz nadan? rang?.

Podpis
Portfolio marceliborowczak.me
Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-02-21, 16:07


EinfachFischi







Wiek: 23
Na forum: 2744 dni
Posty: 9
Nick w MP: Damianek



Respekt: 50

Czyli w ACL mam dopisa? w ADMIN resource.ogrpg-Core?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-02-21, 17:19


Gravgor







Wiek: 22
Na forum: 3619 dni
Posty: 380
Nick w MP: 1944

Piwa: 702

Respekt: 57,8

"EinfachFischi" napisał/a:

Czyli w ACL mam dopisa? w ADMIN resource.ogrpg-Core?


Tak, spr?buj A, dodaj tak?e resource.dutyadmin

Podpis
Portfolio marceliborowczak.me
Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-02-21, 20:57


EinfachFischi







Wiek: 23
Na forum: 2744 dni
Posty: 9
Nick w MP: Damianek



Respekt: 50

Nic nie zadzia?a?o

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-02-21, 20:59


Gravgor







Wiek: 22
Na forum: 3619 dni
Posty: 380
Nick w MP: 1944

Piwa: 702

Respekt: 57,8

Masz dany poziom admina?

Podpis
Portfolio marceliborowczak.me
Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-02-22, 00:22


EinfachFischi







Wiek: 23
Na forum: 2744 dni
Posty: 9
Nick w MP: Damianek



Respekt: 50

Tak

[ Dodano: 2019-02-22, 13:47 ]
Prosz? o pomoc

[ Dodano: 2019-02-22, 13:47 ]
Prosz? o pomoc

Postaw piwo autorowi tego posta
 

 
Tagi: komendy :: admina
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Komendy Admina 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