Jump to content

add timer to warp command


Notorious^

Recommended Posts

ı want set time for warp.when player write /garage command , he should warp 5 seconds later.but ı cant :C Anyone help me for this ? thanks..

 

local warpTime = 5000 -- 5 seconds

addCommandHandler( "garage", function( thePlayer ) 
        setElementPosition( thePlayer, -1995.29871, 434.22961, 35.17188  ) 
        outputChatBox( "You are now in Garage", player, 0, 255, 0 ) 
    
  local warpTimer = setTimer(function()
	    setElementPosition(thePlayer)
	end, warpTime, 1)

 

Edited by Notorious^
Link to comment
local warpTime = 5000 -- 5 seconds

addCommandHandler( "garage", function( thePlayer ) 
        outputChatBox( "You are now in Garage", player, 0, 255, 0 ) 
    
  local warpTimer = setTimer(function()
	    setElementPosition(thePlayer, - 1995.29871, 434. 22961,35.17188)
	end, warpTime, 1)

 

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