Lua:
local resultId = db.storeQuery("SELECT `id`, `owner` FROM `houses` WHERE NOT `owner` = 0 AND (SELECT `premdays` FROM `accounts` WHERE (SELECT `account_id` FROM `players` WHERE `id` = `owner`) = `id`) = 0")
if resultId ~= false then
repeat
local house = House(result.getDataInt(resultId, "id"))
if house then
house:setOwnerGuid(0)
end
until not result.next(resultId)
result.free(resultId)
end
I need to make a script like this, but instead of checking if the player is premium or not, to use the house:setOwnerGuid(0) function, the script I need needs to check if the player is deleted 1 in the players column, if he has 1 in the deleted column, will change his house to house:setOwnerGuid(0)