Jump to content

[Help] Zone of Radiation


iPanda

Recommended Posts

Posted

Tell me, how do I make the zone of radiation on the RPG server!?

Option means that under the radiation on the server:

1. This specific locations on the map.

2. If you get to the radiation - will drop health

3. When injected into the radiation appears sound of a Geiger counter.

images?q=tbn:ANd9GcSEjb4dGl61aWRJ3YKkpUu_1d0Bu81A7Gya1Mxaeusyu6nhyLUSe12HnLC4

Radiation zone - this is what you can see in the game Fallout 3 or STALKER.

I need to know how to make these areas and what features are needed for this?

I hope you can help me ... I look forward to your response!

Posted
Объясните мне немного.

I want to make the radiation zone on its server MTA.

These areas must be the same as the games Fallout 3 or STALKER.

The above are 3 points detail the functions of radiation.

Posted
Tell me, how do I make the zone of radiation on the RPG server!?

Option means that under the radiation on the server:

1. This specific locations on the map.

2. If you get to the radiation - will drop health

3. When injected into the radiation appears sound of a Geiger counter.

images?q=tbn:ANd9GcSEjb4dGl61aWRJ3YKkpUu_1d0Bu81A7Gya1Mxaeusyu6nhyLUSe12HnLC4

Radiation zone - this is what you can see in the game Fallout 3 or STALKER.

I need to know how to make these areas and what features are needed for this?

I hope you can help me ... I look forward to your response!

Not tested/is that what you want?

local hillArea = createColRectangle ( -2171.0678710938, 678.17950439453, 15, 15 ) 
local hillRadar = createRadarArea ( -2183.5678710938, 705.67950439453, 40, -40, 0, 255, 0, 175 ) 
  
function hill_Enter ( thePlayer, matchingDimension ) 
        if (getElementType(thePlayer) == "player") then 
                outputChatBox( getPlayerName(thePlayer) .. " entered into a radioactive zone!", getRootElement(), 255, 255, 109 ) 
                setElementHealth ( thePlayer,- 100 ) 
        end 
end 
addEventHandler ( "onColShapeHit", hillArea, hill_Enter ) 

Posted

I suggest to use this:

Example:

-- create our hill area 
local hillArea = createColRectangle ( -2171.0678710938, 678.17950439453, 15, 15 ) 
local hillRadar = createRadarArea ( -2183.5678710938, 705.67950439453, 40, -40, 0, 255, 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 (you could remove this) 
        if (getElementType(thePlayer) == "player") then 
                outputChatBox( getPlayerName(thePlayer) .. " entered the zone!", getRootElement(), 255, 255, 109 ) 
                setRadarAreaFlashing ( hillRadar, true ) 
                --Sorry but I never use KillPed 
                setElementHealth ( thePlayer, -100) 
        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) .. " left the zone!", getRootElement(), 255, 255, 109 ) 
                        setRadarAreaFlashing ( hillRadar, false ) 
                end 
        end 
end 
addEventHandler ( "onColShapeLeave", hillArea, hill_Exit ) 

You can change your coordinates to yours

"If debugging is the process of removing software bugs, then programming must be the process of putting them in."

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...