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

Wysłany: 2017-01-30, 16:08


Boski1234567891

Młody Skrypter






Wiek: 31
Na forum: 3444 dni
Posty: 89
Nick w MP: Medyk312

Piwa: 1965

Respekt: 25,8

Cze?? , mam pewien problem ot?z to ze premium mi dziala ale teraz mi /zpj nie dziala znaczy /zpj dziala zabiera typowi prawko ale moze do auta wsiasc ktos cos moze? dodalem resource.* do acl itd ale dalej to nie dziala a kodu nie podam bo nie wiem gdzie on sie znajdzuje PS: posiadam paczke gamemode z nlife 2.0


znalazlem ale chyba z?y kod w ogrpg-core >> vehlices_c.lua

--[[
    ResourceOURGame v2
    DevelopersSplit <split.programista@gmail.com>
    You have no right to use this code without my permission.
    (c2015 <split.programista@gmail.com>. All rights reserved.
]]


addCommandHandler("syrenki", function(plr,cmd)
    local vehicle=getPedOccupiedVehicle(plr)
    if not vehicle then return end
    if not getElementData(plr,"player:admin"then return end
    removeVehicleSirens(vehicle)
    addVehicleSirens(vehicle22truefalsetruefalse ) 
    setVehicleSirens(vehicle1, -0.600, -2.1000.40025500255255 )
    setVehicleSirens(vehicle20.600, -2.1000.40000255255255 )
end)


-- Get vehicle keys
function getVehicleKey(plr,veh)
    if plr and veh then
        local uid=getElementData(plr,"player:uid")
        if not uid then return end
        if getElementData(plr,"player:admin") or uid == getElementData(veh,"vehicle:ownedPlayer"then
            return true
        else
            return false
        end
    end
end
local categoryL={[592] = true,[553] = true,[577] = true,[488] = true,[511] = true,[497] = true,[548] = true,[563] = true,[512] = true,[476] = true,[593] = true,[447] = true,[425] = true,[519] = true,[520] = true,[460] = true,[417] = true,[469] = true,[487] = true,[513] = true}
addEventHandler("onVehicleStartEnter"root, function(plr,seat,jacked)
    if getElementHealth(source) < 302 then
        setElementHealth(source,302)
    end
end)
function jestwtabeli(***,truj)
    for k,v in pairs(***) do
        if == truj then
           return true
        end
    end
    return false
end
addCommandHandler("vdodaj",function(plr,cmd,target)
    local veh getPedOccupiedVehicle(plr)
    if not veh then outputChatBox("* Nie siedzisz w aucie!",plr,255,0,0) return end
    if getElementData(veh,"vehicle:ownedPlayer") ~= getElementData(plr,"player:uid"then outputChatBox("* Ten pojazd nie nale??y od ciebie!",plr,255,0,0) return end
    if not target then
        outputChatBox("* Zabrano dostep wszystkim gracz?&#8230;!",plr,255,0,0)
        setElementData(veh,"vehicle:rent",0)
    else
        local target=findPlayer(plrtarget)
        if not target then
            outputChatBox("* Nie znaleziono gracza online!",plr,255,0,0)
            return
        end
        local rent getElementData(veh,"vehicle:rent")
        if (type(rent) ~= "table"then
            local tabelka = {}
            table.insert(tabelka,getElementData(target,"player:uid"))
            setElementData(veh,"vehicle:rent",tabelka)
            outputChatBox(string.format("*Dodano gracza "..getPlayerName(target).."(UID :"..getElementData(target,"player:uid")..") do wypo??ycze?&#8222;"),plr)
        else
            local tabelka rent
            if jestwtabeli(tabelka,getElementData(target,"player:uid")) then outputChatBox("* Ten gracz aktualnie posiada kluczyki do twojego pojazdu!",plr) return end
             if #tabelka > 5 then outputChatBox("Mo??esz wypo??yczy?&#8225; maksymalnie 5 gracz?&#8230;!",plr) return end
            table.insert(tabelka,getElementData(target,"player:uid"))
            setElementData(veh,"vehicle:rent",tabelka)
            outputChatBox(string.format("*Dodano gracza "..getPlayerName(target).."(UID :"..getElementData(target,"player:uid")..") do wypo??ycze?&#8222;"),plr)
        end
    end
end)

-- Tutaj dalsza cze?&#8250;c kodu
addEventHandler("onVehicleStartEnter"root, function(plr,seat,jacked)
    if seat ~= 0 then return end
    if categoryL[getElementModel(source)] then 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(plr))
    local result=exports["DB2"]:pobierzWyniki(query)
    if (resultthen
        outputChatBox(" Posiadasz zawieszone prawo jazdy do "..result["time"]..", za: "..result["reason"], plr25500)
        cancelEvent()
    else
        exports["ogrpg-db"]:dbSet("DELETE FROM ogrpg_punish WHERE type=? AND active=1 AND serial=?""prawko"getPlayerSerial(plr))
    end
end)

addEventHandler("onVehicleEnter"root, function(plr,seat,jacked)
    if seat ~= 0 then return end
    if categoryL[getElementModel(source)] then return end
        local queryA=string.format("SELECT * FROM ogrpg_punish WHERE type=%q AND active=1 AND serial=%q AND time>NOW() LIMIT 1","prawko"getPlayerSerial(plr))
        local resultA=exports["DB2"]:pobierzWyniki(queryA)
        if (resultAthen
            --setControlState plr"enter_exit"true )
            setTimer(setControlState8001plr,"enter_exit"true)
            setTimer(setControlState18001plr,"enter_exit"false)
            outputChatBox("* Posiadasz zawieszone prawo jazdy do "..resultA["time"]..", za: "..resultA["reason"], plr25500)
        else
            exports["ogrpg-db"]:dbSet("DELETE FROM ogrpg_punish WHERE type=? AND active=1 AND serial=?""prawko"getPlayerSerial(plr))
        end
end)

addEventHandler("onVehicleStartEnter"root, function(plr,seat,jacked)
    if seat ~= 0 then return end
    if not categoryL[getElementModel(source)] then 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(plr))
    local result=exports["DB2"]:pobierzWyniki(query)
    if (resultthen
        outputChatBox(" Posiadasz zawieszona licencje  do "..result["time"]..", za: "..result["reason"], plr25500)
        cancelEvent()
    else
        exports["ogrpg-db"]:dbSet("DELETE FROM ogrpg_punish WHERE type=? AND active=1 AND serial=?""L"getPlayerSerial(plr))
    end
end)

addEventHandler("onVehicleEnter"root, function(plr,seat,jacked)
    if seat ~= 0 then return end
    if not categoryL[getElementModel(source)] then return end
        local queryA=string.format("SELECT * FROM ogrpg_punish WHERE type=%q AND active=1 AND serial=%q AND time>NOW() LIMIT 1","L"getPlayerSerial(plr))
        local resultA=exports["DB2"]:pobierzWyniki(queryA)
        if (resultAthen
            --setControlState plr"enter_exit"true )
            setTimer(setControlState8001plr,"enter_exit"true)
            setTimer(setControlState18001plr,"enter_exit"false)
            outputChatBox("* Posiadasz zawieszona licencje do "..resultA["time"]..", za: "..resultA["reason"], plr25500)
        else
            exports["ogrpg-db"]:dbSet("DELETE FROM ogrpg_punish WHERE type=? AND active=1 AND serial=?""L"getPlayerSerial(plr))
        end
end)

addCommandHandler("vopis", function(plr,cmd,...)
    if not getElementData(plr"player:admin"then outputChatBox("*Brak uprawnien"plr) return end
    local desc=table.concat(arg" ")
    local veh=getPedOccupiedVehicle(plr)
    if not veh then
        outputChatBox("* Musisz siedzie?&#8225; w poje??dzie kt??rego opis chcesz zmieni?&#8225;."plr25500)
        return
    end
    if getElementData(veh"vehicle:desc"then
        setElementData(veh"vehicle:desc"false)
    return end
    if string.len(desc) < 2 then
        outputChatBox("* U??ycie: /vopis <opis min 2 znaki>"plr)
        return
    end

    descc=string.format("%s"desc)
    setElementData(veh,"vehicle:desc",descc)
end)

addEventHandler "onVehicleEnter"getRootElement(), function(thePlayerseatjacked) 
    if seat==0 then
--        setVehicleDoorOpenRatio(source20500)
        if (getVehicleDoorState(source,2)==0then
            setVehicleDoorState(source,2,1)
            setVehicleDoorState(source,2,0)
        end
    elseif seat==1 then
        if (getVehicleDoorState(source,3)==0then
            setVehicleDoorState(source,3,1)
            setVehicleDoorState(source,3,0)
        end
    else
--        if (getVehicleDoorState(source,4)==0then
            setVehicleDoorState(source,4,1)
            setVehicleDoorState(source,4,0)
--        end
--        if (getVehicleDoorState(source,5)==0then
            setVehicleDoorState(source,5,1)
            setVehicleDoorState(source,5,0)
--        end

    end
end)

addEventHandler("onPlayerQuit"root, function()
    if not getElementData(source,"player:job"then return end
    local veh=getPedOccupiedVehicle(source)
    if not veh then return end
    local id=getElementData(veh,"vehicle:id")
    if not id then
    if getElementData(source,"player:job") == "Sweepers" then return end
    triggerEvent("destroyVehicle"rootveh)
    end
end)


--[[
function streamInelementforpl )
   element element or source
   if ( not getVehicleOccupant(element0) and not getVehicleOccupantelement) and not getVehicleOccupantelement) and not getVehicleOccupantelement) and not getVehicleOccupantelement) ) then
      local towed getVehicleTowedByVehicle(element)
      if towed then
        triggerClientEventforpl"setElementPosForPl"forplelementtowed ) 
      else
        triggerClientEventforpl"setElementPosForPl"forplelementfalse ) 
      end
   else
      local tower getVehicleTowingVehicle(element)
      if tower then
        triggerClientEventforpl"setElementPosForPl"forpltowerelement ) 
      else
        triggerClientEventforpl"setElementPosForPl"forplelementfalse ) 
      end
    end
end
addEvent"streamIn"true )

addEventHandler"streamIn"getRootElement(), streamIn )

]]--


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-03-12, 21:09


