[lua]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+0.5)
end
setElementData(p, "player:online", 0)
if getElementData(p, "player:premium") then
givePlayerMoney(p, 250000)
rp = getElementData(p, "player:srp")
setElementData(p, "player:srp", rp+10)
triggerClientEvent(p, "createNotif",p,"Otrzymujesz 250,000$ oraz 10 RP za przegranie 30 minut",3,"success")
outputChatBox("#00ff00✔ #ffffff- Otrzymujesz 250,000$ oraz 10 RP za przegranie 30 minut!",p,255,255,255,true)
end
if getElementData(p, "player:premiumplus") then
givePlayerMoney(p, 400000)
rp = getElementData(p, "player:srp")
zeton = getElementData(p, "player:zetony")
setElementData(p, "player:srp", rp+20)
setElementData(p, "player:zetony", zeton+1)
triggerClientEvent(p,"[GOLD] Otrzymujesz 400,000$ oraz 20 RP za przegranie 30 minut oraz 1 zeton",3,"success")
outputChatBox(&...
Mam ma?y problem bo jak mam t? linijke to nie zapisuje nic w databasie
kod:
function zbieracz(el, md)
if el ~= localPlayer or not md then return end
if getPedOccupiedVehicle(localPlayer) then
triggerEvent('onClientAddNotification', localPlayer, 'Nie mozesz zbierac w pojezdzie!', 'error')
return end
triggerEvent('onClientAddNotification', localPlayer, 'Zbierasz topy....', 'info')
setElementFrozen(el, true)
setPedAnimation(localPlayer, "COP_AMBIENT", "Copbrowse_nod", -1, true, false )
setTimer(function()
local topy = math.random(1,3)
setElementFrozen(el, false)
setPedAnimation(localPlayer, false)
t? tutaj--> exports["pystories-db"]:dbSet("UPDATE pystories_users SET jablka=jablka+"..topy.." WHERE id=?", getElementData(el, "player:sid"))
triggerEvent('onClientAddNotification', localPlayer, 'Zebrales '..topy..' topa(y)', 'success')
end, 4000, 1)
showMarker()
playSoundFrontEnd(12)
end
[20-01-22 15] WARNING: sarp_interiors/sourceS.lua:125: dbPoll failed; You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT * FROM interiors ORDER BY interiorId DESC LIMIT 1' at line 1
[20-01-22 15] ERROR: sarp_interiors/sourceS.lua:125: attempt to index a boolean value
Prosi?bym o pomoc, nie dzia?a stworzenie interioru.
Please help me, I have got 1 script where is everything from gamemode ( It is database ) and how to connect it with my database online ( dbadmin.sk I can give you password and you can do it please ) But when I click to IMPORT and take this file ERROR and when I click to database and copy this text there ERROR