localPlayer nie istnieje, pewnie jest ?le u?o?ona komenda. Daj j? ca??
if getElementData(source,"player:premium") then
local queryA=string.format("SELECT * FROM og_premium WHERE uid='?' AND date > NOW() LIMIT 1", getElementData(player, "player:uid"))
local resultA=exports["goyd-db"]:pobierzWyniki(queryA)
if (resultA) then
-- outputChatBox("* Konto premium wa?ne do " ..resultA["premiumdate"], source)
end
end
triggerClientEvent(source,"core:blipyaut",root,source)
end)
setTimer(function()
if not getElementData(localPlayer,"player:premium") then return end
triggerServerEvent("givePlayerMoney", localPlayer, 15000)
outputChatBox("[Premium] Dostajesz 15000 PLN za przegranie 10 minut!",255, 215, 0)
end,60000*10,0)
Wnioskuj?c po kodzie poprzedzaj?cym timer plik jest umieszczony po stronie servera,
wi?c
setTimer(
function()
for _, player in ipairs(getElementsByType("player")) do
if getElementData(player,"player:premium") then
triggerEvent("givePlayerMoney", player, 15000)
outputChatBox("[Premium] Dostajesz 15000 PLN za przegranie 10 minut!", player, 255, 215, 0)
end
end
end,
60000*10,0)
Wnioskuj?c po kodzie poprzedzaj?cym timer plik jest umieszczony po stronie servera,
wi?c
setTimer(
function()
for _, player in ipairs(getElementsByType("player")) do
if getElementData(player,"player:premium") then
triggerEvent("givePlayerMoney", player, 15000)
outputChatBox("[Premium] Dostajesz 15000 PLN za przegranie 10 minut!", player, 255, 215, 0)
end
end
end,
60000*10,0)
No chyba co? tutaj nie pasuje tutaj masz kod jak zadzia?a licze na
setTimer(function()
local players=getElementsByType('player')
for _, p in pairs(players) do
if getElementData(p, "player:online") and tonumber(getElementData(p, "player:online")) > 60 then
if getElementData(p, "player:online") == 60 then
local hour = getElementData(localPlayer,"player:hours") or 0
setElementData(localPlayer,"player:hours",hour+1)
end
setElementData(p, "player:online", 0)
if getElementData(p, "player:premium") then
triggerEvent("givePlayerMoney", p, 1500, false)
outputChatBox("[Premium] Dostajesz 15000 PLN za przegranie 10 minut!", player, 255, 215, 0)
end
end
end
end, 60000, 0)
No chyba co? tutaj nie pasuje tutaj masz kod jak zadzia?a licze na
setTimer(function()
local players=getElementsByType('player')
for _, p in pairs(players) do
if getElementData(p, "player:") and tonumber(getElementData(p, "player:")) > 60 then
if getElementData(p, "player:") == 60 then
local hour = getElementData(localPlayer,"player:hours") or 0
setElementData(localPlayer,"player:hours",hour+1)
end
setElementData(p, "player:", 0)
if getElementData(p, "player:premium") then
triggerEvent("givePlayerMoney", p, 1500, false)
outputChatBox("[Premium] Dostajesz 15000 PLN za przegranie 10 minut!", player, 255, 215, 0)
end
end
end
end, 60000, 0)
niestety ?adna z tych funkcji nie daje
[ Dodano: 2017-06-26, 10:14 ]
Jakie? b??dy w DB3?
?adne
[ Dodano: 2017-06-26, 11:00 ]
setTimer(function()
local players=getElementsByType('player')
for _, p in pairs(players) do
if getElementData(p, "player:online") and tonumber(getElementData(p, "player:online")) > 1 then
if getElementData(p, "player:online") == 1 then
local hour = getElementData(localPlayer,"player:hours") or 0
setElementData(localPlayer,"player:hours",hour+1)
end
setElementData(p, "player:online", 0)
if getElementData(p, "player:premium") then
givePlayerMoney(p, 250, false)
outputChatBox("[Premium] Dostajesz 15000 PLN za przegranie 10 minut! ", player, 255, 215, 0)
end
end
end
end, 60000, 0)
dodam ?e pieni?dze daje dla premium ale pokazuje ka?demu outputChatBox a chodzi aby pisa?o tylko dla premium
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