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


Raised This Month: $ Target: $400
 0% 

Solved [Request] Freeze Player For 1 Second When Spawned


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Snake.
Senior Member
Join Date: Jul 2017
Old 11-06-2022 , 11:00   Re: [Request] Freeze Player For 1 Second When Spawned
Reply With Quote #1

Quote:
Originally Posted by Nutu_ View Post
send the auto-respawn code
PHP Code:
public plugin_init() 
{
    
register_plugin("[Respawn]""1.0"PluginAuthor);
    
    
register_clcmd("say /start""Command_Respawn");
    
register_clcmd("say /respawn""Command_Respawn");
    

    
register_forward(FM_PlayerPreThink"CBasePlayer_PreThink");

    
register_forward(FM_PlayerPreThink"CBasePlayer_PreThink_BlockUse");
    
register_forward(FM_ClientKill"CBasePlayer_KillCommand");
    
register_forward(FM_AddToFullPack"AddToFullPack_Post"1);    
    
}

public 
Command_Start(id)
{
    if (!
is_user_connected(id) || cs_get_user_team(id) == CS_TEAM_SPECTATOR)         return;

    
ExecuteHamB(Ham_CS_RoundRespawnid);
    
cs_set_user_deaths(idcs_get_user_money(id));
    
give_item(id"weapon_usp");
    
set_user_health (id 10084);
}
public 
Command_Respawn(id
{
    if(
is_user_alive(id)) 
    { 
        
Command_Start(id);
    }
    return 
PLUGIN_HANDLED;
}
public 
CBasePlayer_KillCommand(id
{
    
Command_Start(id);    
    return 
HAM_SUPERCEDE;
}
public 
Ham_PlayerAlready_Killed(id
{        
    
set_task(0.1"Command_Start"id);    
}

public 
client_PreThink(id
{
    if(
get_user_health(id) < 9984) {
        
Command_Start(id)
    }

Snake. is offline
Send a message via Skype™ to Snake.
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 11:49.


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