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

Wysłany: 2017-01-02, 17:06


mixLoLmix2

Programista






Wiek: 35
Na forum: 4113 dni
Posty: 454
Nick w MP: TomeQmix

Piwa: 1915

Respekt: 47,3

Mam problem bo mam skrypt organizacje ogrpg i jest po??czony z Msql itp ale jak si? dodaje w Msql to pisze nie jeste? w organizacji i nie ma db wiecie Czm?

Podpis
Zajmuję się pisaniem zaawansowanych skryptów lua na zamówienie za bardzo niską cene.
Oraz pomoc przy serwerze mta/forum i tym podobnych.
Discord: TomeQmix#7106
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-01-02, 18:07


_Haze

Peace Yo!






Wiek: 24
Na forum: 4184 dni
Posty: 1648
Nick w MP: Haze

Piwa: 2628

Respekt: 1020
Respekt: 1020

Naprawd? dzia? lua by? stworzony z my?l? o lua a nie o ogrpg... Nie poda?e? kodu ja nadal nie mam ogrpg na kompie i nie b?d? mia? po tym co widz? na forum. Wi?c prosz? podaj kod.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-01-02, 18:18


Barcioo

Kiedyś to było ST






Wiek: 26
Na forum: 4048 dni
Posty: 458
Nick w MP: Bartek.

Piwa: 1887

Respekt: 460
Respekt: 460

Daj ss'a z Bazy msql z ogranizacji i podaj kod

Podpis
Kanał Youtube;
A tu zapraszam
, pomogłem Ci? Wynagrodź mnie :piwo: :)


SUPPORT TEAM- 2016-09-03 do 2018-05-25
Test Mod- 2018-05-25
1k dni na Forum - 2018-01-28


GG: 62111935
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-01-02, 18:43


mixLoLmix2

Programista






Wiek: 35
Na forum: 4113 dni
Posty: 454
Nick w MP: TomeQmix

Piwa: 1915

Respekt: 47,3

BarteQ03, Nie mo?esz zamkn?? bo to m?j temat...
Zaraz wy?l?

[ Dodano: 2017-01-02, 21:15 ]
https://zapodaj.net/31b9662d15791.png.html

Podpis
Zajmuję się pisaniem zaawansowanych skryptów lua na zamówienie za bardzo niską cene.
Oraz pomoc przy serwerze mta/forum i tym podobnych.
Discord: TomeQmix#7106
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-01-02, 21:18


Barcioo

Kiedyś to było ST






Wiek: 26
Na forum: 4048 dni
Posty: 458
Nick w MP: Bartek.

Piwa: 1887

Respekt: 460
Respekt: 460

mixLoLmix2, napisa?em oraz kod ...

[ Dodano: 2017-01-02, 21:18 ]
skryptu

Podpis
Kanał Youtube;
A tu zapraszam
, pomogłem Ci? Wynagrodź mnie :piwo: :)


SUPPORT TEAM- 2016-09-03 do 2018-05-25
Test Mod- 2018-05-25
1k dni na Forum - 2018-01-28


GG: 62111935
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-01-02, 21:37


DylemaT929

Nikt






Wiek: 28
Na forum: 4041 dni
Posty: 333
Nick w MP: dylemat929

Piwa: 3195

Respekt: 165,8
Respekt: 165,8Respekt: 165,8

Dodaj to do ogrpg-core saveplayers.lua Sam si? naszuka?em i znalaz?em mam nadzieje ?e ci to pomo?e. Masz tam to wklei?

Kod:


local org=exports["ogrpg-db"]:dbGet("SELECT * FROM tl_organizacje WHERE code=? AND uid=? LIMIT 1", getElementData(plr,"player:organization"), getElementData(plr,"player:uid")) -- 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 tl_organizacje SET actived=curdate() WHERE uid=?", getElementData(plr,"player:uid"))


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-01-02, 23:39


mixLoLmix2

Programista






Wiek: 35
Na forum: 4113 dni
Posty: 454
Nick w MP: TomeQmix

Piwa: 1915

Respekt: 47,3

Dzi?kuj? jutro sprawdz? wi?c nie zamykajcie

Podpis
Zajmuję się pisaniem zaawansowanych skryptów lua na zamówienie za bardzo niską cene.
Oraz pomoc przy serwerze mta/forum i tym podobnych.
Discord: TomeQmix#7106
Postaw piwo autorowi tego posta
 

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


DylemaT929

Nikt






Wiek: 28
Na forum: 4041 dni
Posty: 333
Nick w MP: dylemat929

