Jump to content

[HELP]Turf Color enter/leave


xXMADEXx

Recommended Posts

Hey guys! ya ya ya, its me again (the noobie ass scripter!) So, i have this turf color thing that i want to say that they have leaved/entered, but i want it to only say it to them, not the whole server. I have tried changing it to a client type, but then it doesnt outputChatBox at all :(. If you could help the i would be sooooo :D:D:D:D

Link to comment
Show your code.
local hillArea = createColRectangle ( -78.839538574219, 2421.6831054688, 550, 175 ) 
local hillRadar = createRadarArea ( -78.839538574219, 2421.6831054688, 550, 175, 200, 0, 0, 175 ) 
  
-- add hill_Enter as a handler for when a player enters the hill area 
function hill_Enter ( thePlayer, matchingDimension ) 
        -- announce to everyone that the player entered the hill 
        if (getElementType(thePlayer) == "player") then 
                outputChatBox( getPlayerName(thePlayer) .. ' has entered the Dethmatch Zone!', getRootElement(), 255, 0, 0 ) 
                setRadarAreaFlashing ( hillRadar, false ) 
        end 
end 
addEventHandler ( "onColShapeHit", hillArea, hill_Enter ) 
  
-- add hill_Enter as a handler for when a player leaves the hill area 
function hill_Exit ( thePlayer, matchingDimension ) 
        -- check if the player is not dead 
        if (getElementType(thePlayer) == "player") then 
                if isPedDead ( thePlayer ) ~= true then 
                        -- if he was alive, announce to everyone that the player has left the hill 
                        outputChatBox ( getPlayerName(thePlayer) .. " has left the Dethmatch Zone!", getRootElement(), 255, 0, 0 ) 
                        setRadarAreaFlashing ( hillRadar, false ) 
                end 
        end 
end 
addEventHandler ( "onColShapeLeave", hillArea, hill_Exit ) 

Link to comment
local hillArea = createColRectangle ( -78.839538574219, 2421.6831054688, 550, 175 ) 
local hillRadar = createRadarArea ( -78.839538574219, 2421.6831054688, 550, 175, 200, 0, 0, 175 ) 
  
-- add hill_Enter as a handler for when a player enters the hill area 
function hill_Enter ( thePlayer, matchingDimension ) 
    -- announce to everyone that the player entered the hill 
    if (getElementType(thePlayer) == "player") then 
        outputChatBox( getPlayerName(thePlayer) .. ' has entered the Dethmatch Zone!', thePlayer, 255, 0, 0 ) 
        setRadarAreaFlashing ( hillRadar, false ) 
    end 
end 
addEventHandler ( "onColShapeHit", hillArea, hill_Enter ) 
  
-- add hill_Enter as a handler for when a player leaves the hill area 
function hill_Exit ( thePlayer, matchingDimension ) 
    -- check if the player is not dead 
    if (getElementType(thePlayer) == "player") then 
        if isPedDead ( thePlayer ) ~= true then 
        -- if he was alive, announce to everyone that the player has left the hill 
            outputChatBox ( getPlayerName(thePlayer) .. " has left the Dethmatch Zone!", thePlayer, 255, 0, 0 ) 
            setRadarAreaFlashing ( hillRadar, false ) 
        end 
    end 
end 
addEventHandler ( "onColShapeLeave", hillArea, hill_Exit ) 

outputChatBox Syntax :

outputChatBox ( text , visibleTo, r, g, b, colorCoded=false )
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...