PedroL Posted September 21, 2016 Share Posted September 21, 2016 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
kikos500 Posted September 21, 2016 Share Posted September 21, 2016 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
aka Blue Posted September 21, 2016 Share Posted September 21, 2016 @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
PedroL Posted September 21, 2016 Author Share Posted September 21, 2016 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
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