szeroki

BlueRP.pl Zapraszam GTA5






Wiek: 36
Na forum: 3876 dni
Posty: 104

Piwa: 9

Respekt: 55,8

Ostrzeżeń: 40%
Ten sam mam Problem jak to zrobic

Podpis
**⚡┃CyanRP┃⚡ **

**💻┃*Adres IP:*** *wyspa.cyanrp.pl*
**📱┃*Link do serwera discord:*** *https://discord.gg/MJKqHksanU
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-03-12, 23:51


Virahh

Weteran MTA






Wiek: 24
Na forum: 3466 dni
Posty: 38
Nick w MP: Eszteban

Piwa: 1326

Respekt: 71,5

Ostrzeżeń: 100%
W aclu zr?bcie zeby wasza grupa admin wygladala tak
<group name="Admin">
        <acl name="Moderator"></acl>
        <acl name="SuperModerator"></acl>
        <acl name="Admin"></acl>
        <acl name="RPC"></acl>
        <object name="user.TwojNick"></object>
        <object name="resource.ogrpg-admin"></object>
        <object name="resource.admin"></object>
        <object name="resource.webadmin"></object>
        <object name="resource.acpanel"></object>
        <object name="resource.*"></object>
    </group>


Jak nie zadziala sprobuj dodac jeszcze resource.ogrpg-core i resource.ogrpg-duty

