Raised This Month: $32 Target: $400
 8% 

Solved Spec is respawning


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sanimare
Senior Member
Join Date: Sep 2010
Old 02-11-2019 , 05:54   Spec is respawning
Reply With Quote #1

I tried several ways to get into the spec, but this code is respawning me.
How can we avoid that? I need to respawn only ct and tt, without spectators

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <cstrike>

native give_itemindex, const item[] )

public 
plugin_init() 
{
    
register_plugin"auto respawner""50000000""DeathRun Serbia" )
    
    
RegisterHamHam_Killed"player""Smrt_igraca"
    
    
register_clcmd"say /respawn""respawnuj" )
}
public 
client_putinserverid )
{
    
set_task1.2"respawnuj"id )
}
public 
respawnujid )
{
    if( !
is_user_alive(id) || !(CS_TEAM_T <= cs_get_user_team(id) <= CS_TEAM_CT) )
    {
        
ExecuteHamBHam_CS_RoundRespawnid )
        
give_itemid"weapon_knife" )
        
    }
}
public 
Smrt_igracaid )
{
    if( 
is_user_connectedid ) )
    {
        
set_task0.2"respawnuj"id )
    }


Last edited by sanimare; 02-11-2019 at 07:43.
sanimare is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 02-11-2019 , 06:42   Re: Spec is respawning
Reply With Quote #2

PHP Code:
public Smrt_igracaid 

    if( 
is_user_connectedid ) && ( cs_get_user_teamid ) == CS_TEAM_CT || cs_get_user_teamid ) == CS_TEAM_T  ) ) 
    { 
        
set_task0.2"respawnuj"id 
    } 

__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
sanimare
Senior Member
Join Date: Sep 2010
Old 02-11-2019 , 06:59   Re: Spec is respawning
Reply With Quote #3

Same again.
Now when i transfer myself to spec i get respawned but when i type kill in console i stay in spectators.

Last edited by sanimare; 02-11-2019 at 07:03.
sanimare is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 02-11-2019 , 07:05   Re: Spec is respawning
Reply With Quote #4

PHP Code:
#include <amxmodx> 
#include <amxmisc> 
#include <hamsandwich> 
#include <cstrike> 

native give_itemindex, const item[] ) 

public 
plugin_init()  

    
register_plugin"auto respawner""50000000""DeathRun Serbia" 
     
    
RegisterHamHam_Killed"player""Smrt_igraca")  
     
    
register_clcmd"say /respawn""respawnuj" 

public 
client_putinserverid 

    
set_task1.2"respawnuj"id 

public 
respawnujid 

new 
team cs_get_user_teamid )
    if( !
is_user_alive(id) && ( team == CS_TEAM_CT || team == CS_TEAM_T ) ) 
    { 
        
ExecuteHamBHam_CS_RoundRespawnid 
        
give_itemid"weapon_knife" 
         
    } 

public 
Smrt_igracaid 

    if( 
is_user_connectedid ) ) 
    { 
        
set_task0.2"respawnuj"id 
    } 

my bad with previusly code, if this doesnt work i guess you have another plugin which is causing the problem
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)

Last edited by JocAnis; 02-11-2019 at 07:06.
JocAnis is offline
sanimare
Senior Member
Join Date: Sep 2010
Old 02-11-2019 , 07:43   Re: Spec is respawning
Reply With Quote #5

It's good now.

Thank's
sanimare is offline
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 06:22.


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