Monty Posted June 5, 2012 Share Posted June 5, 2012 hi... this script should respawn player at the hospital... but everytime my skin get set to CJ... is it possible to set the model as the one before the dead? addEventHandler( "onPlayerWasted", getRootElement( ), function() setTimer( spawnPlayer, 4000, 1, source, 1177.5682373047, -1323.2587890625, 14.077121734619 ) outputChatBox ( getPlayerName ( source ).." died and was transported at All Saints Hospital.") end ) Link to comment
Axel Posted June 5, 2012 Share Posted June 5, 2012 addEventHandler( "onPlayerWasted", getRootElement( ), function() setTimer( spawnPlayer, 4000, 1, source, 1177.5682373047, -1323.2587890625, 14.077121734619,0, getElementModel(source) ) outputChatBox ( getPlayerName ( source ).." died and was transported at All Saints Hospital.") end ) https://wiki.multitheftauto.com/wiki/SpawnPlayer Link to comment
Stanley Sathler Posted June 5, 2012 Share Posted June 5, 2012 Yes, you can use getElementModel() and setElementData() for store the skin to a player. And, later respawn, use getElementData() and setElementModel(). Link to comment
BinSlayer1 Posted June 5, 2012 Share Posted June 5, 2012 Monty: just use Axel's code. I know it can be confusing when more people give different solutions to the same (easy) problem Link to comment
Stanley Sathler Posted June 5, 2012 Share Posted June 5, 2012 I not saw "getElementModel()" in Axel code. My mistake. Link to comment
Monty Posted June 6, 2012 Author Share Posted June 6, 2012 thanks everybody! it works! 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