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

Wysłany: 2017-03-12, 18:01


Boski1234567891

Młody Skrypter






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

Piwa: 1965

Respekt: 25,8

Witam. M?j problem pochodzi o tym ?e... na serwerze dzia?a premka a org nie a jak zabiore komus prawo jazdy to moze wsiadac do pojazdu wszystko wgra?em modu? tez owszem mam wgrany nwm o co chodzi a acl itd mam tez dodane /k i /b tez dziala :?

Prosz? o pomoc

db3

http://imgur.com/a/VVr48

Ostatnio zmieniony przez Boski1234567891 2017-03-12, 18:12, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-03-12, 18:05


marcin778

Krytyk serwerów MTA






Wiek: 24
Na forum: 4149 dni
Posty: 2268
Nick w MP: Marcineg

Piwa: 4662

Respekt: 1436,8
Respekt: 1436,8

Kod podaj...

Podpis
Moje prace: https://www.youtube.com/c...MuaWGHPp1mhlGnw

-- obecnie
-- obecnie
-- dawniej
-- dawniej
-- dawniej
Postaw piwo autorowi tego posta
 

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


Boski1234567891

Młody Skrypter






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

Piwa: 1965

Respekt: 25,8

jedynie z czego kod moge podac to z ogrpg-core saveplayers_c saveplayers.lua


function loadPlayerData(plr)
    local result=exports["ogrpg-db"]:dbGet("SELECT * FROM ogrpg_users WHERE id=?"getElementData(plr,"player:rid"))
    if result and #result > 0 then
        local v=result[1]
        setPlayerMoney(plr,v.money)
        setElementModel(plr,v.skin)
        setElementData(plr,"player:logged",true)
        setElementData(plr,"player:mandate",v.mandate)
        setElementData(plr,"player:license:pjA",v.pjA)
        setElementData(plr,"player:license:pjB",v.pjB)
        setElementData(plr,"player:license:pjC",v.pjC)
        setElementData(plr,"player:license:pjL",v.pjL)
        setElementData(plr,"player:reputation",v.reputation)
        setElementData(plr,"player:workinjob",v.worker)
        setElementData(plr,"player:registerdate",v.registered)
        setElementData(plr,"player:hours",v.hours)
        -- org
        local org=exports["ogrpg-db"]:dbGet("SELECT * FROM ms_organizacje WHERE code=? AND rid=? LIMIT 1"getElementData(plr,"player:organization"), getElementData(plr,"player:rid")) -- pobieramy tylko JEDEN rekord
        local name getPlayerName(plr):gsub("#%x%x%x%x%x%x","")
        if org and #org > 0 then
            setElementData(plr,"player:organization",org[1].code)
            outputChatBox("* Jeste?› w organizacji "..org[1].code..""plr)
            exports['ogrpg-db']:dbSet("UPDATE ms_organizacje SET actived=curdate() WHERE rid=?"getElementData(plr,"player:rid"))
        end
        return true
    end
    return false
end

addEvent("load:player",true)
addEventHandler("load:player"root, function(player)
if isElement(player) and player then
if getElementType(player) ~= "player" then return end
loadPlayerData(player)
outputDebugString("Zaladowano statystyki gracza :"..getPlayerName(player))
end
end)

function savePlayerData(plr)
    local rid=getElementData(plr,"player:rid")
    if not rid then return end
    local money=getPlayerMoney(plr)
    local mandate=getElementData(plr,"player:mandate")
    local licensea=getElementData(plr,"player:license:pjA")
    local licenseb=getElementData(plr,"player:license:pjB")
    local licensec=getElementData(plr,"player:license:pjC")
    local licensel=getElementData(plr,"player:license:pjL")
    local reputation=getElementData(plr,"player:reputation")
    local worker =getElementData(plr,"player:workinjob")
    local hourstonumber(getElementData(plr,"player:hours")) or 0
    local query=exports["ogrpg-db"]:dbSet("UPDATE ogrpg_users SET money=?, reputation=?, mandate=?, pjA=?, pjB=?, pjC=?, pjL=?, worker=?, hours=? WHERE id=?",
    moneyreputationmandatelicensealicenseblicenseclicensel,worker,hoursrid)
end

