[UCG]Mike Posted August 1, 2014 Share Posted August 1, 2014 hey guys i need help when i die i lost all my weapons i need any mod or script to stop it Link to comment
Perfect Posted August 18, 2014 Share Posted August 18, 2014 playerWeapons = {} root = getRootElement() local state = false -- Save Weapons. function saveWeapons() playerWeapons[source] = {} for i=1, 12 do table.insert(playerWeapons[source], getPedWeapon(source,i)) end state = true end addEventHandler("onPlayerWasted",root,saveWeapons) -- Load Weapons. function loadWeapons() if (state == true) then for i=1,12 do giveWeapon(source,tonumber(playerWeapons[source][i] )) end playerWeapons[source] = nil state = false end end addEventHandler ( "onPlayerSpawn", root, loadWeapons) Link to comment
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