mtasa25 Posted December 9, 2015 Posted December 9, 2015 Hello, i'm new to this community and i would like to have some help with this script. I don't understand quite well how you guys add new resources into your servers. local tempData = { } addEventHandler ( "onPlayerWasted", getRootElement(), function ( ) tempData [ source ] = { weapons = getWeaponsTable ( source ), skin = getElementModel ( source ) } end ) addEventHandler ( "onPlayerSpawn", getRootElement(), function ( ) if ( tempData [ source ] ) then setElementModel ( source, tempData [ source ].skin ) for weapon, ammo in pairs ( tempData [ source ].weapons ) do giveWeapon ( source, weapon, ammo, true ) end end end ) function getWeaponsTable ( thePlayer ) local weapons = { } local hasAnyWeapon = false for slot = 0, 12 do local weapon = getPedWeapon ( thePlayer, slot ) if ( weapon > 0 ) then local ammo = getPedTotalAmmo ( thePlayer, slot ) if ( ammo > 0 ) then weapons [ weapon ] = ammo hasAnyWeapon = true end end end if ( hasAnyWeapon ) then return weapons end end
mtasa25 Posted December 9, 2015 Author Posted December 9, 2015 I add it to a XML file and then what? On which folder does this go?
Best-Killer Posted December 9, 2015 Posted December 9, 2015 I add it to a XML file and then what? On which folder does this go? resource folder then go ig and open admin panel >resources>and start the resource
Castillo Posted December 10, 2015 Posted December 10, 2015 https://wiki.multitheftauto.com/wiki/Resources
mtasa25 Posted December 10, 2015 Author Posted December 10, 2015 Im not sure if that script works, i added it to the "Resources" folder in both "Server" and "Mod"
Best-Killer Posted December 10, 2015 Posted December 10, 2015 Im not sure if that script works, i added it to the "Resources" folder in both "Server" and "Mod" go to Resources folder and make new folder then add the script in the folder
mtasa25 Posted December 10, 2015 Author Posted December 10, 2015 I already did that, still not working Can you try to make the resource and see if it works?
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