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

[BIO] Respawn plugin crashes server


Post New Thread Reply   
 
Thread Tools Display Modes
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 09-05-2020 , 12:39   Re: [BIO] Respawn plugin crashes server
Reply With Quote #11

Quote:
Originally Posted by Supremache View Post
Oh i did something wrong try this now
PHP Code:
public respawn(o_id[]) 
{
    new 
id o_id[0
    
    if (!
is_user_connected(id))
        return 
PLUGIN_CONTINUE
        
    
if (!is_user_alive(id))
    {
        
ExecuteHamB(Ham_CS_RoundRespawnid)

    }
    return 
PLUGIN_CONTINUE  
    

Ok this works, but how do i make it so they respawn in like 3 secs? Not automatically...
HowToRuski is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 09-05-2020 , 14:00   Re: [BIO] Respawn plugin crashes server
Reply With Quote #12

Quote:
Originally Posted by HowToRuski View Post
Ok this works, but how do i make it so they respawn in like 3 secs? Not automatically...
If you want it more than 3 sec then edit this code "set_task(3.0"

PHP Code:
public respawn(o_id[]) 
{
    new 
id o_id[0]
    
    if (!
is_user_connected(id))
        return 
PLUGIN_CONTINUE
    
    
if (!is_user_alive(id))
    {
        
set_task(3.0,"Respawn_Player"id)
    }
    return 
PLUGIN_CONTINUE  

    


public 
Respawn_Player(id)
{
    if (!
is_user_connected(id))
        return 
PLUGIN_HANDLED
    
    
if (!is_user_alive(id))
    {
        
ExecuteHamB(Ham_CS_RoundRespawnid)
    }
    return 
PLUGIN_CONTINUE  
    

Supremache is offline
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 09-05-2020 , 14:08   Re: [BIO] Respawn plugin crashes server
Reply With Quote #13

Quote:
Originally Posted by Supremache View Post
If you want it more than 3 sec then edit this code "set_task(3.0"

PHP Code:
public respawn(o_id[]) 
{
    new 
id o_id[0]
    
    if (!
is_user_connected(id))
        return 
PLUGIN_CONTINUE
    
    
if (!is_user_alive(id))
    {
        
set_task(3.0,"Respawn_Player"id)
    }
    return 
PLUGIN_CONTINUE  

    


public 
Respawn_Player(id)
{
    if (!
is_user_connected(id))
        return 
PLUGIN_HANDLED
    
    
if (!is_user_alive(id))
    {
        
ExecuteHamB(Ham_CS_RoundRespawnid)
    }
    return 
PLUGIN_CONTINUE  
    

Thanks. Problem solved /

Edit: found a bug, when im spectating i get respawned...

Last edited by HowToRuski; 09-05-2020 at 14:41.
HowToRuski is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 09-05-2020 , 14:46   Re: [BIO] Respawn plugin crashes server
Reply With Quote #14

Quote:
Originally Posted by HowToRuski View Post
Thanks. Problem solved /

Edit: found a bug, when im spectating i get respawned...
PHP Code:
public respawn(o_id[]) 
{
    new 
id o_id[0]
    
    if (!
is_user_connected(id))
        return 
PLUGIN_HANDLED
    
    
if(cs_get_user_team(id) == CS_TEAM_UNASSIGNED || cs_get_user_team(id) == CS_TEAM_SPECTATOR)
        return 
PLUGIN_HANDLED 
        
    
if (!is_user_alive(id))
    {
        
set_task(3.0,"Respawn_Player"id)
    }
    return 
PLUGIN_CONTINUE  

    


public 
Respawn_Player(id)
{
    if (!
is_user_connected(id))
        return 
PLUGIN_HANDLED
    
    
if(cs_get_user_team(id) == CS_TEAM_UNASSIGNED || cs_get_user_team(id) == CS_TEAM_SPECTATOR)
        return 
PLUGIN_HANDLED 
        
    
if (!is_user_alive(id))
    {
        
ExecuteHamB(Ham_CS_RoundRespawnid)
    }
    return 
PLUGIN_CONTINUE  
    

Supremache 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 14:44.


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