^Dev-PoinT^ Posted November 16, 2011 Posted November 16, 2011 Hi i made this function res () local x, y, z = getElementPosition(source) outputChatBox("Respawn after 5 seconed...", getRootElement(), 255, 255, 0, true) setTimer (spawnPlayer, 5000, 1, source, x, y, z, 0, math.random(0,200) ) setGameSpeed(tonumber(0.4)) end addEventHandler( "onPlayerWasted", getRootElement( ), res ) how to Make gameSpeed Back to normal after Player Spawn
12p Posted November 16, 2011 Posted November 16, 2011 First of all. This script will set all players' game speed. You should make it client + server: CLIENT: function res ( ) setGameSpeed ( 0.4 ) end addEventHandler( "onClientPlayerWasted", getLocalPlayer( ), res ) SERVER: function res ( ) local x, y, z = getElementPosition ( source ) outputChatBox ( "Respawn after 5 seconds...", source, 255, 255, 0, true ) setTimer ( spawnPlayer, 5000, 1, source, x, y, z, 0, math.random ( 0,200 ) ) end addEventHandler ( "onPlayerWasted", getRootElement( ), res ) ------ About the restoring game speed: CLIENT: function res ( ) setGameSpeed ( 1 ) end addEventHandler( "onClientPlayerSpawn", getLocalPlayer( ), res )
^Dev-PoinT^ Posted November 16, 2011 Author Posted November 16, 2011 Like Thx? serverSide --- function res ( ) local x, y, z = getElementPosition ( source ) outputChatBox ( "Respawn after 5 seconds...", source, 255, 255, 0, true ) setTimer ( spawnPlayer, 5000, 1, source, x, y, z, 0, math.random ( 0,200 ) ) end addEventHandler ( "onPlayerWasted", getRootElement( ), res ) clientSide ----- function res ( ) setGameSpeed ( 0.4 ) end addEventHandler( "onClientPlayerWasted", getLocalPlayer( ), res ) function res ( ) setGameSpeed ( 1 ) end addEventHandler( "onClientPlayerSpawn", getLocalPlayer( ), res )
^Dev-PoinT^ Posted November 16, 2011 Author Posted November 16, 2011 Benxamix2 he i have select skin 46 but when i die he set My skin to 0 how to Make it = getPlayerSkin that he select
Castillo Posted November 16, 2011 Posted November 16, 2011 function res ( ) local x, y, z = getElementPosition ( source ) outputChatBox ( "Respawn after 5 seconds...", source, 255, 255, 0, true ) setTimer ( spawnPlayer, 5000, 1, source, x, y, z, 0, math.random ( 0,200 ), getElementModel(source) ) end addEventHandler ( "onPlayerWasted", getRootElement( ), res )
^Dev-PoinT^ Posted November 16, 2011 Author Posted November 16, 2011 it send me underground? Like bug
TAPL Posted November 16, 2011 Posted November 16, 2011 function res ( ) local x, y, z = getElementPosition ( source ) outputChatBox ( "Respawn after 5 seconds...", source, 255, 255, 0, true ) setTimer ( spawnPlayer, 5000, 1, source, x, y, z, 0, getElementModel(source) ) end addEventHandler ( "onPlayerWasted", getRootElement( ), res )
^Dev-PoinT^ Posted November 16, 2011 Author Posted November 16, 2011 i fixed it with this its Nice to fix things By Yourself thx You all for help me function res ( ) outputChatBox ( "Respawn after 5 seconds...", source, 255, 255, 0, true ) setTimer ( spawnPlayer, 5000, 1, source, x, y, z, 0, getElementModel(source) ) end addEventHandler ( "onPlayerWasted", getRootElement( ), res )
Castillo Posted November 16, 2011 Posted November 16, 2011 lol, it's the same as TAPL's, I guess the rotation was messing it. P.S: You're welcome.
12p Posted November 16, 2011 Posted November 16, 2011 You're welcome. PS. Castillo loves to create new replies just to say "you're welcome"
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