View Single Post
Ace67
Senior Member
Join Date: Sep 2020
Location: France
Old 04-19-2024 , 17:37   Re: Dead Switch Team Plugin
Reply With Quote #5

Quote:
Originally Posted by tedaimlocks View Post
Try this

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(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");
        }
    }
} 
doesnt work ..., because the basebuilder using already a swap things, so maybe if you can help to make it work with the code I sent up with "public cmdSwap(id)"

Or maybe a code, which I need to add into my basebuilder code for make it work.
__________________
CS:CZ > CS 1.6

Last edited by Ace67; 04-19-2024 at 17:56.
Ace67 is offline