UserToDelete Posted May 19, 2015 Share Posted May 19, 2015 Bastante util para los servidores freeroam local data = {} function guardar () data[source] = {} for ID=0, 12 do local WEAP = getPedWeapon(source, ID) if WEAP then if WEAP >= 1 then local AMMO = getPedTotalAmmo(source, ID) if AMMO >= 1 then data[source][ID] = {tonumber(WEAP), tonumber(AMMO)} end end end end end addEventHandler("onPlayerWasted", root, guardar) function cargar () if data[source] ~= nil then for ZK=0, 12 do if data[source][ZK] ~= nil then giveWeapon(source, data[source][ZK][1], data[source][ZK][2], false) end end end end addEventHandler("onPlayerSpawn", root, cargar) 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