addEvent("save:player",true)
addEventHandler("save:player"root, function(player)
local id getElementData(player,"player:rid")
if isElement(player) and player then
if getElementType(player) ~= "player" then return end
savePlayerData(player)
outputDebugString("Zapisano statystyki gracza :"..getPlayerName(player))
end
end)
addEventHandler("onPlayerQuit"root, function() savePlayerData(sourceend)

addEvent("zapisz:typa",true)
addEventHandler("zapisz:typa"root, function(player)
local id getElementData(player,"player:rid")
if isElement(player) and player or getElementData(player,"player:logged"then
if getElementType(player) ~= "player" then return end
savePlayerData(player)
outputDebugString("Zapisano statystyki gracza :"..getPlayerName(player))
end
end)


local timer=getTickCount()
--[[
addEventHandler("onClientRender",root,function()
    local tick=getTickCount()
    if tick-timer>=1000 then
        timer=getTickCount()
        local h=getElementData(localPlayer,"h") or 0
local m=getElementData(localPlayer,"player:hours") or 0
        local s=getElementData(localPlayer,"s") or 0
        s=s+1
        if s>=60 then
            s=0
            m=m+1
        end
        setElementData(localPlayer,"s",s)
        setElementData(localPlayer,"player:hours",m)
        if m>=60 then
            m=0
            h=h+1
        end
        setElementData(localPlayer,"m",m)
        setElementData(localPlayer,"h",h)
    end
end)
]]
local minuta 60
addEventHandler("onClientRender",root,function()
    local uid=getElementData(localPlayer,"player:uid")
    if not uid then return end
    local tick=getTickCount()
    if tick-timer>=minuta*1000 then
        timer=getTickCount()
        local m=getElementData(localPlayer,"player:hours") or 0
        setElementData(localPlayer,"player:hours",m+1)
    end
end)


DODAM JESZCZE ZE MAM ZAKODOWANE SAVEPLAYERS.LUA MOZE TEMU TO NIE DZIALA? DA? BY KTOS ODKODOWANE?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-03-12, 18:36


marcin778

Krytyk serwerów MTA






Wiek: 24
Na forum: 4149 dni
Posty: 2268
Nick w MP: Marcineg

Piwa: 4662

Respekt: 1436,8
Respekt: 1436,8

Masz poda? kod tam gdzie s? te komendy /b /k itd.

Podpis
Moje prace: https://www.youtube.com/c...MuaWGHPp1mhlGnw

-- obecnie
-- obecnie
-- dawniej
-- dawniej
-- dawniej
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-03-12, 18:41


Boski1234567891

Młody Skrypter






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

Piwa: 1965

Respekt: 25,8

function RGBToHex(redgreenbluealpha)
    if((red or red 255 or green or green 255 or blue or blue 255) or (alpha and (alpha or alpha 255))) then
        return nil
    end
    if(alphathen
        return string.format("#%.2X%.2X%.2X%.2X"red,green,blue,alpha)
    else
        return string.format("#%.2X%.2X%.2X"red,green,blue)
    end
end

-- Settings
function pobierzDate(type,time)

    realTime=getRealTime()
    type=tostring(type)
    time=tonumber(time)
    if time 0 then return end
    if type == "m" then if time 59 then return end value1=realTime.minute+time else value1=realTime.minute end
    if type == "h" then if time 23 then return end value2=realTime.hour+time else value2=realTime.hour end
    if type == "d" then if time 31 then return end value3=realTime.monthday+time else value3=realTime.monthday end
    if type == "w" then  if time 11 then return end value4=realTime.month+time else value4=realTime.month end
    if value1 >= 60 then value1 value1-60value2=value2+1 end
    if value2 >= 24 then value2 value2-24value3=value3+1 end
    if value3 >= 31 then value3 value3-31value4=value4+1 end
    date=string.format("%04d-%02d-%02d "realTime.year+1900value4+1value3)
    time=string.format("%02d:%02d:%02d"value2value1realTime.second)
    --outputChatBox(date..time,root)
    return date..time
end
rangi = {
[5] = "Developer",
[4] = "Zalozyciel NLife",
[3] = "Administrator RCON",
[2] = "Administrator",
[1] = "Support",
}
addCommandHandler('e', function(plr,cmd, ...)
if getAdmin(plr,1) or getAdmin(plr,2) or getAdmin(plr,3) or getAdmin(plr,4) or getAdmin(plr,5then
if not ... then
  local x getElementData(plr,"player:ekipaoff")
  if == false then
    outputChatBox("Wy??czy?e? czat ekipy",plr2552550true)
    setElementData(plr,"player:ekipaoff",true)
  end
  if == true then
    outputChatBox("W??czy?e? czat ekipy",plr2552550true)
    setElementData(plr,"player:ekipaoff",false)
  end
return end
if ... then
if getElementData(plr,"player:ekipaoff") == true then outputChatBox("Posiadasz wy??czone wiadomo?ci tego czatu, nie mo?esz na nim pisa?!"plr255255255) return end
local msg=table.concat({...}, " ")
    ranga nil
            local rank getVisualRank(plr)
            if rank then
                ranga rank
            else
                ranga rangi[tonumber(getLevel(plr))]
            end
            for _p in pairs(getElementsByType('player')) do
                if getAdmin(p,1) or getAdmin(p,2) or getAdmin(p,3) or getAdmin(p,4) or getAdmin(p,5) and not getElementData(p,"player:ekipaoff"then
                    outputChatBox("[Czat ekipy]"..getPlayerName(plr).." ("..tonumber(getElementData(plr,"id"))..")".."|"..ranga..": #ffffff"..msg,p,60,172,120,true)
                end
            end
        end
    end
end)



-- Truj
addCommandHandler("syrena", function(plr,cmd)
    if getAdmin(plr,3) or getAdmin(plr,4) or getAdmin(plr,5then
    local vehicle=getPedOccupiedVehicle(plr)
    if not vehicle then return end
    removeVehicleSirens(vehicle)
    addVehicleSirens(vehicle42truefalsetruefalse )
    setVehicleSirens(vehicle1, -0.600, -2.1000.40025500255255 )
    setVehicleSirens(vehicle20.600, -2.1000.40000255255255 )
    setVehicleSirens(vehicle3, -0.6001.1000.40025500255255 )
    setVehicleSirens(vehicle40.6001.1000.40000255255255 )
    end
end)

addCommandHandler("c", function(plr,cmd,...)
    if getAdmin(plr,4) or getAdmin(plr,5then
        local text=table.concat({...}, " ")
        outputChatBox(">> "..text.." #ffffff- "..getPlayerName(plr):gsub("#%x%x%x%x%x%x",""), root6496224,true)
    end
end)

addCommandHandler("r", function(plr,cmd,...)
    if getAdmin(plr,3) or getAdmin(plr,4then
        local text=table.concat({...}, " ")
        outputChatBox(">> "..text.." #ffffff- "..getPlayerName(plr):gsub("#%x%x%x%x%x%x",""), root10000,true)
    end
end)

addCommandHandler("a", function(plr,cmd,...)
    if getAdmin(plr,2) or getAdmin(plr,3) or getAdmin(plr,4then
        local text=table.concat({...}, " ")
        outputChatBox(">> "..text.." #ffffff- "..getPlayerName(plr):gsub("#%x%x%x%x%x%x",""), root25500,true)
    end
end)

addCommandHandler("s", function(plr,cmd,...)
    if getAdmin(plr,1) or getAdmin(plr,3) or getAdmin(plr,4then
        local text=table.concat({...}, " ")
        outputChatBox(">> "..text.." #ffffff- "..getPlayerName(plr):gsub("#%x%x%x%x%x%x",""), root01020,true)
    end
end)

addCommandHandler("notification", function(plr,cmd,tyr,...)
    if getAdmin(plr,3) or getAdmin(plr,4then
        if not ... or not tyr then triggerClientEvent(plr,"addNotification",root,"Wpisz /notification [error/success/warning/info] (tekst) ","error") return end
        local text=table.concat({...}, " ")
        for _p in pairs(getElementsByType('player')) do
        triggerClientEvent(p,"addNotificatione",root,text,tyr)
        end
    end
end)
addCommandHandler("ninfo", function(plr,cmd,...)
    if getAdmin(plr,3) or getAdmin(plr,4then
        if not ... then triggerClientEvent(plr,"addNotification",root,"Wpisz /ninfo (tekst) ","error") return end
        local text=table.concat({...}, " ")
        for _p in pairs(getElementsByType('player')) do
        triggerClientEvent(p,"addNotificatione",root,text,"info")
        end
    end
end)



-- Komendy rcon?w
addCommandHandler("przepisz.gracz", function(plr,cmd,value)
    if getAdmin(plr,3) or getAdmin(plr,4) or getAdmin(plr,5then
        local veh=getPedOccupiedVehicle(plr)
        if not veh then
            outputChatBox("* Nie siedzisz w poje?dzie."plr25500)
            return
        end
        setElementData(veh,"vehicle:ownedPlayer",tonumber(value))
        outputChatBox("* Przepisa?e?(a?) pojazd do gracza: "..valueplr)
    end
end)

addCommandHandler("przepisz.offline", function(plr,cmd,pojazd,uid)
    if getAdmin(plr,3) or getAdmin(plr,4) or getAdmin(plr,5then
    if not pojazd or not tonumber(pojazdthen
        outputChatBox("U?yj: /przepisz.offline <id pojazdu><uid>"plr)
        return
    end
    if not uid or not tonumber(uidthen
        outputChatBox("U?yj: /przepisz.offline <id pojazdu><uid>"plr)
        return
    end
    pojazd=tonumber(pojazd)
    uid=tonumber(uid)
    local result exports['ogrpg-db']:dbGet("SELECT ogrpg_vehicles.*,ogrpg_users.login FROM ogrpg_vehicles left join ogrpg_users on ogrpg_users.id=ogrpg_vehicles.ownedPlayer WHERE ogrpg_vehicles.id=? and parking=1",pojazd)
    if not result or #result < 1 then
    outputChatBox("*Nie znaleziono pojazdu lub nie jest w przechowalni!",plr)
    return end
    local model exports['ogrpg-db']:dbGet("UPDATE ogrpg_vehicles set ownedPlayer=? where id=?",uid,pojazd)
    exports["ogrpg-db"]:dbSet("INSERT INTO ogrpg_logs (name,data) VALUES (?,NOW())""Przepiszanie pojazdu o id >"..pojazd.." na gracza uid > "..uid)
    outputChatBox("**Przepisanie auta o id"..pojazd.." na gracza "..uid,plr)
    end
end)


addCommandHandler("daj.kase", function(plr,cmd,cel,value)
    if getAdmin(plr,4) or getAdmin(plr,5then
        if not cel or not tonumber(valuethen
            outputChatBox("* U?ycie: /daj.kase <nick/ID> <koszt>"plr)
            return
        end
        local target=exports["ogrpg-core"]:findPlayer(plr,cel)
        if not target then
            outputChatBox("* Nie znaleziono podanego gracza."plr25500)
            return
        end
        givePlayerMoney(targetvalue)
        outputChatBox("* Otrzyma?e?(a?) od systemu "..value.." PLN"target)
        outputChatBox ("Nada?e? "..value.." PLN dla gracza "..getPlayerName(target):gsub("#%x%x%x%x%x%x",""),plr)
    end
end)


addCommandHandler("daj.ogp", function(plr,cmd,cel,value,...)
    if getAdmin(plr,3) or getAdmin(plr,4) or getAdmin(plr,5then
        local reason=table.concat({...}, " ")
        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
        exports["ogrpg-db"]:dbSet("UPDATE ogrpg_users SET reputation=? WHERE id=?"getElementData(target,"player:reputation")+valuegetElementData(target"player:uid"))
        setElementData(target,"player:reputation"getElementData(target,"player:reputation")+value)
        outputChatBox("* Otrzyma?e?(a?)  "..value.." Reputacji!"target)
        outputChatBox ("Nada?e? "..value.." reputacji dla gracza "..getPlayerName(target):gsub("#%x%x%x%x%x%x",""),plr)
        triggerClientEvent(root"admin:rendering2"root"* "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").."("..getElementData(target,"id")..") zosta?(a) nagrodzony punktami REPUTACJI(+"..value..") przez ' "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").." ' z powodu: "..reason.."")
        exports["ogrpg-db"]:dbSet("INSERT INTO ogrpg_reputa (uid,kto_dostal,kto_dal,ilosc,powod) VALUES (?,?,?,?,?)"getElementData(target,"player:uid"), getPlayerName(target):gsub("#%x%x%x%x%x%x",""), getPlayerName(plr):gsub("#%x%x%x%x%x%x",""), valuereason)
    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,1) or getAdmin(plr,5then
        if isPedInVehicle(plrthen
            removePedFromVehicle(plr)
        end
        if doesPedHaveJetPack(plrthen
            removePedJetPack(plr)
        else
            givePedJetPack(plr)
        end
    end
end)

-- komendy support?w
addCommandHandler("przeladuj", function(plr,cmd,cel,...)
    if getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,5then
        local reason=table.concat({...}, " ")
        if not cel or not reason then
            outputChatBox("* U?ycie: /przeladuj <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
        triggerEvent("save:player",root,target)
        triggerEvent("load:player",root,target)
    end
end)
addCommandHandler("wczytaj", function(plr,cmd,cel,...)
    if getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,5then
        local reason=table.concat({...}, " ")
        if not cel or not reason then
            outputChatBox("* U?ycie: /wczytaj <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
        triggerEvent("load:player",root,target)
    end
end)
addCommandHandler("zapisz", function(plr,cmd,cel,...)
    if getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,5then
        local reason=table.concat({...}, " ")
        if not cel or not reason then
            outputChatBox("* U?ycie: /wczytaj <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
        triggerEvent("save:player",root,target)
    end
end)
addCommandHandler("przeladujall", function(plr,cmd,cel,...)
    if getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,5then
        for i,v in ipairs(getElementsByType("player")) do
        if isElement(vthen
        triggerEvent("save:player",root,v)
        triggerEvent("load:player",root,v)
        end
        end
        outputChatBox("* Administrator przeladowal wszystkim statystyki"root21,0,170,true)
    end
end)
addCommandHandler("zapiszall", function(plr,cmd)
    if getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,5then
        for i,v in ipairs(getElementsByType("player")) do
        if isElement(vthen
        triggerEvent("save:player",root,v)
        end
        end
        outputChatBox("* Administrator zapisal wszystkim statystyki"root21,0,170,true)
    end
end)
addCommandHandler("rozdajpienionzki", function(plr,cmd,pinion)
    if not pinion then return end
    if not tonumber(pinionthen return end
    if getAdmin(plr,4) or getAdmin(plr,5then
        for i,v in ipairs(getElementsByType("player")) do
        if isElement(vthen
        givePlayerMoney(v,pinion)
        end
        end
        outputChatBox("* Administrator doda? ka?demu graczowi "..pinion.." PLN"root255,0,0,true)
    end
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-03-12, 18:57


xluq







Wiek: 30
Na forum: 3411 dni
Posty: 64
Nick w MP: SagaPlayer8912

Piwa: 3

Respekt: 80

dodaj skrypt w acl

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-03-12, 19:04


Boski1234567891

Młody Skrypter






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

Piwa: 1965

Respekt: 25,8

Dalej nic :/

[ Dodano: 2017-03-12, 19:20 ]
CHCIA?BYM JESZCZE DODAC ZE TE OGRPG-CORE>>SAVEPLAYERS.LUA JEST ZAKODOWANE :/ DA KTOS ODKODWANE? LUB ODKODUJE?

Postaw piwo autorowi tego posta
 

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


xluq







Wiek: 30
Na forum: 3411 dni
Posty: 64
Nick w MP: SagaPlayer8912

Piwa: 3

Respekt: 80

Wez np. Z pysa

We? debugscript 3 i spr?buj skickowac, I daj errora

Postaw piwo autorowi tego posta
 

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


Boski1234567891

Młody Skrypter






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

Piwa: 1965

Respekt: 25,8

Jezu... ale ja ci pisz? ze kick i ban dziala tylko zpj nie... i organizacje

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-03-12, 22:03


mis14







Wiek: 25
Na forum: 3924 dni
Posty: 185

Piwa: 73

Respekt: -149

Jezu widz? ?e nic nie znaj? si? ludzie wida? dok?adnie nie nie ma modu?u mysql

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-03-13, 15:03


Boski1234567891

Młody Skrypter






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

Piwa: 1965

Respekt: 25,8

jak m?wie ze jest modu? to jest...


[2017-03-13 15:00] loadmodule: Requested by Console
[2017-03-13 15:00] loadmodule: Module already loaded

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-04-05, 08:19


Mazurrr







Wiek: 25
Na forum: 3941 dni
Posty: 31
Nick w MP: Kamilo008

Piwa: 1

Respekt: 50

Ja te? mam ten b??d ale mniejsza.
Poka? mi acl

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-04-12, 10:11


MagiK.

Lua :-)






Wiek: 26
Na forum: 3441 dni
Posty: 102

Piwa: 391

Respekt: 35,8

Dodaj do acl z nazw? resource.*

Postaw piwo autorowi tego posta
 

 
Tagi: gangi :: organizacje :: zpj
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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