Raised This Month: $ Target: $400
 0% 

Changing Teams Help!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Leon M.
Senior Member
Join Date: Apr 2009
Location: Germany
Old 04-15-2013 , 06:05   Re: Changing Teams Help!
Reply With Quote #1

And 1 more suggestion basically like yours but with additional information for 3rd party plugins. The main issue was flag "a" into your get_players function. This will skip players

Spoiler
__________________
  • ZapTic - Paintball (Version 7.1.3 b1303)
  • Your #1 CS Paintball Server since 2008
  • 85.131.163.101:27015

Last edited by Leon M.; 04-15-2013 at 06:12.
Leon M. is offline
oxygen935
Veteran Member
Join Date: Jun 2012
Location: Athens, Greece
Old 04-15-2013 , 07:03   Re: Changing Teams Help!
Reply With Quote #2

I Fixed Blizzard's Plugin!
Now work like a charm!!!
Thanks a lot blizzard...
__________________
Quote:
Originally Posted by quark View Post
You're a genius
Stopped any pawn work cause of university for computer science

Last edited by oxygen935; 04-15-2013 at 08:30.
oxygen935 is offline
Send a message via Skype™ to oxygen935
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 04-15-2013 , 09:50   Re: Changing Teams Help!
Reply With Quote #3

EDIT: Oh, forgot to read second page - didn't realise it was solved ... although this would be more efficient.

I'd do it like this:
Code:
#include <amxmodx> #include <cstrike> new CsTeams:g_iTeamSwitch[ 33 ]; public plugin_init() {     register_event( "DeathMsg", "Event_DeathMsg", "a" );     register_logevent( "Logevent_RoundEnd", 2, "1=Round_End" ); } public Event_DeathMsg() {     new iAttacker = read_data( 1 );     new iVictim = read_data( 2 );         if( cs_get_user_team( iAttacker ) == CS_TEAM_CT && iVictim != iAttacker && !get_cvar_num( "mp_friendlyfire" ) )     {         g_iTeamSwitch[ iAttacker ] = CS_TEAM_T;         g_iTeamSwitch[ iVictim ] = CS_TEAM_CT;     } } public Logevent_RoundEnd() {     new Players[ 32 ], iNum;     get_players( Players, iNum );         for( new i ; i < iNum ; i ++ )     {         if( g_iTeamSwitch[ Players[ i ] ] )         {             cs_set_user_team( Players[ i ], g_iTeamSwitch[ Players[ i ] ] );             g_iTeamSwitch[ Players[ i ] ] = CS_TEAM_UNASSIGNED;         }     } }
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.

Last edited by hornet; 04-15-2013 at 09:52.
hornet is offline
oxygen935
Veteran Member
Join Date: Jun 2012
Location: Athens, Greece
Old 04-22-2013 , 09:02   Re: Changing Teams Help!
Reply With Quote #4

guys, i have a little problem here.
The players change team in round end.
So, when a ct kills a terror, when round ends the ct who will be terror can be killed from other cts and this causes bugs.
Well, this kill event is happening in the time after round end and before player spawn.
Any help??

Idea(But i don't know if it's going to work): change teams on round start(but we have to respawn the players? cause on round start if they change team they will die...)

Thanks In advance,
Oxygen
__________________
Quote:
Originally Posted by quark View Post
You're a genius
Stopped any pawn work cause of university for computer science
oxygen935 is offline
Send a message via Skype™ to oxygen935
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 10:54.


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