Jump to content

Spawn On Death Place


Recommended Posts

40 minutes ago, Itachi-999 said:

Hello Guys Can Anyone Help Me To Make A Script When Player Die On A Map He Spawn On  The Map And When he Go To Other Map And Die Spawn On It 

Please provide additional information and possibly a code excerpt so that we can assist you more effectively. Also, do not expect someone to create the script from start; pay someone.

Link to comment

Do you want to make the player appear where he died after death?

18 minutes ago, shishani said:

Вы хотите, чтобы игрок появился там, где он умер после смерти?

function respawnPlayer() 
      local x, y, z = getElementPosition(source) 
      local int = getElementInterior(source) 
      local dim = getElementDimension(source) 
      local _, _, rot = getElementRotation(source) 
      local skin = getElementModel(source) 
      
      fadeCamera(source, false) 
      
      setTimer(function (source, skin, int, dim, x, y, z, rot) 
            spawnPlayer(source, x, y, z, rot, skin, int, dim) 
            fadeCamera(source, true) 
      end, 3000,1,source) 
end
addEventHandler ("onPlayerWasted", root, respawnPlayer) 

 

Link to comment
28 minutes ago, shishani said:

Do you want to make the player appear where he died after death?

function respawnPlayer() 
      local x, y, z = getElementPosition(source) 
      local int = getElementInterior(source) 
      local dim = getElementDimension(source) 
      local _, _, rot = getElementRotation(source) 
      local skin = getElementModel(source) 
      
      fadeCamera(source, false) 
      
      setTimer(function (source, skin, int, dim, x, y, z, rot) 
            spawnPlayer(source, x, y, z, rot, skin, int, dim) 
            fadeCamera(source, true) 
      end, 3000,1,source) 
end
addEventHandler ("onPlayerWasted", root, respawnPlayer) 

 

Sorry, fixed :(

 

function respawnPlayer() 
      local x, y, z = getElementPosition(source) 
      local int = getElementInterior(source) 
      local dim = getElementDimension(source) 
      local _, _, rot = getElementRotation(source) 
      local skin = getElementModel(source) 
      
      fadeCamera(source, false) 
      
      setTimer(function (source, skin, int, dim, x, y, z, rot) 
            spawnPlayer(source, x, y, z, rot, skin, int, dim) 
            fadeCamera(source, true) 
      end, 3000,1,source, skin, int, dim, x, y, z, rot) 
end
addEventHandler ("onPlayerWasted", root, respawnPlayer) 

 

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...