damien111 Posted February 2, 2013 Posted February 2, 2013 I need help with getting this to work, there will probally be more questions after this on this topic, okay, so right now , the problem is that i get a debug error when i try to get the teamcolor..Im not sure why, as it is all defined, any ideas? local pArea = createRadarArea( -1442.904296875, -971.251953125, 100, 100, 0, 0, 0, 125 ) local pCuboid = createColRectangle( -1442.904296875, -971.251953125, 100, 100 ) BigSmokes = createTeam("Nazis", 255, 0, 255) addEventHandler("onResourceStart",resourceRoot,function() end ) addEventHandler('onColShapeHit', root, function( p ) -- you should have added player param here local pTeam = getPlayerTeam( p ) local iR, iG, iB = getTeamColor( pTeam ) local rR, rG, rB = getRadarAreaColor ( pArea ) if (getPlayerTeam( p )) then if( source == pCuboid ) then if ( iR == rR and iG == rG and iB == rB ) then else if(getElementData( aCuboid, "TurfInProgress" )) then else setRadarAreaFlashing ( aArea, true ) setElementData( aCuboid, "TurfInProgress", true ) wave1 = setTimer( function() setElementData( aCuboid, "TurfInProgress", false ) setRadarAreaColor ( aArea, tR, tG, tB, 125 ) setRadarAreaFlashing ( aArea, false) country = getElementData( p, "Country" ) setElementData( aArea, "CountryOwned", country) end, 60000, 1 ) end end end end end ) addEventHandler( 'onColShapeLeave', root, function( ) if( source == pCuboid ) then setRadarAreaFlashing( pArea, false ) setElementData( aCuboid, "TurfInProgress", false ) setRadarAreaFlashing ( aArea, false) end end ) addEventHandler( "onPlayerWasted", getRootElement( ), function() if( source == pCuboid ) then setRadarAreaFlashing( pArea, false ) setElementData( aCuboid, "TurfInProgress", false ) setRadarAreaFlashing ( aArea, false) end end )
AJXB Posted February 2, 2013 Posted February 2, 2013 this is manve1 turf system, did you ask him? ~ This has to be the worst board post I have ever read. It simply makes no sense. You start off by talking about space or something, then you randomly start babbling about cupcakes, and you end off with random fish names. ~ Don't listen to this guy, any board with the categories 'dinosaurs, spaceships, fried foods, wild animals, alien abductions, business casual, robots, and fireworks' has true potential.
damien111 Posted February 2, 2013 Author Posted February 2, 2013 I cut out alot of it, i took some basics as i was learning from it, i had waves of NPC's and such, but no, i didn't.
K4stic Posted February 2, 2013 Posted February 2, 2013 it's basic and easy local pArea = createRadarArea( -1442.904296875, -971.251953125, 100, 100, 0, 0, 0, 125 ) local pCuboid = createColRectangle( -1442.904296875, -971.251953125, 100, 100 ) BigSmokes = createTeam("Nazis", 255, 0, 255) addEventHandler("onResourceStart",resourceRoot,function() end ) addEventHandler('onColShapeHit', root, function( p ) -- you should have added player param here local iR, iG, iB = getTeamColor(getPlayerTeam( p ) ) local rR, rG, rB = getRadarAreaColor ( pArea ) if (getPlayerTeam( p )) then if( source == pCuboid ) then if ( iR == rR and iG == rG and iB == rB ) then else if(getElementData( aCuboid, "TurfInProgress" )) then else setRadarAreaFlashing ( aArea, true ) setElementData( aCuboid, "TurfInProgress", true ) wave1 = setTimer( function() setElementData( aCuboid, "TurfInProgress", false ) setRadarAreaColor ( aArea, tR, tG, tB, 125 ) setRadarAreaFlashing ( aArea, false) country = getElementData( p, "Country" ) setElementData( aArea, "CountryOwned", country) end, 60000, 1 ) end end end end end ) addEventHandler( 'onColShapeLeave', root, function( ) if( source == pCuboid ) then setRadarAreaFlashing( pArea, false ) setElementData( aCuboid, "TurfInProgress", false ) setRadarAreaFlashing ( aArea, false) end end ) addEventHandler( "onPlayerWasted", getRootElement( ), function() if( source == pCuboid ) then setRadarAreaFlashing( pArea, false ) setElementData( aCuboid, "TurfInProgress", false ) setRadarAreaFlashing ( aArea, false) end end ) and replace all aCuboid to pCuboid and aArea to pArea Giving a Fuck? Nope, That isn't in My Skill Set
manve1 Posted February 2, 2013 Posted February 2, 2013 this is manve1 turf system, did you ask him? If someone is learning from a script that i made, i'm ok with it Looking for tutorials or information? check out: www.simpleask.co.uk
K4stic Posted February 2, 2013 Posted February 2, 2013 Manve not only damien111 learn something from your turf system from it and i learn something so big thanks you because make this resource Giving a Fuck? Nope, That isn't in My Skill Set
manve1 Posted February 2, 2013 Posted February 2, 2013 Np Skipper, but I can't be bothered to update it, so im alright if people learn from it and make their own Looking for tutorials or information? check out: www.simpleask.co.uk
Adistar Posted February 3, 2013 Posted February 3, 2013 As skipper said, you should change all aArea/aCuboid to pArea/pCuboid because the p gets the playerteam as it has a function in the script. Revolution Gaming ~ Race, RPG(coming), TDM(coming) and DayZ(Coming)!
damien111 Posted February 3, 2013 Author Posted February 3, 2013 Yeah, Thanks again i guess I made it like 3000 times more complex with a bunch of shit for the WW2 server so
Adistar Posted February 3, 2013 Posted February 3, 2013 Haha aight, will visit it once when you're done Revolution Gaming ~ Race, RPG(coming), TDM(coming) and DayZ(Coming)!
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