montel Posted August 26, 2013 Share Posted August 26, 2013 previous one to add skin problem. Position = { [1] = {2068.3000488281,2369.1999511719,10.800000190735}, [2] = {2071.5,2369.1999511719,10.800000190735}, [3] = {2074.6999511719,2369.3000488281,10.800000190735} } addEventHandler("onPlayerWasted", root, function() spawn() --timer pls end ) function spawn() local x,y,z = unpack(Position[math.random(#Position)]) spawnPlayer ( source, x,y,z) setCameraTarget(source, source) setElementModel(player,getElementModel(player)) --maybe problem ? end Link to comment
Chlorek Posted August 26, 2013 Share Posted August 26, 2013 -> timer pls setTimer(spawn, 5000, 1) -> skin problem Just set player skin when spawning: bool spawnPlayer ( player thePlayer, float x, float y, float z, [ int rotation = 0, int skinID = 0, int interior = 0, int dimension = 0, team theTeam = nil ] ) Also in your spawn() function there is no 'source' variable. It is in the one you have called by the event but you do not pass it to the spawn() function. Link to comment
montel Posted August 26, 2013 Author Share Posted August 26, 2013 Old skin should spawn Link to comment
EstrategiaGTA Posted August 26, 2013 Share Posted August 26, 2013 I would define with getElementModel when the player dies (onPlayerWasted) and then I'd use a setTimer for 50 seconds or more (50 seconds = minimum) to set the model which you defined. 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