Fabioxps Posted September 2, 2013 Share Posted September 2, 2013 What did this going on here I already tried everything but the radar blinks same pair who owns the area function onHitGangZone ( player ) if ( isPedInVehicle ( player ) ) then outputChatBox ( 'You cannot get this area with a vehicle!', player, 255, 255, 255, false ); return end if ( not getPlayerTeam ( player ) ) then return end local x, y, z = getElementPosition ( player ); local zone = getZoneName ( x, y, z, false ); zon = zone:gsub ( ' ', '-' ) list = xmlLoadFile ( "list.xml" ); node = xmlFindChild ( list, zon, 0 ); triggerClientEvent ( 'onAnnChange', root, getPlayerName ( player ) .. ' is attacking zone: ' .. zone ); setRadarAreaFlashing ( area[zone], true ); colorTimer = setTimer ( function ( ) setRadarAreaColor ( area[zone], math.random ( 0, 255 ), math.random ( 0, 255 ), math.random ( 0, 255 ) ); end, 950, 0 ) if ( getTeamName ( getPlayerTeam ( player ) ) ~= tostring ( xmlNodeGetValue ( node ) ) ) then i = 180 outputChatBox ( 'In 3 minutes, the area will be yours. If you get killed, try again.', player, 255, 255, 255 ); timer = setTimer ( function ( ) i = i - 1 triggerClientEvent ( 'onAnnChange', root, i .. ' seconds to done! Attacker: ' .. getPlayerName ( player ) .. ' | Area: ' .. zone ); if ( i == 0 ) then killTimer ( timer ) triggerClientEvent ( 'onAnnChange', root, getPlayerName ( player ) .. " has got the area '" .. zone .. "'" ); local r, g, b = getTeamColor ( getPlayerTeam ( player )) killTimer ( colorTimer ); setRadarAreaFlashing ( area[zone], false ); setRadarAreaColor ( area[zone], r, g, b, 200 ); gotArea = true xmlNodeSetValue ( node, getTeamName ( getPlayerTeam ( player ) ) ); xmlSaveFile ( list ) end end, 1000, 0 ) end --end end function onLeaveGangZone ( player ) if ( isTimer ( colorTimer ) ) then killTimer ( colorTimer ); end if ( isTimer ( timer ) ) then killTimer ( timer ) end if ( not gotArea ) then local x, y, z = getElementPosition ( player ) local c = getZoneName ( x, y, z, false ); setRadarAreaColor ( area[c], gangZones[c].r, gangZones[c].g, gangZones[c].b, gangZones[c].a ); setRadarAreaFlashing ( area[c], false ); triggerClientEvent ( 'onAnnChange', root, 'No new announcements' ); gotArea = false else setRadarAreaFlashing ( area[c], false ); triggerClientEvent ( 'onAnnChange', root, 'No new announcements' ); end end tried mecher on line 18 Link to comment
Castillo Posted September 3, 2013 Share Posted September 3, 2013 I don't understand what you said, please explain yourself. Link to comment
isa_Khamdan Posted September 3, 2013 Share Posted September 3, 2013 I don't understand what you said, please explain yourself. He want the Radar area to blink like on the gang wars missions in GTA SA. Link to comment
Fabioxps Posted September 3, 2013 Author Share Posted September 3, 2013 I don't understand what you said, please explain yourself.the area is dominated by the same team several times Link to comment
Fabioxps Posted September 4, 2013 Author Share Posted September 4, 2013 please someone!!! Link to comment
ZL|LuCaS Posted September 4, 2013 Share Posted September 4, 2013 What did this going on here I already tried everything but the radar blinks same pair who owns the area function onHitGangZone ( player ) if ( isPedInVehicle ( player ) ) then outputChatBox ( 'You cannot get this area with a vehicle!', player, 255, 255, 255, false ); return end if ( not getPlayerTeam ( player ) ) then return end local x, y, z = getElementPosition ( player ); local zone = getZoneName ( x, y, z, false ); zon = zone:gsub ( ' ', '-' ) list = xmlLoadFile ( "list.xml" ); node = xmlFindChild ( list, zon, 0 ); triggerClientEvent ( 'onAnnChange', root, getPlayerName ( player ) .. ' is attacking zone: ' .. zone ); setRadarAreaFlashing ( area[zone], true ); colorTimer = setTimer ( function ( ) setRadarAreaColor ( area[zone], math.random ( 0, 255 ), math.random ( 0, 255 ), math.random ( 0, 255 ) ); end, 950, 0 ) if ( getTeamName ( getPlayerTeam ( player ) ) ~= tostring ( xmlNodeGetValue ( node ) ) ) then i = 180 outputChatBox ( 'In 3 minutes, the area will be yours. If you get killed, try again.', player, 255, 255, 255 ); timer = setTimer ( function ( ) i = i - 1 triggerClientEvent ( 'onAnnChange', root, i .. ' seconds to done! Attacker: ' .. getPlayerName ( player ) .. ' | Area: ' .. zone ); if ( i == 0 ) then killTimer ( timer ) triggerClientEvent ( 'onAnnChange', root, getPlayerName ( player ) .. " has got the area '" .. zone .. "'" ); local r, g, b = getTeamColor ( getPlayerTeam ( player )) killTimer ( colorTimer ); setRadarAreaFlashing ( area[zone], false ); setRadarAreaColor ( area[zone], r, g, b, 200 ); gotArea = true xmlNodeSetValue ( node, getTeamName ( getPlayerTeam ( player ) ) ); xmlSaveFile ( list ) end end, 1000, 0 ) end --end end function onLeaveGangZone ( player ) if ( isTimer ( colorTimer ) ) then killTimer ( colorTimer ); end if ( isTimer ( timer ) ) then killTimer ( timer ) end if ( not gotArea ) then local x, y, z = getElementPosition ( player ) local c = getZoneName ( x, y, z, false ); setRadarAreaColor ( area[c], gangZones[c].r, gangZones[c].g, gangZones[c].b, gangZones[c].a ); setRadarAreaFlashing ( area[c], false ); triggerClientEvent ( 'onAnnChange', root, 'No new announcements' ); gotArea = false else setRadarAreaFlashing ( area[c], false ); triggerClientEvent ( 'onAnnChange', root, 'No new announcements' ); end end tried mecher on line 18 test function onHitGangZone ( player ) if ( isPedInVehicle ( player ) ) then outputChatBox ( 'You cannot get this area with a vehicle!', player, 255, 255, 255, false ); return end if ( getTeamName ( getPlayerTeam ( player ) ) ~= tostring ( xmlNodeGetValue ( node ) ) ) then if ( not getPlayerTeam ( player ) ) then return end local x, y, z = getElementPosition ( player ); local zone = getZoneName ( x, y, z, false ); zon = zone:gsub ( ' ', '-' ) list = xmlLoadFile ( "list.xml" ); node = xmlFindChild ( list, zon, 0 ); triggerClientEvent ( 'onAnnChange', root, getPlayerName ( player ) .. ' is attacking zone: ' .. zone ); setRadarAreaFlashing ( area[zone], true ); colorTimer = setTimer ( function ( ) setRadarAreaColor ( area[zone], math.random ( 0, 255 ), math.random ( 0, 255 ), math.random ( 0, 255 ) ); end, 950, 0 ) i = 180 outputChatBox ( 'In 3 minutes, the area will be yours. If you get killed, try again.', player, 255, 255, 255 ); timer = setTimer ( function ( ) i = i - 1 triggerClientEvent ( 'onAnnChange', root, i .. ' seconds to done! Attacker: ' .. getPlayerName ( player ) .. ' | Area: ' .. zone ); if ( i == 0 ) then killTimer ( timer ) triggerClientEvent ( 'onAnnChange', root, getPlayerName ( player ) .. " has got the area '" .. zone .. "'" ); local r, g, b = getTeamColor ( getPlayerTeam ( player )) killTimer ( colorTimer ); setRadarAreaFlashing ( area[zone], false ); setRadarAreaColor ( area[zone], r, g, b, 200 ); gotArea = true xmlNodeSetValue ( node, getTeamName ( getPlayerTeam ( player ) ) ); xmlSaveFile ( list ) end end, 1000, 0 ) end --end end function onLeaveGangZone ( player ) if ( isTimer ( colorTimer ) ) then killTimer ( colorTimer ); end if ( isTimer ( timer ) ) then killTimer ( timer ) end if ( not gotArea ) then local x, y, z = getElementPosition ( player ) local c = getZoneName ( x, y, z, false ); setRadarAreaColor ( area[c], gangZones[c].r, gangZones[c].g, gangZones[c].b, gangZones[c].a ); setRadarAreaFlashing ( area[c], false ); triggerClientEvent ( 'onAnnChange', root, 'No new announcements' ); gotArea = false else setRadarAreaFlashing ( area[c], false ); triggerClientEvent ( 'onAnnChange', root, 'No new announcements' ); end end 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