Jump to content

Search the Community

Showing results for tags 'vending machine'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

Found 1 result

  1. Hi .. I've made a vending machine mod and I'm trying to make it shows up on marker in XML design, I already took an example of what I need, the bank_system has one what I did is copying the xml server file in that mod and edit it to make it right, well its confusing to me because I'm new at this, I pasted the whole code just in case, The problem is might be in Xmlserver.lua, exactly right here: function bankInit( ) local xml_root = xmlLoadFile( "bar.locations.xml" ) local banks = 0 while( xmlFindChild( xml_root, "bank", banks ) ) do local markerSize local tempID = banks+1 banksInfo[ tempID ] = { } local bank_node = xmlFindChild( xml_root, "bank", banks ) banksInfo[ tempID ].name = xmlNodeGetAttribute( bank_node, "name" ) banksInfo[ tempID ].useBlip = xmlNodeGetAttribute( bank_node, "blip" ) or true local bank_loc = xmlFindChild( bank_node, "location", 0 ) banksInfo[ tempID ].posX = tonumber( xmlNodeGetAttribute( bank_loc, "posX" ) ) banksInfo[ tempID ].posY = tonumber( xmlNodeGetAttribute( bank_loc, "posY" ) ) banksInfo[ tempID ].posZ = tonumber( xmlNodeGetAttribute( bank_loc, "posZ" ) ) banksInfo[ tempID ].interior = tonumber( xmlNodeGetAttribute( bank_loc, "interior" ) ) or 0; markerSize = tonumber( xmlNodeGetAttribute( bank_loc, "markerSize" ) ) or 2 banksInfo[ tempID ].marker = createMarker( banksInfo[ tempID ].posX, banksInfo[ tempID ].posY, banksInfo[ tempID ].posZ-.9, "cylinder", markerSize, 250, 0, 0, 100 ) setElementInterior( banksInfo[ tempID ].marker, banksInfo[ tempID ].interior ); if xmlNodeGetAttribute( bank_loc, "ATM" ) == "true" then local rot = tonumber( xmlNodeGetAttribute( bank_loc, "ATMRot" ) ) or 0.0 local x, y, z = banksInfo[ tempID ].posX, banksInfo[ tempID ].posY, banksInfo[ tempID ].posZ x = x + math.sin( math.rad( rot ) ) * .6 y = y + math.cos( math.rad( rot ) ) * .6 banksInfo[ tempID ].ATM = createObject( 2942, x, y, z-.35, 0, 0, (360-rot) ) setElementInterior( banksInfo[ tempID ].ATM, tonumber( xmlNodeGetAttribute( bank_loc, "interior" ) ) or 0 ) setElementParent( banksInfo[ tempID ].ATM, banksInfo[ tempID ].marker ) end banks = banks + 1 end <banks> <bank name="Western Onion ATM" > <location posX="2630.6667480469" posY="1655.393046875" posZ="11.0234375" ATM="true" interior="0" ATMRot="180.0" markerSize="1" /> </bank> </banks> I did a few small edits to make it work, but I actually can't detect the problem and why this is not working, Any help is appreciated .
×
×
  • Create New...