macr1408 Posted May 25, 2011 Share Posted May 25, 2011 i want to disable random skin when i die example: i select skin 181, i die, and i spawn with skin 181 how i can do it? thanks Link to comment
CowTurbo Posted May 25, 2011 Share Posted May 25, 2011 which gamemode are u using ? Play ? then use edit it. U will need getElementModel setElementModel Link to comment
BriGhtx3 Posted May 25, 2011 Share Posted May 25, 2011 spawnPlayer (source, x, y, z, rotation, skinid, interior, dimension, team) Set SkinID to 181 and, create a function, add a event with onPlayerWasted. Link to comment
CowTurbo Posted May 25, 2011 Share Posted May 25, 2011 addEventHandler("onResourceStart", resourceRoot, function() for i,player in ipairs(getElementsByType("player")) do spawn(player) end end ) function spawn(player) repeat until spawnPlayer ( player, 2412+math.random(1,1), -1413+math.random(1,1),24.4, 90, math.random(9,288) ) fadeCamera(player, true) setCameraTarget(player, player) end addEventHandler("onPlayerJoin", root, function() spawn(source) end ) addEventHandler("onPlayerWasted", root, function() local skin = getElementModel ( source ) setTimer(spawn, 1800, 1, source) setTimer(setElementModel, 1800, 1, source, skin) end ) Replace it with your .lua file inside "play" Should work Link to comment
macr1408 Posted May 25, 2011 Author Share Posted May 25, 2011 addEventHandler("onResourceStart", resourceRoot, function() for i,player in ipairs(getElementsByType("player")) do spawn(player) end end ) function spawn(player) repeat until spawnPlayer ( player, 2412+math.random(1,1), -1413+math.random(1,1),24.4, 90, math.random(9,288) ) fadeCamera(player, true) setCameraTarget(player, player) end addEventHandler("onPlayerJoin", root, function() spawn(source) end ) addEventHandler("onPlayerWasted", root, function() local skin = getElementModel ( source ) setTimer(spawn, 1800, 1, source) setTimer(setElementModel, 1800, 1, source, skin) end ) Replace it with your .lua file inside "play" Should work thanks.. but when I die, I respawn in other place (LS) I want to respawn in SF.. how I can do it? Link to comment
GameZoneX Posted May 25, 2011 Share Posted May 25, 2011 Change the following part: function spawn(player) repeat until spawnPlayer ( player, 2412+math.random(1,1), -1413+math.random(1,1),24.4, 90, math.random(9,288) ) fadeCamera(player, true) setCameraTarget(player, player) The numberic part is the place you spawn. Change these coordinates: 2412+math.random(1,1), -1413+math.random(1,1),24.4, 90 Link to comment
karlis Posted May 25, 2011 Share Posted May 25, 2011 thats plain stupid to let something like math.random(1,1) in script, just remove it if its the case Link to comment
macr1408 Posted May 25, 2011 Author Share Posted May 25, 2011 Change the following part: function spawn(player) repeat until spawnPlayer ( player, 2412+math.random(1,1), -1413+math.random(1,1),24.4, 90, math.random(9,288) ) fadeCamera(player, true) setCameraTarget(player, player) The numberic part is the place you spawn. Change these coordinates: 2412+math.random(1,1), -1413+math.random(1,1),24.4, 90 thanks.. it works Link to comment
CowTurbo Posted May 26, 2011 Share Posted May 26, 2011 yea sorry, i forgoted to tell that i got my own cords 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