Hi there, I need some help. I am using the house system created by dakilla, but i want to change some things in there.
Like the title saids, i want to replace the market that shows on the entrance when you create the house, for the green house object for players to buy it. This is the code:
local m_Enter = createMarker( eX, eY, eZ - 1, 'cylinder', 1.25, 0, 153, 255, 150 );
setElementData( m_Enter, 'HS_INFO', { etX, etY, etZ, int, dim, cost, owner, key, ID } );
if getElementData( m_Enter, 'HS_INFO' )[7] ~= '' then
setMarkerColor( m_Enter, 255, 51, 36, 150 );
end;
addEventHandler( 'onMarkerHit', m_Enter, function( player )
if getElementType( player ) == 'player' and not getPedOccupiedVehicle( player ) then
if not getElementData( player, 'HP_Opened' ) then
if not isGuestAccount( getPlayerAccount( player ) ) then
setElementData( player, 'mrk_in', getElementData( source, 'HS_INFO' )[9] );
onPlayerHouseMarkerHit( player, source, true );
setElementFrozen( player, true );
else
outputChatBox( '* You must be logged in to get in this house!', player, 255, 51, 36 );
end;
end;
end;
end );
I know i was giving you to much code, but you are more experinced that I am, and I am sure you can help me. I also have take a look on mtawiki, but the code doesn't work. I hope you really can help me. Thanks.