Wysłany: 2019-11-15, 22:21
kerfyn
Hyp3R
Wiek: 25 Na forum: 2739 dni Posty: 121
Nick w MP: Hyp3R
Piwa : 2
Potrzuj? Pomocy nie wiem z jakich przyczyn i dlaczego Nagle jak wpisuje ./vmoje To wyskakuja 2x id Kiedy wpisze vth przyk?adowo 9 To sie 2 auta Respi? Wie kto? jak naprawi? ? Nigdy nie mia?em doczynienia z takim b??dem
Wysłany: 2019-11-15, 23:38
Wilq
Wiek: 24 Na forum: 4429 dni Posty: 3410
Piwa : 739
Spr?buj wy??czy? skrypt odpowiedzialny za t? komend?. Je?li po wy??czeniu akcja wykonuje si? tylko raz to znaczy, ?e zduplikowa?e? skrypt. Je?li nic nie b?dzie, wy?lij kod tego skryptu z komend?.
Wysłany: 2019-11-16, 09:41
kerfyn
Hyp3R
Wiek: 25 Na forum: 2739 dni Posty: 121
Nick w MP: Hyp3R
Piwa : 2
No /vmoje To jest core czyli wy??czy? core sprawdzi? potem ?
Wysłany: 2019-11-16, 10:22
Szyszka947
ASP NET Core / Lua
Wiek: 19 Na forum: 2579 dni Posty: 288
Piwa : 16
Poka? kod od skryptu
Wysłany: 2019-11-16, 11:38
kerfyn
Hyp3R
Wiek: 25 Na forum: 2739 dni Posty: 121
Nick w MP: Hyp3R
Piwa : 2
Dobra auta nie dubluja sie Ale mam inny problem wole nie zaczyna? tematu nowego "co zrobi? mam jak gracz po wyjsciu i wejsciu na serwer traci pieniadze oraz prawka ? baza danych pod acl mam podpiete jak cos
Wysłany: 2019-11-16, 11:47
Loop
Inspektor
Wiek: 27 Na forum: 4289 dni Posty: 311
Nick w MP: Inspektor
Piwa : 201
Co? poprostu z zapisem statystyk graczy masz zwalone.
Wysłany: 2019-11-16, 11:53
kerfyn
Hyp3R
Wiek: 25 Na forum: 2739 dni Posty: 121
Nick w MP: Hyp3R
Piwa : 2
no nw a wiesz jak to naprawi? ?
Wysłany: 2019-11-16, 13:34
Wilq
Wiek: 24 Na forum: 4429 dni Posty: 3410
Piwa : 739
Zobacz na b??dy /debugscript 3.
Zadaj sobie pytanie, czy w og?le masz zapis statystyk. Przeszukaj pliki swojego serwera, mo?e baza danych MySQL nie jest pod??czona (albo SQL).
Wysłany: 2019-11-16, 14:04
kerfyn
Hyp3R
Wiek: 25 Na forum: 2739 dni Posty: 121
Nick w MP: Hyp3R
Piwa : 2
zero b??d?w w db 3 a baza danych jest pod??czona
potrzebuj? szybko pomocy zeby naprawi? to bo graczom znika hajs
Wysłany: 2019-11-16, 15:11
Wilq
Wiek: 24 Na forum: 4429 dni Posty: 3410
Piwa : 739
Nadal nie odpowiedzia?e?, czy w og?le masz takie co? jak zapis statystyk na serwerze. Mo?e wykonaj co? na szybko samemu:
no i tutaj wykonujesz zapytanie do bazy danych MySQL z wynikami danych gracza.
Wysłany: 2019-11-16, 16:05
kerfyn
Hyp3R
Wiek: 25 Na forum: 2739 dni Posty: 121
Nick w MP: Hyp3R
Piwa : 2
o to chodzi : Kod: 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", root, veh)
end
end)
Wysłany: 2019-11-16, 16:12
Wilq
Wiek: 24 Na forum: 4429 dni Posty: 3410
Piwa : 739
Tutaj sprawdzasz czy gracz siedzi w poje?dzie. Nie wiem jak to si? ma do zapisu statystyk.
Czyli to jednak nie to.
Wysłany: 2019-11-16, 17:28
kerfyn
Hyp3R
Wiek: 25 Na forum: 2739 dni Posty: 121
Nick w MP: Hyp3R
Piwa : 2
Kod: function getPremium(plr,premium)
if premium then
local result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_users WHERE id=? AND premium=?",getElementData(plr,"player:sid"), premium)
if result and #result > 0 then
return true
else
return false
end
else
local result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_users WHERE id=?", getElementData(plr,"player:sid"))
if result and #result > 0 then
return true
else
return false
end
end
end
function loadPlayerData(plr)
local result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_users WHERE id=?", getElementData(plr,"player:sid"))
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,"marihuana",v.marihuana)
setElementData(plr,"player:license:pjB",v.pjB)
setElementData(plr,"player:license:pjC",v.pjC)
setElementData(plr,"player:license:pjL",v.pjL)
setElementData(plr,"player:srp",v.srp)
setElementData(plr,"player:workinjob",v.worker)
setElementData(plr,"player:registerdate",v.registered)
setElementData(plr,"player:hours",v.hours)
setElementData(plr,"player:skin",v.skin)
setElementData(plr,"teoria:pjB",v.teoria_pjB)
setElementData(plr,"magazyn:paczki",v.paczki)
setElementData(plr,"free_premium",v.free_premium)
setElementData(plr,"punkty",v.punkty)
setElementData(plr,"pkt_busy",v.pkt_busy)
setElementData(plr,"zetony",v.zetony)
local queryA=string.format("SELECT * FROM pystories_users WHERE id=%d AND premiumdate>NOW() LIMIT 1", getElementData(plr,"player:sid"))
local resultA=exports["DB2"]:pobierzWyniki(queryA)
if (resultA) then
setElementData(plr,"player:premium",true)
setElementData(plr,"player:premiumdate",v.premiumdate)
setPlayerName(plr,"#ffe000"..getPlayerName(plr))
setElementData(plr,"premium:level",1)
else
setElementData(plr,"player:premium",false)
end
Kod: 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("pystories_users> Za?adowano statystyki gracza: "..getPlayerName(player))
end
end)
function savePlayerData(plr)
local sid=getElementData(plr,"player:sid")
if not sid 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 marihuana=getElementData(plr,"marihuana")
local punkty=getElementData(plr,"punkty")
local zetonki=getElementData(plr,"zetony")
local srp=getElementData(plr,"player:srp")
local worker =getElementData(plr,"player:workinjob")
local hours= tonumber(getElementData(plr,"player:hours")) or 0
local query=exports["pystories-db"]:dbSet("UPDATE pystories_users SET money=?, srp=?, marihuana=?, punkty=?, mandate=?, pjA=?, pjB=?, pjC=?, pjL=?, worker=?, hours=?, zetony=? WHERE id=?",
money, srp, marihuana,punkty, mandate, licensea, licenseb, licensec, licensel, worker, hours, zetonki, sid)
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("pystories_users> Zapisano statystyki gracza: "..getPlayerName(player))
end
end)
addEventHandler("onPlayerQuit", root, function() savePlayerData(source) end)
to jest to ?
Wilq zaradzisz co? bo tu chyba jest okej wszystko
Wysłany: 2019-11-16, 19:24
Wilq
Wiek: 24 Na forum: 4429 dni Posty: 3410
Piwa : 739
Masz elementDat? 'player:sid'? Bo chyba nigdzie nie widz?, ?eby? j? ustawia?. Wi?c dodaj ustawianie jej:
Wysłany: 2019-11-16, 20:39
kerfyn
Hyp3R
Wiek: 25 Na forum: 2739 dni Posty: 121
Nick w MP: Hyp3R
Piwa : 2
No jest przecie? przyk?adowo Kod: local result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_users WHERE id=?", getElementData(plr,"player:sid"))
Tagi: dublowanie :: sie :: aut
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: