View Single Post
Ace67
Senior Member
Join Date: Sep 2020
Location: France
Old 04-20-2024 , 08:42   Re: Dead Switch Team Plugin
Reply With Quote #7

Quote:
Originally Posted by tedaimlocks View Post
I think this will maybe work

HTML Code:
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <hamsandwich>

public plugin_init() {
    register_plugin("Switch Dead CT to T on Last Round", "1.0", "Ace67");
    register_logevent("logevent_RoundEnd", 2, "1=Round_End");
}

public logevent_RoundEnd() 
    set_task(1.0, "CheckDead");

public CheckDead(id) {
    if (cs_get_user_team(id) == CS_TEAM_CT && !is_user_alive(id)) {
        cs_set_user_team(id, CS_TEAM_T);
        client_print(id, print_chat, "You have been moved to the Terrorist team for the last round.");
        Respawn_Zombie(id);
    }
}
public Respawn_Zombie(id) {
    if (is_user_connected(id) && cs_get_user_team(id) == CS_TEAM_T) {
        if (get_user_health(id) == 6500 || !is_user_alive(id)) {
            ExecuteHamB(Ham_CS_RoundRespawn, id);
        } else {
            client_print(id, print_center, "%L", LANG_SERVER, "FAIL_RESPAWN");
        }
    }
} 
It gives error, so doesnt work

I made a new topic, which it will be better https://forums.alliedmods.net/showthread.php?t=347351
__________________
CS:CZ > CS 1.6

Last edited by Ace67; 04-20-2024 at 12:10.
Ace67 is offline