Jump to content

Please help me in this script .


PedroL

Recommended Posts

MarkTraf = createMarker (2430.783203125, -988.7255859375, 70.225921630859,"cylinder",2.0 , 255, 255, 0, 255)

function Traf (source)
givePlayerMoney(source,500)
end
addCommandHandler ( "createmarker",MarkTraf,Traf)

 

Hello. I wanted when we stayed at marker 500 won every 2 minutes. I hope to help me . :)

Link to comment
MarkTraf = createMarker (2430.783203125, -988.7255859375, 70.225921630859,"cylinder",2.0 , 255, 255, 0, 255)

function Traf (source)
	for i,v in pairs(getElementsByType("player")) do
		if isElementWithinMarker( v, MarkTraf) then
			givePlayerMoney(v,500)
		end
	end
end
setTimer(traf,2000,0)

not tested tho

Link to comment

@kikos500 setTimer works with ms, 2 minutes are 120000 ms. 

MarkTraf = createMarker (2430.783203125, -988.7255859375, 70.225921630859,"cylinder",2.0 , 255, 255, 0, 255)

setTimer( function( )
	local players = getElementsByType( 'player' )
	for i=1, #players do
		local player = players[ i ]
		if isElementWithinMarker( player, MarkTraf ) then
			givePlayerMoney( player, 500 )
		end
	end
end, 120000, 0 )

 

Link to comment

 

I wanted when you pass the marker having to type /traficar and fecasse with three level sought .

MarkTraf = createMarker (2430.783203125, -988.7255859375, 70.225921630859,"cylinder",2.0 , 255, 255, 0, 255)

setTimer( function( )
	local players = getElementsByType( 'player' )
	for i=1, #players do
		local player = players[ i ]
		if isElementWithinMarker( player, MarkTraf ) then
			givePlayerMoney( player, 500 )
		end
	end
end, 120000, 0 )

 

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