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

Spectator -> CT or T bug


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Hardix
Junior Member
Join Date: Nov 2020
Old 01-22-2023 , 06:07   Spectator -> CT or T bug
Reply With Quote #1

Hello,

I don't know if it's a bug or is just a CS 1.6 thingy but when I connect to server and choose the Spectator Team and I want to move to another team from a command (amx_t or amx_ct) I can't see the HUD and I see only the weapon.

AMX Mod X version 1.9.0.5294, I tried AMX Mod X version 1.8.3 and 1.10 too, same result
Video: https://www.youtube.com/watch?v=UOtQeW_jJoY
Code:
PHP Code:
public cmd_spec(id,level,cid)
{
    if(!
cmd_access(idlevelcid1))
    {
        return 
PLUGIN_HANDLED;
    }

    new 
arg[32], target;
    
read_argv(1arg31);
    
target cmd_target(idargCMDTARGET_NO_BOTS);
    if(!
target) return PLUGIN_HANDLED;

    new 
name[32], targetname[32];
    
get_user_name(idname31);
    
get_user_name(targettargetname31);
    if(
is_user_alive(target))
    
user_silentkill(target);
    
cs_set_user_team(targetCS_TEAM_SPECTATOR);

    return 
PLUGIN_HANDLED;
}

public 
cmd_t(id,level,cid)
{
    if(!
cmd_access(idlevelcid1))
    {
        return 
PLUGIN_HANDLED;
    }

    new 
arg[32], target;
    
read_argv(1arg31);
    
target cmd_target(idargCMDTARGET_NO_BOTS);
    if(!
target) return PLUGIN_HANDLED;

    new 
name[32], targetname[32];
    
get_user_name(idname31);
    
get_user_name(targettargetname31);
    if(
is_user_alive(target))
    
user_silentkill(target);
    
cs_set_user_team(targetCS_TEAM_T);

    return 
PLUGIN_HANDLED;
}

public 
cmd_ct(id,level,cid)
{
    if(!
cmd_access(idlevelcid1))
    {
        return 
PLUGIN_HANDLED;
    }

    new 
arg[32], target;
    
read_argv(1arg31);
    
target cmd_target(idargCMDTARGET_NO_BOTS);
    if(!
target) return PLUGIN_HANDLED;

    new 
name[32], targetname[32];
    
get_user_name(idname31);
    
get_user_name(targettargetname31);
    if(
is_user_alive(target))
    
user_silentkill(target);
    
cs_set_user_team(targetCS_TEAM_CT);

    return 
PLUGIN_HANDLED;

Hardix is offline
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 01-23-2023 , 06:53   Re: Spectator -> CT or T bug
Reply With Quote #2

Its either because you don't set a player class or because the spawn plugin doesn't spawn you properly.
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
deprale
Senior Member
Join Date: Oct 2018
Location: Leeds
Old 01-23-2023 , 23:37   Re: Spectator -> CT or T bug
Reply With Quote #3

try adding this before the user alive check
PHP Code:
    set_pev(idpev_deadflagDEAD_RESPAWNABLE)
    
dllfunc(DLLFunc_Thinkid
__________________
deprale is offline
Hardix
Junior Member
Join Date: Nov 2020
Old 01-26-2023 , 08:48   Re: Spectator -> CT or T bug
Reply With Quote #4

Quote:
Originally Posted by georgik57 View Post
Its either because you don't set a player class or because the spawn plugin doesn't spawn you properly.
Tried to set a player class but it didn't worked.

Quote:
Originally Posted by deprale View Post
try adding this before the user alive check
PHP Code:
    set_pev(idpev_deadflagDEAD_RESPAWNABLE)
    
dllfunc(DLLFunc_Thinkid
Tried that too, same result. Thanks guys ^^

Last edited by Hardix; 01-26-2023 at 08:49.
Hardix is offline
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 01-26-2023 , 10:24   Re: Spectator -> CT or T bug
Reply With Quote #5

Check the spawn plugin. Try using ham_spawn.
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
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 08:33.


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