Its should work...
You just need to fill in the "No Owner Name" something like "The State"
function createHouseXX( x , y , z, ix, iy , iz , ii , cost , owner )
local pickup
if(owner == "?")then -- Fill the No Owner Name here
pickup = createPickup( x , y , z, 3 ,1272 ) -- Icon Id 1272 if the House is 2 sell
else
pickup = createPickup( x , y , z, 3 ,1273) -- if the House is occupied Icon ID 1273
end
pickupCount = pickupCount + 1
houseElement = "house"..pickupCount
id[ pickup ] = houseElement
HouseOutX[ houseElement ] = x
HouseOutY[ houseElement ] = y
HouseOutZ[ houseElement ] = z
HouseInX[ houseElement ] = ix
HouseInY[ houseElement ] = iy
HouseInZ[ houseElement ] = iz
HouseInI[ houseElement ] = ii
IsHousePickup[ houseElement ] = true
if existData_kihc( houseElement ) then
-- nothing
else
createData_kihc( houseElement )
saveData_kihc( houseElement , "owner" , owner )
saveData_kihc( houseElement , "cost" , cost )
saveData_kihc( houseElement , "rent" , "50" )
saveData_kihc( houseElement , "bank" , "0" )
end
return houseElement
end
Ps: We need the setHouseOwner Function too.