Raised This Month: $ Target: $400
 0% 

Is it possible to change the names of teams?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Pro Patria Finland
Senior Member
Join Date: Apr 2006
Location: BaronPub.com
Old 06-05-2007 , 18:34   Is it possible to change the names of teams?
Reply With Quote #1

I've searched and searched, and can't find the solution.

Is it possible to change the CS team names? I mean, when the game starts and you choose a team, you would choose either "Terrorist" or "Counter-Terrorist," but would it be possible to choose "Pros" and "Noobs" for example?

I am going to bed, I hope somebody can help me.
__________________
I am not a number. I am Gordon Freeman!
Pro Patria Finland is offline
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 06-05-2007 , 18:45   Re: Is it possible to change the names of teams?
Reply With Quote #2

I think there is no chance doin that..
Because the Teamnames are specified in the HLSDK...
But maybe there is a workaround !? *hmm*

greetz regalis (sleep well ;) )
__________________
regalis is offline
Orangutanz
Veteran Member
Join Date: Apr 2006
Old 06-05-2007 , 18:50   Re: Is it possible to change the names of teams?
Reply With Quote #3

That is possible but only with Old Style Menus (White Text).
You cannot change the scoreboard team names, that is configured clientside I believe.
__________________
|<-- Retired from everything Small/Pawn related -->|
You know when you've been Rango'd
Orangutanz is offline
Pro Patria Finland
Senior Member
Join Date: Apr 2006
Location: BaronPub.com
Old 06-06-2007 , 07:42   Re: Is it possible to change the names of teams?
Reply With Quote #4

Quote:
Originally Posted by Orangutanz View Post
That is possible but only with Old Style Menus (White Text).
You cannot change the scoreboard team names, that is configured clientside I believe.
Well, I know how to block the VGUI menu, but care to explain how it's possible to change the team names?
__________________
I am not a number. I am Gordon Freeman!
Pro Patria Finland is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 06-06-2007 , 12:14   Re: Is it possible to change the names of teams?
Reply With Quote #5

He meant that you have to code your own menu to replace the original one.
VEN is offline
Pro Patria Finland
Senior Member
Join Date: Apr 2006
Location: BaronPub.com
Old 06-06-2007 , 16:53   Re: Is it possible to change the names of teams?
Reply With Quote #6

Ahh, ok, I see.
__________________
I am not a number. I am Gordon Freeman!
Pro Patria Finland is offline
Pro Patria Finland
Senior Member
Join Date: Apr 2006
Location: BaronPub.com
Old 06-06-2007 , 19:18   Re: Is it possible to change the names of teams?
Reply With Quote #7

I hope someone reads this thread...

Soo, anyhows, this is what I did:

Code:
public client_connect(id) {                       //Disables the VGUI menus, since they for some     set_user_info(id, "_vgui_menus", "0")//reason can't be blocked...? } public blockteams(id) {     show_menu(id, 0, "work", 1, "#Team_Select_Spect")   //Here we block the Team selection     set_task(1.0,"showmenu",id);                //menu and go to my new menu } public showmenu(id) {   //My cool menu, copied almost fully from Emp`'s menu tutorial :D        cs_set_user_team (id, CsTeams:CS_TEAM_SPECTATOR)    //Tried this for fixing the problem, won't work     new menu = menu_create("\rChoose team:", "menu_handler")     menu_additem(menu, "\wThe Freeman Team", "1", 0)        //First option, "Terrorist team"     menu_additem(menu, "\wThe Government Team", "2", 0) //Second option "CT team"     menu_additem(menu, "\wSpectator", "3", 0)       //Third option Spectator     menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)     menu_display(id, menu, 0) } public menu_handler(id, menu, item) {   //Still copied from Emp`'s tutorial...     if (item == MENU_EXIT) {         menu_destroy(menu)         return PLUGIN_HANDLED     }         new data[6], iName[64]     new access, callback     menu_item_getinfo(menu, item, access, data,5, iName, 63, callback)     new key = str_to_num(data)     switch(key) {                 case 1:{             cs_set_user_team (id, CsTeams:CS_TEAM_T, CS_T_LEET) //Here I set the player team             menu_destroy(menu)                  //to terrorist             return PLUGIN_HANDLED         }         case 2:{                     cs_set_user_team (id, CsTeams:CS_TEAM_CT, CS_CT_SAS)    //Same for CT...             menu_destroy(menu)             return PLUGIN_HANDLED         }         case 3:{             cs_set_user_team (id, CsTeams:CS_TEAM_SPECTATOR)    //..and for SPEC             menu_destroy(menu)             return PLUGIN_HANDLED         }     }     menu_destroy(menu)     return PLUGIN_HANDLED  }

So basically it works. It block the old teamchooser menu, and starts the new one. And it sets the clients team to the desired one too. But otherwise it doesn't function. With the last code, the player doesn't spawn until the next round (I also tried this making the player spawn right away with the spawn command). Either way, it still doesn't work:

-The player spawns
-There's nothing on the HUD, only players money
-The player can't move from where he spawned

So basically, you can't do anything. Seems as though I need to make CS understand that I've joined the game. Any suggestions on how to do that? I've tried making the client spectator first in various places in the code, but it refuses to work.
__________________
I am not a number. I am Gordon Freeman!
Pro Patria Finland is offline
Orangutanz
Veteran Member
Join Date: Apr 2006
Old 06-06-2007 , 20:53   Re: Is it possible to change the names of teams?
Reply With Quote #8

You have to completely maniplate the original CS menu, ie not force spawning clients.

Code:
new team = get_user_team(id) switch (key) {     case 0: /* Team 1 */     {         if (team != 1)         {             engclient_cmd(id, "jointeam", "1")             engclient_cmd(id, "menuselect", "5")         }     }     case 1: /* Team 2 */     {         if (team != 2)         {             engclient_cmd(id, "jointeam", "2")             engclient_cmd(id, "menuselect", "5")         }     }     /* Random Team */     case 4: menu_handler(id, menu, random_num(0, 1))     /* Spectator */     case 5: engclient_cmd(id, "jointeam", "6") } show_menu(id, 0, " ", 0)
__________________
|<-- Retired from everything Small/Pawn related -->|
You know when you've been Rango'd
Orangutanz is offline
Greenberet
AMX Mod X Beta Tester
Join Date: Apr 2004
Location: Vienna
Old 06-07-2007 , 04:48   Re: Is it possible to change the names of teams?
Reply With Quote #9

and dont forget to hook the TeamInfo msg. without it you would still see Terrorists/Counter Terrorists in the ScoreInfo sheet
__________________
Greenberet is offline
Send a message via ICQ to Greenberet Send a message via MSN to Greenberet
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:31.


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