#DaNiLiN

Territorio marker

Recommended Posts

Qual seria a forma correta de fazer contador do marker contar por player dentro.

Ex: a cada player que entra dentro de certo marker começa a contar 1 segundo a mais.

Share this post


Link to post

Acho que é isto que você quer dizer:

local addtSecs = 0

addEventHandler( "onMarkerHit", root,
	function ( hitPlayer )
		if getElementType(hitPlayer) == "player" then
			addtSecs = addtSecs + 1000 -- 1000ms : 1 segundo
		end
	end
)

addEventHandler( "onMarkerLeave", root,
	function ( hitPlayer )
		if getElementType(hitPlayer) == "player" then
			addtSecs = addtSecs - 1000
		end
	end
)

 

Edited by DNL291
  • Thanks 1

Share this post


Link to post

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.