AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Solved CCSPlayer::SwitchTeam( 1 ) - invalid team index (https://forums.alliedmods.net/showthread.php?t=322125)

neatek 03-16-2020 14:17

CCSPlayer::SwitchTeam( 1 ) - invalid team index
 
What does it means?

PHP Code:

CS_SwitchTeam(client1); 

PHP Code:

CCSPlayer::SwitchTeam) - invalid team index 

PHP Code:

Server CS:Source Windows

Build Label
:           5394425   # Uniquely identifies each build
Network PatchVersion:  5394425   # Determines client and server compatibility
Protocol version:           24   # High level network protocol version
Server version:        5394425
Server AppID
:           232330

SourceMod Version Information
:
    
SourceMod Version1.10.0.6478
    SourcePawn Engine
1.10.0.6478jit-x86 (build 1.10.0.6478)
    
SourcePawn APIv1 5v2 12
    Compiled on
Mar  5 2020 10:59:39
    Built from
https://github.com/alliedmodders/sourcemod/commit/a8b9da9a
    
Build ID6478:a8b9da9a
    http
://www.sourcemod.net/

Metamod:Source version 1.10.7-dev
Built from
https://github.com/alliedmodders/metamod-source/commit/6c8495f
Build ID971:6c8495f
Loaded 
As: Valve Server Plugin
Compiled on
Mar 28 2019
Plugin 
interface version15:14
SourceHook version
5:5
http
://www.metamodsource.net/ 

Server is clear, with fresh install of sourcemod / mm

Also, when i switch player from 2 or 3 team to 1 (spec), player have 1 health... (with ChangeClientTeam) :?::|

Ilusion9 03-17-2020 05:24

Re: CCSPlayer::SwitchTeam( 1 ) - invalid team index
 
1 is spectators team. you can't use SwitchTeam to move players to spectators. Use ChangeClientTeam instead. Kill the player if he's alive before you move to another team.


All times are GMT -4. The time now is 19:47.

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