Jump to content

ColShape problem


William147

Recommended Posts

Hello!

I would like to make a script for a DayZ server, which kill zombies in a colshape.

When the zombies spawns the script make a "Zombies" team and puts into the team.

  
tempCol = createColCuboid ( 1039.5322265625, -10860.85546875, 1352.7685546875,230.0, 50000.0, 90.0 ) 
function base (thePlayer) 
        playerTeam = getPlayerTeam ( thePlayer ) 
        if playerTeam == "Zombies" then 
            setElementData(thePlayer, "blood", 0) 
        end 
end 
addEventHandler ( "onColShapeHit", tempCol, base ) 
  

Link to comment

You can only set a team of a player not a zombie/ped.

  
  
tempCol = createColCuboid ( 1039.5322265625, -10860.85546875, 1352.7685546875,230.0, 50000.0, 90.0 ) 
function base (thePlayer) 
    if getElementType(thePlayer) ~= "player" then 
        if (getElementType(thePlayer) == "ped" ) then 
            killPed( thePlayer ) 
        end 
    end 
end 
addEventHandler ( "onColShapeHit", tempCol, base ) 
  

Link to comment
tempCol = createColCuboid ( 1039.5322265625, -10860.85546875, 1352.7685546875,230.0, 50000.0, 90.0 ) 
function base (thePlayer) 
    outputChatBox("entered") 
    if getElementType(thePlayer) ~= "player" then 
    outputChatBox("you're player") 
        if (getElementType(thePlayer) == "ped" ) then 
            outputChatBox("you're zombie") 
            killPed( thePlayer ) 
        end 
    end 
end 
addEventHandler ( "onColShapeHit", tempCol, base ) 

if I enter the colshape don't write "entered", and don't kill zombies :/

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