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

Wysłany: 2017-04-26, 22:37


Makumba1







Wiek: 31
Na forum: 3366 dni
Posty: 2



Respekt: 50

Witam,
Ot?? mam taki problem i? gdy daj? sobie premium przez Mysql nie otrzymuj? go na serwerze. Wie kto? mo?e jak to naprawi??

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-04-26, 23:16


saller123

Dopiero się ucze ;)






Wiek: 25
Na forum: 4679 dni
Posty: 95
Nick w MP: Davitek

Piwa: 212

Respekt: 70

Podaj jakiej paczki u?ywasz..
Chyba ?e jest to twoja w co w?tpie, podaj kod skryptu.
Je?eli jest to ogrpg w mysql ustalasz date premium (do kiedy wa?ne) oraz "premium" na 1 po czym musisz zrobic reloga(/reconnect).

Podpis
Jeżeli ci pomogłem, postaw piwerko :D
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-04-26, 23:17


amited







Wiek: 26
Na forum: 3714 dni
Posty: 1233
Nick w MP: Amited

Piwa: 512

Respekt: 466
Respekt: 466

No nie wiem bo mo?e kodu nie ma? Daj db3, poka? jak kod pobierasz z mysql i jak go ustawiasz itp..

Podpis
"amited" napisał/a:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-04-27, 07:53


Chrystek.

Programista LUA






Wiek: 26
Na forum: 3378 dni
Posty: 16
Nick w MP: Chrysto.

Piwa: 3

Respekt: 45,3

Ostrzeżeń: 100%
Saveplayer pewnie

Podpis



Programista LUA





Postęp prac: 15%

Forum: http://b-w.ct8.pl
TeamSpeak: FR3.ts-3.cx:11740
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-04-27, 09:18


DylemaT929

Nikt






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

Piwa: 3195

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

"Makumba1" napisał/a:

Witam,
Ot?? mam taki problem i? gdy daj? sobie premium przez Mysql nie otrzymuj? go na serwerze. Wie kto? mo?e jak to naprawi??


Modu? wgra?e? na serwer, dobrze skonfigurowa?e? ogrpg-db. Mo?e co? namiesza?e? w saveplayers. Podaj db3 lub kod saveplayers.lua. Przy okazji jak kod bedziesz wrzuca? to wpisz [lua] i zako?cz potem [/...] w miejscu kropek wpisz lua. Jest jeszcze opcja ?e baz? danych ?le wgra?e? :>

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-04-27, 15:45


Makumba1







Wiek: 31
Na forum: 3366 dni
Posty: 2



Respekt: 50

Tak wi?c tutaj macie saveplayer.lua, zauwa?y?em i? gdy dodam jeszcze zakodowany plik c_saveplayers.lua z paczki It's Your World'a to wszystko dzia?a tylko ?e gdy wjad? w blip b?d?c w oboj?tnie jakiej pracy zostaj? zbanowany permanentnie z dopiskiem AntyCheat MoneyHack. A gdy tego drugiego pliku nie ma tak?e premium nie dzia??

--[[
    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.
]]

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,"#FFBF00"..getPlayerName(plr))
        else
            setElementData(plr,"player:premium",false)
        end
        setElementData(plr,"player:skin",v.skin)
        end
        --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(""..getPlayerName(source).." 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        

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)


Postaw piwo autorowi tego posta
 

 
Tagi: premium :: nie :: działa
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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