Error123 Posted January 31, 2013 Share Posted January 31, 2013 * the bug is when i enter a col shape the radar area start flashing then i wait and nothing heppen when i re-enter the turf it changes the color and gives me money. but i don't want it like that, i want it like when i enter the turf i wait 5seconds then the turf starts flashing then i wait 5 other second to get 5k and the turf stops flashing and changes the color. addEventHandler( 'onColShapeHit', root, function( pla ) if (getElementType( pla ) == "player") then if (getPlayerTeam( pla )) then setTimer ( function () setRadarAreaFlashing ( Area, true ) end, 5000, 1 ) local r, g, b = getTeamColor ( getPlayerTeam( pla ) ) if isRadarAreaFlashing (Area) then setTimer ( function() setRadarAreaFlashing ( Area, false ) givePlayerMoney (pla, 5000) setRadarAreaColor ( Area, r, g ,b, 125 ) end , 1000, 1 ) end end end end ) 1 Link to comment
Castillo Posted January 31, 2013 Share Posted January 31, 2013 Try this: addEventHandler ( 'onColShapeHit', root, function ( pla ) if ( getElementType ( pla ) == "player" ) then if ( getPlayerTeam ( pla ) ) then setTimer ( function ( ) setRadarAreaFlashing ( Area, true ) setTimer ( function ( ) local r, g, b = getTeamColor ( getPlayerTeam ( pla ) ) if isRadarAreaFlashing ( Area ) then setRadarAreaFlashing ( Area, false ) givePlayerMoney ( pla, 5000 ) setRadarAreaColor ( Area, r, g, b, 125 ) end end ,5000, 1 ) end ,5000, 1 ) end end end ) 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