Piwa: 3195

Respekt: 165,8
Respekt: 165,8Respekt: 165,8

Tylko tl_organizacje Zmie? na ogrpg_organizations chodzi mi o tabele mysql

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-01-03, 16:32


mixLoLmix2

Programista






Wiek: 35
Na forum: 4113 dni
Posty: 454
Nick w MP: TomeQmix

Piwa: 1915

Respekt: 47,3

Mam problem poniewa? jak zrobi?em to z tym kodem ci mi da?es to wywali?o ca?y serwer ,,Zapis"

Wklei mi kto? go tu?

function loadPlayerData(plr)
    local result=exports["ogrpg-db"]:dbGet("SELECT * FROM ogrpg_users WHERE id=?"getElementData(plr,"player:uid"))
    if result and #result > 0 then
        local v=result[1]
        setPlayerMoney(plr,v.money)
        setElementModel(plr,v.skin)
        setElementData(plr,"status","Aktywny")
        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)
        local queryA=string.format("SELECT * FROM ogrpg_users WHERE id=%d AND premiumdate>NOW() LIMIT 1"getElementData(plr,"player:uid"))
        local resultA=exports["ogrpg-db"]:pobierzWyniki(queryA)
        if (resultAthen
            setElementData(plr,"player:premium",true)
            setElementData(plr,"player:premiumdate",v.premiumdate)
            setPlayerName(plr,"#dbb234"..getPlayerName(plr))
        else
            setElementData(plr,"player:premium",false)
        end
        setElementData(plr,"player:skin",v.skin)
        return true
    end
    return false
end



[ Dodano: 2017-01-03, 16:33 ]
Zrobi?em to w taki spos?b, Mo?e kto? mi to zrobi??



function loadPlayerData(plr)
    local result=exports["ogrpg-db"]:dbGet("SELECT * FROM ogrpg_users WHERE id=?"getElementData(plr,"player:uid"))
    if result and #result > 0 then
        local v=result[1]
        setPlayerMoney(plr,v.money)
        setElementModel(plr,v.skin)
        setElementData(plr,"status","Aktywny")
        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)
        --Organizacje
        local org=exports["ogrpg-db"]:dbGet("SELECT * FROM ogrpg_organizations WHERE code=? AND uid=? LIMIT 1"getElementData(plr,"player:organization"), getElementData(plr,"player:uid")) -- 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 ogrpg_organizations SET actived=curdate() WHERE uid=?"getElementData(plr,"player:uid"))
        --Organizacje ^^^
        local queryA=string.format("SELECT * FROM ogrpg_users WHERE id=%d AND premiumdate>NOW() LIMIT 1"getElementData(plr,"player:uid"))
        local resultA=exports["ogrpg-db"]:pobierzWyniki(queryA)
        if (resultAthen
            setElementData(plr,"player:premium",true)
            setElementData(plr,"player:premiumdate",v.premiumdate)
            setPlayerName(plr,"#dbb234"..getPlayerName(plr))
        else
            setElementData(plr,"player:premium",false)
        end
        setElementData(plr,"player:skin",v.skin)
        return true
    end
    return false
end


[ Dodano: 2017-01-03, 16:50 ]
Zamykam

[ Dodano: 2017-01-03, 17:03 ]
Jednak mam problem bo po tych zmianach premium nie dza?a

[ Dodano: 2017-01-03, 17:15 ]
Premium juz dza?a, Ale niestety nie moge zrobi? aby dza?a?o Orgnizacje KOD



function loadPlayerData(plr)
    local result=exports["ogrpg-db"]:dbGet("SELECT * FROM ogrpg_users WHERE id=?"getElementData(plr,"player:uid"))
    if result and #result > 0 then
        local v=result[1]
        setPlayerMoney(plr,v.money)
        setElementModel(plr,v.skin)
        setElementData(plr,"status","Aktywny")
        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)
        --Organizacje
        local org=exports["ogrpg-db"]:dbGet("SELECT * FROM ogrpg_organizations WHERE code=? AND uid=? LIMIT 1"getElementData(plr,"player:organization"), getElementData(plr,"player:uid")) -- 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 ogrpg_organizations SET actived=curdate() WHERE uid=?"getElementData(plr,"player:uid"))
        --Organizacje ^^^
        local queryA=string.format("SELECT * FROM ogrpg_users WHERE id=%d AND premiumdate>NOW() LIMIT 1"getElementData(plr,"player:uid"))
        local resultA=exports["ogrpg-db"]:pobierzWyniki(queryA)
        if (resultAthen
            setElementData(plr,"player:premium",true)
            setElementData(plr,"player:premiumdate",v.premiumdate)
            setPlayerName(plr,"#dbb234"..getPlayerName(plr))
        else
            setElementData(plr,"player:premium",false)
        end
        setElementData(plr,"player:skin",v.skin)
        return true
    end
    return false
end



--[[


local org=exports["ogrpg-db"]:dbGet("SELECT * FROM tl_organizacje WHERE code=? AND uid=? LIMIT 1"getElementData(plr,"player:organization"), getElementData(plr,"player:uid")) -- 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].codeoutputChatBox("* Jeste? w organizacji "..org[1].code..""plrexports['ogrpg-db']:dbSet("UPDATE tl_organizacje SET actived=curdate() WHERE uid=?"getElementData(plr,"player:uid"))

]]--



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 uid=getElementData(plr,"player:uid")
    if not uid 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,hoursuid)
