manve1 Posted August 31, 2012 Share Posted August 31, 2012 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
scratcher911 Posted August 31, 2012 Share Posted August 31, 2012 do you have element data for group or what ? Link to comment
manve1 Posted August 31, 2012 Author Share Posted August 31, 2012 i just started making in, it is still beta version ( beta 0.1 ) so no i don't and im beginner in LUA too EDIT: i'm learning by making complicated script's and i don't get few things still, but i do everything on the script. Link to comment
Renkon Posted August 31, 2012 Share Posted August 31, 2012 if getTeamName(pTeam) == "yourTeamName" then Link to comment
manve1 Posted August 31, 2012 Author Share Posted August 31, 2012 EDIT: if you can, please tell me how to make it for all teams, so it doesn't need to be re-made everytime new team is added 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