Hey, i made what you told me via pm,
You can change the r,g,b to change the color of the zone and alpha to change the alpha of it too add it to server side in meta since the events are server sided.
local r,g,b = 50, 150, 50
local alpha = 155
local GreenZone = createColRectangle ( 2898.93,-1135.61,255,255)
local Radar = createRadarArea ( 2898.93,-1135.61,255,255,r, g, b, alpha)
addEventHandler ( "onColShapeHit", GreenZone,
function (thePlayer,matchingDimension )
if matchingDimension and isElement(thePlayer) and getElementType(thePlayer) == "player" then
toggleControl ( thePlayer, "fire", false )
toggleControl ( thePlayer, "next_weapon", false )
toggleControl ( thePlayer, "previous_weapon", false )
outputChatBox( "Safe Zone: You've entered to the greenzone.",thePlayer, r,g,b)
end
end)
addEventHandler ( "onColShapeLeave", GreenZone,
function ( thePlayer, matchingDimension )
if matchingDimension and isElement(thePlayer) and getElementType(thePlayer) == "player" then
toggleControl ( thePlayer, "fire", true )
toggleControl ( thePlayer, "next_weapon", true )
toggleControl ( thePlayer, "previous_weapon", true )
outputChatBox ( "Safe Zone: You've left the greenzone,now all your ammos will works.",thePlayer,255,0,0)
end
end)
Meta should be like that:
~Have fun scripting