Charly2272 Posted March 25, 2023 Share Posted March 25, 2023 addEventHandler( "onPlayerWasted", root, function() if ( isElement(source) and getElementType (source) == "player" ) then local x,y,z = getElementPosition(source) setTimer( spawnPlayer, 3500, 1, source, x, y, z ) end end ) Hello friends, I want to create a car to appear at an exact point... Example: if the player is in pvp and dies, he can appear in the same place where he died... and I want to add a command to it... excuse my bad english Link to comment
Dekonpriv Posted March 25, 2023 Share Posted March 25, 2023 Will the player appear in the same place where he died? or will the vehicle appear in the place where the player will spawn? or will the car spawn where the player died? Link to comment
alex17" Posted March 26, 2023 Share Posted March 26, 2023 addEventHandler( "onPlayerWasted", root, function() spawnpoints[source] = {getElementPosition(source)} end ) addCommanHandler("respawn", function(player) if isDead(player) then return end if spawnpoints[player] then setElementPosition(player, unpack(spawnpoints[player])) end end ) 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