Jak nie pomoze to nwm ;/

Podpis
Pomogłem? może jakieś :piwo: :)
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-03-13, 00:18


Gravgor







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

Piwa: 702

Respekt: 57,8

"Boski1234567891" napisał/a:

Cze?? , mam pewien problem ot?z to ze premium mi dziala ale teraz mi /zpj nie dziala znaczy /zpj dziala zabiera typowi prawko ale moze do auta wsiasc ktos cos moze? dodalem resource.* do acl itd ale dalej to nie dziala a kodu nie podam bo nie wiem gdzie on sie znajdzuje PS: posiadam paczke gamemode z nlife 2.0


znalazlem ale chyba z?y kod w ogrpg-core >> vehlices_c.lua

--[[
    ResourceOURGame v2
    DevelopersSplit <split.programista@gmail.com>
    You have no right to use this code without my permission.
    (c2015 <split.programista@gmail.com>. All rights reserved.
]]


addCommandHandler("syrenki", function(plr,cmd)
    local vehicle=getPedOccupiedVehicle(plr)
    if not vehicle then return end
    if not getElementData(plr,"player:admin"then return end
    removeVehicleSirens(vehicle)
    addVehicleSirens(vehicle22truefalsetruefalse ) 
    setVehicleSirens(vehicle1, -0.600, -2.1000.40025500255255 )
    setVehicleSirens(vehicle20.600, -2.1000.40000255255255 )
end)


-- Get vehicle keys
function getVehicleKey(plr,veh)
    if plr and veh then
        local uid=getElementData(plr,"player:uid")
        if not uid then return end
        if getElementData(plr,"player:admin") or uid == getElementData(veh,"vehicle:ownedPlayer"then
            return true
        else
            return false
        end
    end
end
local categoryL={[592] = true,[553] = true,[577] = true,[488] = true,[511] = true,[497] = true,[548] = true,[563] = true,[512] = true,[476] = true,[593] = true,[447] = true,[425] = true,[519] = true,[520] = true,[460] = true,[417] = true,[469] = true,[487] = true,[513] = true}
addEventHandler("onVehicleStartEnter"root, function(plr,seat,jacked)
    if getElementHealth(source) < 302 then
        setElementHealth(source,302)
    end
end)
function jestwtabeli(***,truj)
    for k,v in pairs(***) do
        if == truj then
           return true
        end
    end
    return false
end
addCommandHandler("vdodaj",function(plr,cmd,target)
    local veh getPedOccupiedVehicle(plr)
    if not veh then outputChatBox("* Nie siedzisz w aucie!",plr,255,0,0) return end
    if getElementData(veh,"vehicle:ownedPlayer") ~= getElementData(plr,"player:uid"then outputChatBox("* Ten pojazd nie nale??y od ciebie!",plr,255,0,0) return end
    if not target then
        outputChatBox("* Zabrano dostep wszystkim gracz?&#8230;!",plr,255,0,0)
        setElementData(veh,"vehicle:rent",0)
    else
        local target=findPlayer(plrtarget)
        if not target then
            outputChatBox("* Nie znaleziono gracza online!",plr,255,0,0)
            return
        end
        local rent getElementData(veh,"vehicle:rent")
        if (type(rent) ~= "table"then
            local tabelka = {}
            table.insert(tabelka,getElementData(target,"player:uid"))
            setElementData(veh,"vehicle:rent",tabelka)
            outputChatBox(string.format("*Dodano gracza "..getPlayerName(target).."(UID :"..getElementData(target,"player:uid")..") do wypo??ycze?&#8222;"),plr)
        else
            local tabelka rent
            if jestwtabeli(tabelka,getElementData(target,"player:uid")) then outputChatBox("* Ten gracz aktualnie posiada kluczyki do twojego pojazdu!",plr) return end
             if #tabelka > 5 then outputChatBox("Mo??esz wypo??yczy?&#8225; maksymalnie 5 gracz?&#8230;!",plr) return end
            table.insert(tabelka,getElementData(target,"player:uid"))
            setElementData(veh,"vehicle:rent",tabelka)
            outputChatBox(string.format("*Dodano gracza "..getPlayerName(target).."(UID :"..getElementData(target,"player:uid")..") do wypo??ycze?&#8222;"),plr)
        end
    end
end)

-- Tutaj dalsza cze?&#8250;c kodu
addEventHandler("onVehicleStartEnter"root, function(plr,seat,jacked)
    if seat ~= 0 then return end
    if categoryL[getElementModel(source)] then 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(plr))
    local result=exports["DB2"]:pobierzWyniki(query)
    if (resultthen
        outputChatBox(" Posiadasz zawieszone prawo jazdy do "..result["time"]..", za: "..result["reason"], plr25500)
        cancelEvent()
    else
        exports["ogrpg-db"]:dbSet("DELETE FROM ogrpg_punish WHERE type=? AND active=1 AND serial=?""prawko"getPlayerSerial(plr))
    end
end)

addEventHandler("onVehicleEnter"root, function(plr,seat,jacked)
    if seat ~= 0 then return end
    if categoryL[getElementModel(source)] then return end
        local queryA=string.format("SELECT * FROM ogrpg_punish WHERE type=%q AND active=1 AND serial=%q AND time>NOW() LIMIT 1","prawko"getPlayerSerial(plr))
        local resultA=exports["DB2"]:pobierzWyniki(queryA)
        if (resultAthen
            --setControlState plr"enter_exit"true )
            setTimer(setControlState8001plr,"enter_exit"true)
            setTimer(setControlState18001plr,"enter_exit"false)
            outputChatBox("* Posiadasz zawieszone prawo jazdy do "..resultA["time"]..", za: "..resultA["reason"], plr25500)
        else
            exports["ogrpg-db"]:dbSet("DELETE FROM ogrpg_punish WHERE type=? AND active=1 AND serial=?""prawko"getPlayerSerial(plr))
        end
end)

addEventHandler("onVehicleStartEnter"root, function(plr,seat,jacked)
    if seat ~= 0 then return end
    if not categoryL[getElementModel(source)] then 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(plr))
    local result=exports["DB2"]:pobierzWyniki(query)
    if (resultthen
        outputChatBox(" Posiadasz zawieszona licencje  do "..result["time"]..", za: "..result["reason"], plr25500)
        cancelEvent()
    else
        exports["ogrpg-db"]:dbSet("DELETE FROM ogrpg_punish WHERE type=? AND active=1 AND serial=?""L"getPlayerSerial(plr))
    end
end)

addEventHandler("onVehicleEnter"root, function(plr,seat,jacked)
    if seat ~= 0 then return end
    if not categoryL[getElementModel(source)] then return end
        local queryA=string.format("SELECT * FROM ogrpg_punish WHERE type=%q AND active=1 AND serial=%q AND time>NOW() LIMIT 1","L"getPlayerSerial(plr))
        local resultA=exports["DB2"]:pobierzWyniki(queryA)
        if (resultAthen
            --setControlState plr"enter_exit"true )
            setTimer(setControlState8001plr,"enter_exit"true)
            setTimer(setControlState18001plr,"enter_exit"false)
            outputChatBox("* Posiadasz zawieszona licencje do "..resultA["time"]..", za: "..resultA["reason"], plr25500)
        else
            exports["ogrpg-db"]:dbSet("DELETE FROM ogrpg_punish WHERE type=? AND active=1 AND serial=?""L"getPlayerSerial(plr))
        end
end)

addCommandHandler("vopis", function(plr,cmd,...)
    if not getElementData(plr"player:admin"then outputChatBox("*Brak uprawnien"plr) return end
    local desc=table.concat(arg" ")
    local veh=getPedOccupiedVehicle(plr)
    if not veh then
        outputChatBox("* Musisz siedzie?&#8225; w poje??dzie kt??rego opis chcesz zmieni?&#8225;."plr25500)
        return
    end
    if getElementData(veh"vehicle:desc"then
        setElementData(veh"vehicle:desc"false)
    return end
    if string.len(desc) < 2 then
        outputChatBox("* U??ycie: /vopis <opis min 2 znaki>"plr)
        return
    end

    descc=string.format("%s"desc)
    setElementData(veh,"vehicle:desc",descc)
end)

addEventHandler "onVehicleEnter"getRootElement(), function(thePlayerseatjacked) 
    if seat==0 then
--        setVehicleDoorOpenRatio(source20500)
        if (getVehicleDoorState(source,2)==0then
            setVehicleDoorState(source,2,1)
            setVehicleDoorState(source,2,0)
        end
    elseif seat==1 then
        if (getVehicleDoorState(source,3)==0then
            setVehicleDoorState(source,3,1)
            setVehicleDoorState(source,3,0)
        end
    else
--        if (getVehicleDoorState(source,4)==0then
            setVehicleDoorState(source,4,1)
            setVehicleDoorState(source,4,0)
--        end
--        if (getVehicleDoorState(source,5)==0then
            setVehicleDoorState(source,5,1)
            setVehicleDoorState(source,5,0)
--        end

    end
end)

addEventHandler("onPlayerQuit"root, function()
    if not getElementData(source,"player:job"then return end
    local veh=getPedOccupiedVehicle(source)
    if not veh then return end
    local id=getElementData(veh,"vehicle:id")
    if not id then
    if getElementData(source,"player:job") == "Sweepers" then return end
    triggerEvent("destroyVehicle"rootveh)
    end
end)


--[[
function streamInelementforpl )
   element element or source
   if ( not getVehicleOccupant(element0) and not getVehicleOccupantelement) and not getVehicleOccupantelement) and not getVehicleOccupantelement) and not getVehicleOccupantelement) ) then
      local towed getVehicleTowedByVehicle(element)
      if towed then
        triggerClientEventforpl"setElementPosForPl"forplelementtowed ) 
      else
        triggerClientEventforpl"setElementPosForPl"forplelementfalse ) 
      end
   else
      local tower getVehicleTowingVehicle(element)
      if tower then
        triggerClientEventforpl"setElementPosForPl"forpltowerelement ) 
      else
        triggerClientEventforpl"setElementPosForPl"forplelementfalse ) 
      end
    end
end
addEvent"streamIn"true )

addEventHandler"streamIn"getRootElement(), streamIn )

]]--

Modul mysql

Postaw piwo autorowi tego posta
 

 
Tagi: zpj :: 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 » zpj 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