SHARE
TWEET

Untitled

a guest May 19th, 2017 44 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Remove houses
  2.     local resultId = db.storeQuery("SELECT `id` FROM `players` WHERE `lastlogin` < 1493596800")
  3.     if resultId ~= false then
  4.         repeat
  5.             local houseResult = db.storeQuery("SELECT `id` FROM `houses` WHERE `owner` = " .. result.getDataInt(resultId, "id"))
  6.             if houseResult ~= false then
  7.                 local house = House(result.getDataInt(houseResult, "id"))
  8.                 if house ~= nil then
  9.                     print("House: " .. house:getId() .. " and owner: " .. result.getDataInt(resultId, "id") .. " is cleaning.")
  10.                     house:setOwnerGuid(0)
  11.                 end
  12.                 result.free(houseResult)
  13.             end
  14.         until not result.next(resultId)
  15.         result.free(resultId)
  16.     end
RAW Paste Data
Challenge yourself this year...
Learn something new in 2017
Top