Raised This Month: $114 Target: $400
 28% 

Chat With Your Country!


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands        Approver:   ConnorMcLeod (74)
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 11-03-2010 , 22:44   Chat With Your Country!
Reply With Quote #1

This plugin came to me when I saw other plugins that added the country name to the beginning of a player's chat. So then I thought, maybe I could add to that, since those were very unoriginal and were getting very annoying.

Author: nikhilgupta345

Info:
This plugin allows you to talk with people that are only from your country, by using '!' before your message. It will allow only people that are in your country to see it, and it will display the country name beside the message.

Along with that, you can also team-chat and country-chat at the same time. So it will show the message only to the people that are on your team and that are in your country.

Examples:

In regular say I type: !hi my name is nikhilgupta345.
it would show: [United States] nikhilgupta345: hi my name is nikhilgupta345.

It would ONLY show to the people from the U.S..

In team chat I type: !hi my name is nikhilgupta345.
it would show: [United States] (TERRORIST) nikhilgupta345: hi my name is nikhilgupta345.

This would ONLY show to people from the U.S. AND on my team.

This plugin is useful when you have a lot of people from a different language in your server, or want to keep people in the server because you don't want them to leave because of the different languages spoken.

Cvars:
cc_adminchat <0/1> <default: 1>: Whether admins should see the country chat or not.
Changelog:
Code:
v1.0 - Nov. 03, 2010: Plugin first released.
v1.1 - Nov 04, 2010: Added cvar for admins to see all chat. Commented code (or some of it, will comment rest later).
Credits:
Me - creating the plugin
Multiple People - using their plugin's as an idea-base.

Installation Instructions:
-Click the 'Get Source' Link below.
-Place countrychat.sma in your scripting folder.
-Add 'colorchat.inc ' to your includes folder.
-Run compile.exe

Hope this is original, haven't seen anything like this before
Attached Files
File Type: inc colorchat.inc (1.9 KB, 834 views)
File Type: sma Get Plugin or Get Source (countrychat.sma - 2038 views - 4.8 KB)
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please

Last edited by nikhilgupta345; 01-08-2011 at 11:48.
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 11-03-2010 , 23:01   Re: Chat With Your Country!
Reply With Quote #2

i'm pretty sure that
Code:
new countries[32][46];
new ips[32][30];
is supposed to be:
Code:
new countries[33][46];
new ips[33][30];
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 11-03-2010 , 23:05   Re: Chat With Your Country!
Reply With Quote #3

Oh,that makes sense. Forgot that 0 couldn't be an id

Thanks
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-04-2010 , 05:56   Re: Chat With Your Country!
Reply With Quote #4

'Get Plugin' linkg doesn't work with custom includes.
__________________
- tired and retired -

Last edited by ConnorMcLeod; 11-04-2010 at 08:38.
ConnorMcLeod is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 11-04-2010 , 08:02   Re: Chat With Your Country!
Reply With Quote #5

People in different country's can speak the same language, referring to belgium,french,the netherlands and germany (and ofc their will be many others)
__________________
I am out of order!
grimvh2 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-04-2010 , 08:39   Re: Chat With Your Country!
Reply With Quote #6

It's right, would be better to work with player languages rather than geoip, let player choosea chan or something like that.
__________________
- tired and retired -
ConnorMcLeod is offline
dark_style
Senior Member
Join Date: Jul 2009
Location: Bulgaria
Old 11-04-2010 , 11:08   Re: Chat With Your Country!
Reply With Quote #7

http://forums.alliedmods.net/showthread.php?t=124688

Last edited by YamiKaitou; 11-04-2010 at 13:08. Reason: fixing bbcode fail
dark_style is offline
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 11-04-2010 , 17:49   Re: Chat With Your Country!
Reply With Quote #8

This is not related to your plugin...


Ok about countries having the same language. Is there a function that will return player's language?
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please

Last edited by nikhilgupta345; 11-04-2010 at 18:02.
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 11-04-2010 , 18:11   Re: Chat With Your Country!
Reply With Quote #9

Quote:
Originally Posted by dark_style View Post
You failed, read the description first.
__________________
I am out of order!
grimvh2 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-04-2010 , 19:49   Re: Chat With Your Country!
Reply With Quote #10

Quote:
Originally Posted by grimvh2 View Post
You failed, read the description first.
I though the same thing when i read main post for the first time.
Also, maybe don't block tchat from players that uses the same language as server language, i mean if me (french) chooses french channel on an english server, let me see english chat. It would be a pain for admins to always have to remember to write in admin tchat for example.

About your question on how to determine player language, may be make a menu to let players choose their language.
__________________
- tired and retired -

Last edited by ConnorMcLeod; 11-04-2010 at 19:53.
ConnorMcLeod is offline
Reply


Thread Tools
Display Modes

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 17:49.


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