Jump to content

help garage tunning


iiv03

Recommended Posts

hello guys i have two problem so when player write a command /garage he move into garage tunning

i wanna do like if he staying in garage he start giving like slap.. so i used this

				setTimer(function ()
				killPlayer(player)
				end, 5000, 1)

he gives once and this

				setTimer(function ()
				setElementHealth(player,0)
				end, 5000, 1)

problem two if a player is in a garage and there is a random map the problem is that he moves to the spawn map
and i wan't like this. i want if he is in a garage he stays in a garage If he is out player return to spawn map

so what i use for functions?

onMapStarting
getElementData
setElementData

like this?

 

 

 

EDIT:: the first problem i fixed i think problem it was on number 1

i mean here

				end, 5000, 1)

i changed to 0 and work

so could anyone help me in problem two?

 

Edited by xFabel
problem first fixed
Link to comment

EDIT2:

i got here table why??
 

addEventHandler("onMapStarting", root, updateKiller)




function updateKiller(player)
    if getElementData(player, "state") == "alive" then
    setElementHealth(player,0)
    end
end

i'm trying now like this but there is no error in debug

function updateKiller()
	if getElementData(source,"state") == "alive" then
	setTimer(function ()
	setElementHealth(source,0)
		end, 2500, 0)
	end
end

 

Edited by xFabel
edit line to CODE
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...