Hello, I have these lines in globalevent script:
player[0] and player don't work, how can I send id there?
Code:
local ns_query =[[ SELECT id FROM players WHERE account_id !=1 AND players.town_id > 5 ]]
function onStartup(_time)
local player = db.getResult(ns_query)
if player:getID() ~= -1 then
repeat
db.executeQuery("UPDATE `players` SET `health` = 4000 WHERE `id` = " .. player[0])
player[0] and player don't work, how can I send id there?