William147 Posted April 20, 2016 Share Posted April 20, 2016 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
Anubhav Posted April 20, 2016 Share Posted April 20, 2016 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
William147 Posted April 20, 2016 Author Share Posted April 20, 2016 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
Anubhav Posted April 20, 2016 Share Posted April 20, 2016 no error/warning Are you sure there is no error? It is possible you have a wrong col-shape, trying a radar area to check if its correct Link to comment
Arsilex Posted April 21, 2016 Share Posted April 21, 2016 You can't the colshape almost like GTA's map size createColCuboid ( float fX, float fY, float fZ, float fWidth, float fDepth, float fHeight ) You need to use fDepth size smaller then u will be able to create the colShape. 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