flirtyboy23 Posted April 5, 2011 Share Posted April 5, 2011 function spawnWasted(player) repeat until spawnPlayer ( player, 1606.76, 1816.60, 10.82, 180, math.random(19,25) ) fadeCamera(player, true) setCameraTarget(player, player) setPlayerTeam" class="kw6">setPlayerTeam (player, nil) takePlayerMoney ( player, 150 ) end addEventHandler("onPlayerWasted", root, function() setTimer(spawnWasted, 1800, 1, source) end ) why is it that undeath it changes skin can some one help me fix it to be same skin u died with Link to comment
CowTurbo Posted April 6, 2011 Share Posted April 6, 2011 function spawnWasted(player) local skin = getElementModel ( player ) repeat until spawnPlayer ( player, 1606.76, 1816.60, 10.82, 180, math.random(19,25) ) fadeCamera(player, true) setCameraTarget(player, player) setPlayerTeam" class="kw6">setPlayerTeam (player, nil) takePlayerMoney ( player, 150 ) setElementModel ( skin ) end addEventHandler("onPlayerWasted", root, function() setTimer(spawnWasted, 1800, 1, source) end ) Link to comment
Castillo Posted April 6, 2011 Share Posted April 6, 2011 setElementModel ( skin ) o,O, i think you forgot something there? Link to comment
qaisjp Posted April 6, 2011 Share Posted April 6, 2011 repeat until spawnPlayer ( player, 1606.76, 1816.60, 10.82, 180, skin, math.random(19,25)) Link to comment
Moderators Citizen Posted April 6, 2011 Moderators Share Posted April 6, 2011 function spawnWasted(player) local skin = getElementModel ( player ) repeat until spawnPlayer ( player, 1606.76, 1816.60, 10.82, 180, skin ) fadeCamera(player, true) setCameraTarget(player, player) -- setPlayerTeam (player, nil) in spawnPlayer function, the team is already nil takePlayerMoney ( player, 150 ) end addEventHandler("onPlayerWasted", root, function() setTimer(spawnWasted, 1800, 1, source) end ) Link to comment
flirtyboy23 Posted April 6, 2011 Author Share Posted April 6, 2011 but how to make keep weapons Link to comment
Castillo Posted April 6, 2011 Share Posted April 6, 2011 Hmm, try with this: function spawnWasted(player) local skin = getElementModel ( player ) repeat until spawnPlayer ( player, 1606.76, 1816.60, 10.82, 180, skin ) fadeCamera(player, true) setCameraTarget(player, player) takePlayerMoney ( player, 150 ) local i = 0 for i=0,13 do local theWeapon = getPedWeapon(player, i) local weaponAmmo = getPedTotalAmmo(player, i) setTimer (giveWeapon, 1000, 1, player, theWeapon, weaponAmmo, true) i = i +1 end end addEventHandler("onPlayerWasted", root, function() setTimer(spawnWasted, 1800, 1, source) end ) Link to comment
flirtyboy23 Posted April 6, 2011 Author Share Posted April 6, 2011 Bad Argument @Giveweapon Link to comment
CowTurbo Posted April 7, 2011 Share Posted April 7, 2011 setElementModel ( skin ) o,O, i think you forgot something there? yea, my bad, i writed that fast.. 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