Axel Posted February 3, 2012 Posted February 3, 2012 Did someone managed to fix the sell housing in Mabako MTA Paradise? What i mean is this addCommandHandler( { "sellinterior", "sellproperty" }, function( player, ... ) local interiorID = getElementDimension( player ) local interior = interiors[ interiorID ] if interior then -- we can only sell owned houses if interior.type > 0 and interior.characterID == exports.players:getCharacterID( player ) then -- update the sql before anything else if exports.sql:query_free( "UPDATE interiors SET characterID = 0 WHERE interiorID = " .. interiorID ) then interiors.characterID = 0 exports.players:giveMoney( player, math.floor( interior.price ) ) -- restore the element data which shows it as not sold setElementData( interior.outside, "type", interior.type ) setElementData( interior.outside, "price", interior.price ) -- TODO: destroy all house keys -- HERE , RIGHT HERE!!! -- for now: destroy the person's key exports.items:take( player, 2, interior.id ) -- destroy a blip if there was one if isElement( interior.blip ) then destroyElement( interior.blip ) interior.blip = nil end
Axel Posted February 3, 2012 Author Posted February 3, 2012 Well in my server when i buy a house, i sell it then i buy it again, it doesn't buy it just enters..
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now