• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Premium points for everyone who is logged in.

Faraonekkk

New Member
Joined
Feb 15, 2010
Messages
686
Reaction score
4
How can i give for everyone "XX points to sms shop"? (he need to be online)
Is this command, or my sql?
Thanks.
 
LUA:
function doAddPointsToOnline(points)
	local accounts = {}
	for _, pid in ipairs(getPlayersOnline()) do
		table.insert(accounts, getPlayerAccountId(pid))
	end
	db.executeQuery("UPDATE `accounts` SET `premium_points` = `premium_points` + " .. points .. " WHERE `id` IN (" .. table.concat(accounts, ',') .. ");")
end
 
Back
Top