Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Wiket

Increasing respawn time based off how many players have died on your side

Recommended Posts

How can I increase respawn time based off of how many players have died on a team? This is for a server than runs both Blufor and Opfor. 

Here is what I have so far but its not working.

 

addMissionEventHandler ["EntityKilled", {
    params ["_killed", "_killer", "_instigator"];
    if (isPlayer _killed) then {
        switch (side _killed) do {
            case west: { WEST_deaths = WEST_deaths + 1; };
            case east: { EAST_deaths = EAST_deaths + 1; };
        };
    };
}];

player addEventHandler ["Killed", { params ["_unit", "_killer", "_instigator", "_useEffects"]; setPlayerRespawnTime (playerRespawnTime + WEST_deaths); }];

Share this post


Link to post
Share on other sites

×