Raised This Month: $ Target: $400
 0% 

What is the amx command to swap teams


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bart1313
Junior Member
Join Date: Aug 2005
Old 09-03-2005 , 14:01   What is the amx command to swap teams
Reply With Quote #1

What is the amx command to make people swap teams?
bart1313 is offline
pdoubleopdawg
Senior Member
Join Date: Aug 2005
Old 09-03-2005 , 14:01  
Reply With Quote #2

http://www.amxmodx.org/funcwiki.php?go=func&id=200

EDIT: Oops, this was in 'scripting' help. I thought you meant the function. My bad, it probably won't help. Wrong forum!
pdoubleopdawg is offline
bart1313
Junior Member
Join Date: Aug 2005
Old 09-03-2005 , 14:15  
Reply With Quote #3

lol yeah wrong topic i just noticed it after i posted it.
bart1313 is offline
pdoubleopdawg
Senior Member
Join Date: Aug 2005
Old 09-03-2005 , 14:24  
Reply With Quote #4

That's alright, sadly there arn't any default commands for this. There are many plugins that do this though, so you're in luck.

I found this one in a minute of searching.
http://forums.alliedmods.net/showthread.php?t=17526
pdoubleopdawg is offline
bart1313
Junior Member
Join Date: Aug 2005
Old 09-03-2005 , 14:27  
Reply With Quote #5

Yahooo thx man
bart1313 is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 09-03-2005 , 14:42  
Reply With Quote #6

amx_swap ;)

Use it to easily change the player's team.

Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> #define PLUGIN      "AMX Swap" #define VERSION     "0.2" #define AUTHOR      "v3x" public plugin_init() {     register_plugin(PLUGIN,VERSION,AUTHOR);     register_clcmd("amx_swap","ClCmd_DoSwap",ADMIN_SLAY,"<nick,#userid>"); } public ClCmd_DoSwap(id,lvl,cid) {     if(!cmd_access(id,lvl,cid,2))         return PLUGIN_HANDLED;     new szArg[33];     read_argv(1,szArg,32);     new iPlayer = cmd_target(id,szArg,3);     if(!is_user_connected(iPlayer))         return PLUGIN_HANDLED;     new CsTeams:iTeam = cs_get_user_team(iPlayer);     switch( iTeam )     {         case CS_TEAM_CT: cs_set_user_team(iPlayer,CS_TEAM_T);         case CS_TEAM_T: cs_set_user_team(iPlayer,CS_TEAM_CT);     }     new szAdmin[33],szPlayer[33];     get_user_name(id,szAdmin,32);     get_user_name(iPlayer,szPlayer,32);     switch( get_cvar_num("amx_show_activity") )     {         case 2: client_print(0,print_chat,"ADMIN %s: Swap %s",szAdmin,szPlayer);         case 1: client_print(0,print_chat,"ADMIN: Swap %s",szPlayer);     }     log_amx("ADMIN %s used amx_swap on %s",szAdmin,szPlayer);     return PLUGIN_HANDLED; }
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 09-03-2005 , 16:57  
Reply With Quote #7

Code:
case 1: client_print(0,print_chat,"ADMIN: Swap %s",szPlayer);
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 09-03-2005 , 23:33  
Reply With Quote #8

Woops, fixed

Can anybody test it? ;o
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Riddick51
BANNED
Join Date: Jul 2005
Location: Lincoln, Nebr US
Old 09-04-2005 , 16:48  
Reply With Quote #9

with other solutions, you have to be running the: #include <cstrike>

what i like about switch_teams.sma is that it only requires: #include <amxmodx>

it doesn't always work on the first attempt, but if you wait another round or two, scroll up on your con and re-enter the command, it will usually take the second time around. nice if you like to keep your server running trim.

Note: be sure to use #include <amxmodX> instead of the <amxmod>
Riddick51 is offline
Send a message via AIM to Riddick51 Send a message via MSN to Riddick51 Send a message via Yahoo to Riddick51
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 09-04-2005 , 19:56  
Reply With Quote #10

Well, anyone know if my version works?
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
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 14:31.


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