end
addEvent("save:player",true)
addEventHandler("save:player"root, function(player)
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)



Podpis
Zajmuję się pisaniem zaawansowanych skryptów lua na zamówienie za bardzo niską cene.
Oraz pomoc przy serwerze mta/forum i tym podobnych.
Discord: TomeQmix#7106
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-01-03, 17:30


DylemaT929

Nikt






Wiek: 28
Na forum: 4041 dni
Posty: 333
Nick w MP: dylemat929

Piwa: 3195

Respekt: 165,8
Respekt: 165,8Respekt: 165,8

Kod:


function loadPlayerData(plr)
local result=exports["ogrpg-db"]:dbGet("SELECT * FROM ogrpg_users WHERE id=?", getElementData(plr,"player:uid"))
if result and #result > 0 then
local v=result[1]
setPlayerMoney(plr,v.money)
setElementModel(plr,v.skin)
setElementData(plr,"status","Aktywny")
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)
local queryA=string.format("SELECT * FROM ogrpg_users WHERE id=%d AND premiumdate>NOW() LIMIT 1", getElementData(plr,"player:uid"))
local resultA=exports["ogrpg-db"]:pobierzWyniki(queryA)
if (resultA) then
setElementData(plr,"player:premium",true)
setElementData(plr,"player:premiumdate",v.premiumdate)
setPlayerName(plr,"#dbb234"..getPlayerName(plr))
else
setElementData(plr,"player:premium",false)
end
setElementData(plr,"player:skin",v.skin)
end
--org
local org=exports["ogrpg-db"]:dbGet("SELECT * FROM tl_organizacje WHERE code=? AND uid=? LIMIT 1", getElementData(plr,"player:organization"), getElementData(plr,"player:uid")) -- 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 tl_organizacje SET actived=curdate() WHERE uid=?", getElementData(plr,"player:uid"))
end
end



i masz jeszcze tak


Postaw piwo autorowi tego posta
 

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


mixLoLmix2

Programista






Wiek: 35
Na forum: 4113 dni
Posty: 454
Nick w MP: TomeQmix

Piwa: 1915

Respekt: 47,3

Dziekuje

[ Dodano: 2017-01-03, 18:50 ]
A jak doda? auta do org? Chodzi mi o komende albo co? a nie w MySQL,
Jak co? mam panel Organizacji

Podpis
Zajmuję się pisaniem zaawansowanych skryptów lua na zamówienie za bardzo niską cene.
Oraz pomoc przy serwerze mta/forum i tym podobnych.
Discord: TomeQmix#7106
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-01-03, 19:09


mis14







Wiek: 25
Na forum: 3924 dni
Posty: 185

Piwa: 73

Respekt: -149

"mixLoLmix2" napisał/a:

Dziekuje

[ Dodano: 2017-01-03, 18:50 ]
A jak doda? auta do org? Chodzi mi o komende albo co? a nie w MySQL,
Jak co? mam panel Organizacji
przepisywanie mog? ci zrobi? ale zale?y jak masz ogrpg-vehitles kod

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-01-03, 21:15


mixLoLmix2

Programista






Wiek: 35
Na forum: 4113 dni
Posty: 454
Nick w MP: TomeQmix

Piwa: 1915

Respekt: 47,3

mis14,
Zwyk?y nic nie zmieniane, tylko dodany zapis neon?w

Podpis
Zajmuję się pisaniem zaawansowanych skryptów lua na zamówienie za bardzo niską cene.
Oraz pomoc przy serwerze mta/forum i tym podobnych.
Discord: TomeQmix#7106
Postaw piwo autorowi tego posta
 

 
Tagi: organizacje
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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