Jump to content

Respawning fast problem.


Bean666

Recommended Posts

Posted (edited)

hi , i have a problem , i need a solution to set the respawn delay , because when a player dies , it respawns so fast. and i want to put a delay like 3 seconds to respawn . any solution for this?

Code:

function spawnOnWasted (prevA, curA, autoRespawn) 
    outputChatBox ("You Have Died!You Have Lost Your Weapons!Go To The WeaponShop To Buy Weapons!", source, 255, 0, 0, false) 
    spawnPlayer (source, 214.39999389648, 1869.1999511719, 13.10000038147, 0, 287, 0, 0, spawnTeam)  
    fadeCamera (source, true) 
    setCameraTarget (source, source) 
end 
addEventHandler("onPlayerWasted", getRootElement(), spawnOnWasted) 
  

Edited by Guest

Aftermath

Posted

Use a timer.

setTimer 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Use it in conjunction with spawnPlayer.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
setTimer ( spawnPlayer, 5000, 1, arguments of spawn player goes here ) 

That will spawn the player after 5 seconds.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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