AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [HELP] Creating fake team.. (https://forums.alliedmods.net/showthread.php?t=295581)

CrazY. 03-29-2017 20:55

[HELP] Creating fake team..
 
Hey, have any way to spawn the spectators or create a fake team to play with 3 types of teams in a game match? Example: TR vs CT vs FAKETEAM.

edon1337 03-30-2017 07:15

Re: [HELP] Creating fake team..
 
Set user's team as SPECTATOR and respawn him?

CrazY. 03-30-2017 07:38

Re: [HELP] Creating fake team..
 
Ok.. I will try do some tests.

Natsheh 03-30-2017 08:26

Re: [HELP] Creating fake team..
 
Why do you need a third team?

Spectators wont show score or kills or deaths in scorebar

CrazY. 03-30-2017 09:43

Re: [HELP] Creating fake team..
 
Its because I want make a mod for my plugin between aliens, humans and predators.

Yes, you are is correct.

edon1337 03-30-2017 09:46

Re: [HELP] Creating fake team..
 
Code:
#include < amxmodx > #include < cstrike > #include < hamsandwich > new g_iMaxPlayers ; public plugin_init( ) {     register_plugin( "Extra Team", "1.0", "DoNii" ) ;     register_event("HLTV", "RoundStart", "a", "1=0", "2=0")           RegisterHam( Ham_Killed, "player", "fw_HamKilledPost", 1 ) ;         g_iMaxPlayers = get_maxplayers( ) ; } public RoundStart( ) {     for ( new i = 1 ; i <= g_iMaxPlayers ; i++ ) {         new CsTeams:iPlayerTeam = cs_get_user_team( i ) ;         if( iPlayerTeam != CS_TEAM_SPECTATOR )         continue ;         cs_set_user_team( i, CS_TEAM_SPECTATOR ) ;         ExecuteHamB( Ham_CS_RoundRespawn, i ) ;     } } public fw_HamKilledPost( victim, attacker, shouldgib ) {     new CsTeams:iVictimTeam = cs_get_user_team( victim ) ;     new CsTeams:iAttackerTeam = cs_get_user_team( attacker ) ;     if( iVictimTeam == CS_TEAM_SPECTATOR )     ExecuteHamB( Ham_AddPoints, victim, -1, true ) ;     if( iAttackerTeam == CS_TEAM_SPECTATOR )     ExecuteHamB( Ham_AddPoints, attacker, 1 ) ;     return HAM_IGNORED ; }

Natsheh 03-30-2017 10:20

Re: [HELP] Creating fake team..
 
You could split the terrorists or the opposite team into two teams

Btw eddon doing this in ham spawn event is certainly a bad choice

fw_HamSpawnPost( id )

CrazY. 03-30-2017 10:59

Re: [HELP] Creating fake team..
 
Hmm. I think this dont is valid because ExecuteHamB dont work with bots, but I will test anyway.

edon1337 03-30-2017 11:03

Re: [HELP] Creating fake team..
 
Quote:

Originally Posted by CrazY. (Post 2507906)
Hmm. I think this dont is valid because ExecuteHamB dont work with bots, but I will test anyway.

What bots are you talking about? You can use ExecuteHamB( Ham_Spawn, index ) for bots..

Quote:

Originally Posted by Natsheh (Post 2507896)
You could split the terrorists or the opposite team into two teams

He's wanting spectators to have their own team not split them, basically he wants spectators to play while being in Spectator team.

Quote:

Originally Posted by Natsheh (Post 2507896)
Btw eddon doing this in ham spawn event is certainly a bad choice

What to use then? They won't respawn if we call another event.

Natsheh 03-30-2017 11:56

Re: [HELP] Creating fake team..
 
2 Attachment(s)
UPDATED CODE v1.1


All times are GMT -4. The time now is 17:50.

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