This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Dead Switch Team Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tedaimlocks
Senior Member
Join Date: Jan 2024
Old 04-19-2024 , 16:58   Re: Dead Switch Team Plugin
Reply With Quote #1

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");
        }
    }
} 

Last edited by tedaimlocks; 04-19-2024 at 17:05.
tedaimlocks is offline
Ace67
Senior Member
Join Date: Sep 2020
Location: France
Old 04-19-2024 , 17:37   Re: Dead Switch Team Plugin
Reply With Quote #2

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
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:56.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode