Raised This Month: $51 Target: $400
 12% 

Custom Team Names 1.14


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Admin Commands       
P@c|Man
Junior Member
Join Date: Dec 2007
Old 01-24-2008 , 16:24   Custom Team Names 1.14
Reply With Quote #1

Hi!

I was looking for a plugin which allows me to use customs team names, but I still haven't found what I'm looking for (). So I decided to make such a plugin (and I hope there isn't another).

Description:
Use custom team names like "Jedi-Knights" instead of "Counter-Terrorists". After a player has connected, he will be forced to be spectator and he can choose his desired team over a text menu. When players press "m" for selecting another team, only the text menu (with your custom team names) will appear. The round end message (CT/T win) and the round end sounds (with fade) are also replaced.

CVars:
  • ctn_team_t: custom name for "Terrorits"
  • ctn_team_ct: custom name for "Counter-Terrorits"
  • ctn_use_sounds: do you want to use special round end sounds?
  • ctn_sound_t: custom round end sound if T win, e.g. "misc/sith.mp3" (or *.wav)
  • ctn_sound_ct: custom round end sound if CT win, e.g. "misc/jedi.mp3" (or *.wav)
Note:
- Latest Version: 1.14
- Only tested with Condition-Zero. I'll try it on 1.6 soon.
- You can use this plugin with special models for example

Credits:ToDo:
- scoreboard
- remove cstrike

Hope you'll enjoy, have fun!
Attached Thumbnails
Click image for larger version

Name:	CTN_Screen1.jpg
Views:	8895
Size:	10.3 KB
ID:	23387  
Attached Files
File Type: sma Get Plugin or Get Source (custom_team_names.sma - 5142 views - 7.2 KB)
__________________

Last edited by P@c|Man; 02-05-2008 at 03:09.
P@c|Man is offline
Reaper2331
Veteran Member
Join Date: Nov 2006
Location: Columbus,Ohio
Old 01-24-2008 , 16:42   Re: Custom Team Names
Reply With Quote #2

would be good to tell how to edit the names.

and maybe add a command to change the names?
Reaper2331 is offline
Send a message via AIM to Reaper2331 Send a message via MSN to Reaper2331 Send a message via Yahoo to Reaper2331
P@c|Man
Junior Member
Join Date: Dec 2007
Old 01-24-2008 , 16:43   Re: Custom Team Names
Reply With Quote #3

Added a note above. Command will be added tomorrow.
__________________
P@c|Man is offline
fxfighter
Veteran Member
Join Date: Feb 2007
Location: Trollhättan
Old 01-24-2008 , 16:46   Re: Custom Team Names
Reply With Quote #4

so this dont change the team names on scoreboard or the end message like ct/t wins.


Shuldn't this krash the server-.-
PHP Code:
public plugin_init() {
 
register_event("ResetHUD""set_hud""be")
}
public 
set_hud(id)
{
 
// some fixes if the HUD is destroyed
 
if (!user_has_weapon(idCSW_KNIFE))
 {
  
fm_set_user_suit(id)
  
give_item(id"weapon_knife")
  switch (
cs_get_user_team(id))
  {
   case 
CS_TEAM_CT:
   {
    
give_item(id"weapon_usp")
    
give_item(id"ammo_45acp")
   }
   case 
CS_TEAM_T:
   {
    
give_item(id"weapon_glock18")
    
give_item(id"ammo_9mm")
   }
  }
 }
 return 
PLUGIN_HANDLED 
}
//use PLUGIN_CONTINUE and a task to delay this function or it might crash 
__________________
If one of my plugins become broken, contact me by mail. [email protected]

Last edited by fxfighter; 01-24-2008 at 16:56.
fxfighter is offline
Send a message via MSN to fxfighter
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-24-2008 , 16:53   Re: Custom Team Names
Reply With Quote #5

Just some suggestions.
To avoid to use cstrike/fun module and since you're using fakemeta, you can do that :


First, "Engine" is not used so, you can remove its include.


Code:
cs_[get|set]_user_team()

Global :
Code:
enum {     CS_TEAM_T = 1,     CS_TEAM_CT,     CS_TEAM_SPECTATOR } #define OFFSET_TEAM  114 #define cs_set_user_team(%1,%2)  set_pdata_int( %1, OFFSET_TEAM, %2 ) #define cs_get_user_team(%1)     get_pdata_int( %1, OFFSET_TEAM )
( Or you can use get_user_team(), it's the same ).


Code:
cs_[get|set]_user_death()

Global :
Code:
#define OFFSET_DEATHS  444 #define cs_get_user_deaths(%1)     get_pdata_int( %1, OFFSET_DEATHS ) #define cs_set_user_deaths(%1,%2)  set_pdata_int( %1, OFFSET_DEATHS, %2 )
( Or you can use get_user_death(), it's the same ).


Code:
give_item()

to

Code:
fm_give_item()


The end.

Now your includes become :

Code:
#include <amxmodx> #include <fakemeta_util>
__________________

Last edited by Arkshine; 01-24-2008 at 16:58.
Arkshine is offline
P@c|Man
Junior Member
Join Date: Dec 2007
Old 01-24-2008 , 17:35   Re: Custom Team Names
Reply With Quote #6

Update:

Quote:
Originally Posted by fxfighter View Post
so this dont change the team names on scoreboard or the end message like ct/t wins.
I'll add this tomorrow.

Quote:
Originally Posted by fxfighter View Post
Shuldn't this krash the server-.-
Fixed.

Quote:
Originally Posted by arkshine View Post
Just some suggestions.
Thanks
__________________
P@c|Man is offline
Reaper2331
Veteran Member
Join Date: Nov 2006
Location: Columbus,Ohio
Old 01-24-2008 , 18:37   Re: Custom Team Names
Reply With Quote #7

and to add, usually if a plugin works on CZ it should work on 1.6, things tend to work the same on both things.
Reaper2331 is offline
Send a message via AIM to Reaper2331 Send a message via MSN to Reaper2331 Send a message via Yahoo to Reaper2331
P@c|Man
Junior Member
Join Date: Dec 2007
Old 01-25-2008 , 17:16   Re: Custom Team Names
Reply With Quote #8

Update:
  • round end message like "ct/t wins" replaced
  • added round end sounds: default ones are music/downed_intro.mp3" for T and "music/motor_intro.mp3" for CT. Everyone has those files, so they don't have to download them. The sounds are fading out. You can set your own ones, maybe "seth_wins.mp3", etc. But be careful: There is no reset of MP3Volume yet, so people who set their volume to 0 might get annoyed after playing on your server
  • added CVars, see above.
Version: 1.05
__________________

Last edited by P@c|Man; 01-26-2008 at 08:33.
P@c|Man is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-25-2008 , 17:34   Re: Custom Team Names
Reply With Quote #9

Quote:
Originally Posted by P@c|Man View Post
added round end sounds: default ones are music/downed_intro.mp3" for T and "music/motor_intro.mp3" for CT. Everyone has those files, so they don't have to download them.
In fact, those sounds are cz sounds, not cs.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
mando127
Veteran Member
Join Date: Dec 2006
Location: virginia
Old 01-25-2008 , 21:50   Re: Custom Team Names 1.5
Reply With Quote #10

Will this play .wave ?
__________________
mando127 is offline
Send a message via Skype™ to mando127
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 00:04.


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