Raised This Month: $12 Target: $400
 3% 

Respawn for cts


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AlexWinchester
Junior Member
Join Date: May 2023
Old 11-24-2023 , 18:32   Respawn for cts
Reply With Quote #1

Hello everybody,
I could use some help to add spawn protection and cancel the CT's from respawning when the round ends.
Which i have no idea how to do,

Here's what i've done so far,

Thanks in advance

*REDITING THE CODE*
PHP Code:
#include <amxmodx>
#include <engine>
#include <cstrike>
#include <fun>
#include <hamsandwich>

// team ids 
#define CTS 2

public plugin_init()
{    
    
RegisterHamHam_Killed"player""ham_killed");
}

public 
ham_killedvictimkillershouldgib )
{
    if (
get_user_team(victim)==CTS)        
        
set_task0.5"RespawnPlayer"victim );

    return 
HAM_IGNORED;
}

public 
RespawnPlayerid )
{
    
ExecuteHamBHam_CS_RoundRespawnid )

    
set_user_godmode(id1)
    
client_print_color id print_chat "^3[SpawnProtection] ^1You get 5 second SpawnProtection" 
    
    if (
cs_get_user_team(id) == CS_TEAM_CT)
        
set_rendering(idkRenderFxGlowShell00255kRenderNormal50)
    
    
set_task(5.0"RemoveProtection"id)
    return 
PLUGIN_HANDLED;
}

public 
RemoveProtection(id) {
    
set_user_godmode(id0)
    
set_rendering(id)
    
client_print_colorid print_chat "^3[SpawnProtection] ^1SpawnProtection has expired" )


Last edited by AlexWinchester; 11-28-2023 at 12:57. Reason: editted the code
AlexWinchester is offline
Old 11-28-2023, 12:41
AlexWinchester
This message has been deleted by AlexWinchester.
Reply


Thread Tools
Display Modes

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 20:06.


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