Powiedz co ci nie dzia?a i daj wi?cej kodu bo ci??ko stwierdzi? jedyne co mi si? rzuca w oczy to to ?e nie poda?e? elementu gracza w triggerze, oraz to:
local dodaj = getAccountData(konto,"gracz:data") +1
setAccountData(konto,"gracz:data",data)
Wed?ug mnie powinno by? tak
local dodaj = tonumber(getAccountData(konto,"gracz:data"))
setAccountData(konto,"gracz:data",dodaj + 1)
function nastmarker(el)
if el~=localPlayer then return end
setElementFrozen(el,true)
addEventHandler("onClientRender",root,sd)
setTimer(function()
removeEventHandler("onClientRender",root,sd)
triggerServerEvent("data",localPlayer,getLocalPlayer(),1)
setElementFrozen(el,false)
end,2900,1)
end
Server
addEvent("data",true)
addEventHandler("data",root,function()
local konto = getPlayerAccount(source)
local dodaj = tonumber(getAccountData(konto,"gracz:data"))
setAccountData(konto,"gracz:data",dodaj+1)
end)
function nastmarker(el)
if el~=localPlayer then return end
setElementFrozen(el,true)
addEventHandler("onClientRender",root,sd)
setTimer(function()
removeEventHandler("onClientRender",root,sd)
triggerServerEvent("data",localPlayer)
setElementFrozen(el,false)
end,2900,1)
end
Server:
addEvent("data",true)
addEventHandler("data",root,function()
local konto = getPlayerAccount(client)
if not konto then return end
local dodaj = tonumber(getAccountData(konto,"gracz:data"))
setAccountData(konto,"gracz:data",dodaj+1)
end)
addEvent("data",true)
addEventHandler("data",root,function()
local konto = getPlayerAccount(client)
if not konto then return end
local dodaj = tonumber(getAccountData(konto,"gracz:data")) or 0 -- je?li gracz nie ma account daty ustaw w zmiennej 0
setAccountData(konto,"gracz:data",dodaj+1)
end)
addEvent("data",true)
addEventHandler("data",root,function()
local konto = getPlayerAccount(client)
if not konto then return end
local dodaj = getAccountData(konto,"gracz:data")
setAccountData(konto,"gracz:data",dodaj+1)
end)
Spr?buj tak...
Podpis
Użytkownik - 10-05-2016
Support Team - 17.06.2017 Moderator - 25.11.2017 Mod-Team - 02.07.2018
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