Orangotango Posted August 13, 2015 Posted August 13, 2015 (edited) 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. Edited August 13, 2015 by Guest
KariiiM Posted August 13, 2015 Posted August 13, 2015 (edited) Put your code between [lua] [ /lua],because it's hard to read like that Edited August 13, 2015 by Guest
Orangotango Posted August 13, 2015 Author Posted August 13, 2015 thanks for the tip, i have already put the code
KariiiM Posted August 13, 2015 Posted August 13, 2015 thanks for the tip, i have already put the code You want to change the house object to green? i didn't get your point
Orangotango Posted August 13, 2015 Author Posted August 13, 2015 Let me explain. When I create a house, appears a blue cylinder for me to intectact with the house. I want to change the cylinder to a green house object like in sigle player.
KariiiM Posted August 13, 2015 Posted August 13, 2015 Anyway, i think i got you local m_Enter = createPickup(eX, eY, eZ,3,1273,0); 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 ( "onPickupHit", 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 );
Orangotango Posted August 13, 2015 Author Posted August 13, 2015 It changed the icon, but, when i buy the house, i m getting stucked. I disconnect and connect again, and i didn't buy the house. But that's the ideia I was looking for.
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