Jump to content

Save Skin When death


ZeyadGTX

Recommended Posts

Post your gamemode script.

"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."

1 step from a genius to a fool.

@Grafu In scripting section, we help people with their scripts not to complain about signatures of who try to help, and I don't have time for your crap.

Scripting section rules if you don't know them.

viewtopic.php?f=91&t=15740

@Spider If you are using play gamemode, then use getElementModel to get the player's skin when he die, and use setElementModel to set player skin after respawn.

And next time use Lua tags.


Link to comment
spawns = { 
    -- x, y, z 
    { 0, 0, 3 }, 
    { 1, 1, 3 } 
} 
  
  
addEventHandler ( "onPlayerWasted", root, 
    function ( ) 
        local skin = getPedSkin ( source ) 
        local x, y, z = unpack ( spawns [ math.random ( #spawns ) ] ) 
        spawnPlayer ( source, x, y, z, 0, skin ) 
    end 
) 

You're welcome, stealer.

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...