local iOwner = pPlot:GetOwner() -- id of player owning the plot or -1 if none
local pCity = pPlot:GetWorkingCity() -- city working the plot or nil if none
local iCity = pPlot:GetCityPurchaseID() -- id of city that acquired plot
To set the ownership of a plot
Code:
pPlot:SetOwner(iNewOwner, iOwningCity)
take care with SetOwner() if the plot is already owned and being worked, as there are numerous hoops to jump through disconnecting the worker in the old city BEFORE the new player/city can take ownership.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.