Jump to content

mtasa25

Members
  • Posts

    4
  • Joined

  • Last visited

mtasa25's Achievements

Vic

Vic (3/54)

0

Reputation

  1. I already did that, still not working Can you try to make the resource and see if it works?
  2. Im not sure if that script works, i added it to the "Resources" folder in both "Server" and "Mod"
  3. I add it to a XML file and then what? On which folder does this go?
  4. 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
×
×
  • Create New...