manve1 Posted August 31, 2012 Share Posted August 31, 2012 I am creating turf system for community and when i start it, the radar goes colorful or just stay's one color, i'm not sure if it is MTA bug or anything like that, but it kinda scared me when i created another area PICS: Script: local pArea = createRadarArea( 2130, 728, 200, -100, 0, 255, 0, 175 ) local pArea2 = createRadarArea( 2496.5661621094, 764.83386230469, 300, -150, 0, 255, 0, 175 ) local pCuboid = createColCuboid( 2133.1950683594, 633.66455078125, 10, 197.5, 92, 12 ) addEventHandler("onResourceStart",resourceRoot,function() outputDebugString("Turf system by Enjoy ( manve ) || Has been turned on!") -- Please don't remove this =) end ) addEventHandler( 'onColShapeHit', root, function( p ) -- you should have added player param here if( source == pCuboid ) then setRadarAreaFlashing( pArea, true ) local pTeam = getPlayerTeam( p ) -- source is the col shape, you should use 'p', the player arg local iR, iG, iB = getTeamColor( pTeam ) setTimer( function() setRadarAreaColor (pArea, iR, iG, iB, 100); givePlayerMoney( p, 4000 ); outputChatBox( "Congratulations, #FFFF00 you have taken the turf!", p, 0, 255, 0, true ); setRadarAreaFlashing( pArea, false ) end, 1000, 1 ) end end ) addEventHandler( 'onColShapeLeave', root, function( ) if( source == pCuboid ) then setRadarAreaFlashing( pArea, false ) end end ) P.S. I got scared cuz i though i done something wrong in script Link to comment
AMARANT Posted August 31, 2012 Share Posted August 31, 2012 Don't use negative values for radar areas. 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