Jump to content

How can i?


manve1

Recommended Posts

how can i make that the turf system works only for people that have a group?

    local pArea     = createRadarArea( 2130, 630, 200, 100, 0, 255, 0, 175 ) 
    local pArea2     = createRadarArea( 2488.8793945313, 680.78289794922, 250, 130, 0, 255, 0, 175 ) 
  
    addEventHandler(  
        'onColShapeHit', root, 
        function( p ) -- you should have added player param here 
            if( source == pCuboid ) then 
                outputChatBox("------||~ INFO ~||------", p, 0,255,0) 
                outputChatBox("Turf owners: coming soon!", p, 255,255,0) 
                outputChatBox("Taken time: coming soon!", p, 255,255,0) 
                outputChatBox("Wait 10min to take turf!", p, 255,255,0) 
                outputChatBox("------||~ END ~||------", p, 255,0,0) 
                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, 100000, 1 ) 
            end 
        end 
    ) 
  
    addEventHandler( 
        'onColShapeLeave', root,    
        function( ) 
            if( source == pCuboid ) then 
                setRadarAreaFlashing( pArea, false ) 
            end 
        end 
    ) 

here is script.

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