xeon17 Posted February 8, 2014 Posted February 8, 2014 local pArea = createRadarArea(1295.8083496094,2101.6123046875, 60,60,255,255,255 ) local pCuboid = createColCuboid( 1343.0024414063,2159.3093261719,10, 197.5, 92, addEventHandler("onResourceStart", resourceRoot, function() outputDebugString("Villa do Colete", 3, 0, 255, 0) ) end addEventHandler( 'onColShapeHit', pCuboid, ) function( player ) if (getPlayerTeam( player )) then local pTeam = getPlayerTeam( player ) local iR, iG, iB = getTeamColor( pTeam ) local rR, gG, bB = getRadarAreaColor( pArea ) if ( iR == rR ) and ( iG == gG ) and ( iB == bB ) then triggerClientEvent(player, 'friendly', player) else setRadarAreaFlashing( pArea, true ) outputChatBox( "#F08080[GANG-ZONAS] #F8F8FFA gang ".. getTeamName(getPlayerTeam(player)).." esta atacando a gang / no Gang Zona Baseball !",getRootElement(),255,255,255,true); triggerClientEvent(player, 'time', player) triggerClientEvent(player, 'countdown', player) pArea1Timer = setTimer( function() setRadarAreaColor (pArea, iR, iG, iB, 999); givePlayerMoney( player, 4000 ); outputChatBox( "#F08080[GANG-ZONAS] #F8F8FFA gang ".. getTeamName(getPlayerTeam(player)).." dominou o #ff0000 Baseball #F8F8FFA da gang / ! ",getRootElement(),255,255,255,true); setRadarAreaFlashing( pArea, false ) end, 5000, 1 ) end else triggerClientEvent(player, 'group', player) end end ) [2014-02-08 16:39:21] SCRIPT ERROR: GangZone\Baseball.lua:8: unexpected symbol near ')' [2014-02-08 16:39:21] ERROR: Loading script failed: GangZone\Baseball.lua:8: unexpected symbol near ')'
Bonsai Posted February 8, 2014 Posted February 8, 2014 addEventHandler("onResourceStart", resourceRoot, function() outputDebugString("Villa do Colete", 3, 0, 255, 0) end )
xeon17 Posted February 8, 2014 Author Posted February 8, 2014 [2014-02-08 16:46:53] SCRIPT ERROR: GangZone\Baseball.lua:12: ')' expected (to close '(' at line 3) near 'addEventHandler' [2014-02-08 16:46:53] ERROR: Loading script failed: GangZone\Baseball.lua:12: ')' expected (to close '(' at line 3) near 'addEventHandler'
myonlake Posted February 8, 2014 Posted February 8, 2014 (edited) Ugh, you didn't close all brackets, had less arguments than you were supposed to have and it was a full mess. Please try to read your code and see what's happening... Server-side local pArea = createRadarArea( 1295.8083496094, 2101.6123046875, 60, 60, 255, 255, 255 ) local pCuboid = createColCuboid( 1343.0024414063, 2159.3093261719, 10, 197.5, 92, 90 ) addEventHandler( "onResourceStart", resourceRoot, function( ) outputDebugString( "Villa do Colete.", 3 ) end ) addEventHandler("onColShapeHit", pCuboid, function( hitElement, matchingDimension ) if ( getElementType( hitElement ) ~= "player" ) or ( not matchingDimension ) then return end local playerTeam = getPlayerTeam( hitElement ) if ( not playerTeam ) then triggerClientEvent( hitElement, "group", hitElement ) else local teamName = getTeamName( playerTeam ) local iR, iG, iB = getTeamColor( playerTeam ) local rR, gG, bB = getRadarAreaColor( pArea ) if ( iR == rR ) and ( iG == gG ) and ( iB == bB ) then triggerClientEvent( hitElement, "friendly", hitElement ) else setRadarAreaFlashing( pArea, true ) outputChatBox( "#F08080[GANG-ZONAS] #F8F8FFA gang " .. teamName .. " esta atacando a gang / no Gang Zona Baseball!", root, 255, 255, 255, true ) triggerClientEvent( hitElement, "time", hitElement ) triggerClientEvent( hitElement, "countdown", hitElement ) pArea1Timer = setTimer( function( player ) if ( not isElement( pArea ) ) or ( not isElement( player ) ) then return end setRadarAreaColor( pArea, iR, iG, iB, 255 ) givePlayerMoney( hitElement, 4000 ) outputChatBox( "#F08080[GANG-ZONAS] #F8F8FFA gang " .. teamName .. " dominou o #ff0000 Baseball #F8F8FFA da gang!", root, 255, 255, 255, true ) setRadarAreaFlashing( pArea, false ) end, 5000, 1, hitElement ) end end end ) Edited February 8, 2014 by Guest
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