Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to prevent teamkilling?

Asked by 9 years ago

I am bored of teamkilling so I asked the question. K?

1 answer

Log in to vote
0
Answered by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
9 years ago

You need to edit the source. In a script, there's a line or two where it damages/kills a the player it comes in contact with. Add a line somewhat like this to prevent damage being taken if the other person is on the same team.

if not p.TeamColor == a.TeamColor then
    --damage
end

Of course, you'll need to edit the variables.

0
Thank You! TheThomasBuilder 0 — 9y
0
Thank me by accepting this answer! Shawnyg 4330 — 9y
Ad

Answer this question