Raised This Month: $32 Target: $400
 8% 

Advanced Chat [ v2.3 ] for CS1.6


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   General Purpose       
Korxu
Senior Member
Join Date: Sep 2010
Old 12-06-2011 , 11:34   Advanced Chat [ v2.3 ] for CS1.6
Reply With Quote #1

AdvancedChat

- Plugin information:
This plugins allows to the users of the server to send a custom message to a group of players or a specific player. Currently, this is the only function, but soon it will include a group-chat ( send messages to a group of people, you choose one to one this people and the plugin save it using nvault ), an access system ( give/remove access from the differents menu to each player ) and a plugin configuration menu ( to change all the variables in-game ).

- Information about features:
  • Send custom message to a group of people or a specific player.

    - First you have to choose the group of people to send your custom message. The groups that you can choose are: all players, all alive players, all dead players, alive CT players, dead CT players, alive T players, dead T players, all admins, all alive admins, all dead admins, alive CT admins, dead CT admins, alive T admins, dead T admins.

  • Create groups of people to talk in the server. | NOT AVAILABLE YET

    - You can create groups of people and talk with their in a private chat, and you can add more people, kick people from the group, mute people to don't see the messages, make "leader group" of the group....

  • Manage access of each player to each menu.

    - The admins can add/remove access to the differents menu, allow to be part of a group, kick any player from her group, disable the "send custom message" option....

  • Control all the plugin configuration.

    - Again, the admins can control all the plugin configuration, enable/disable it, change admins flags....

- Configuration:
You only can change the message tags, the first is the long tag ( to information messages ) and the second the short tag ( used in the sended messages ). You can use the colors, !g to green, !y to team color and !y to default ( yellow ) color.
PHP Code:
new const gsz_MessageTags [ ] [ ] =
{
    
"!g[!tAdvancedChat!g]!y",
    
"!g[!tAChat!g]!y"

And the admin permissions, the first is the access to see the 'admin groups' messages, the second to open the 'users permissions' menu, and the last to open the 'plugin configuration' menu.
PHP Code:
new const gi_PermissionsList [ ] =
{
    
ADMIN_KICK,
    
ADMIN_BAN,
    
ADMIN_RCON


- Screenshots:
[IMG]http://img197.**************/img197/6063/halflife17.png[/IMG][IMG]http://img600.**************/img600/74/halflife18.png[/IMG]
[IMG]http://img33.**************/img33/4162/halflife19.png[/IMG][IMG]http://img545.**************/img545/2452/halflife20.png[/IMG]

[IMG]http://img18.**************/img18/5108/halflife21.png[/IMG]

- Plugin installation:
Clic on 'Get Plugin' yo get the '.amxx' file, and put it in 'cstrike/addons/amxmodx/plugins'. Now, open the file 'plugins.ini' in 'cstrike/addons/amxmodx/configs' and add 'advanced_chat.amxx' at the end of the file.

I don't know if the plugin works in others mods.

- Changelog:
Code:
06/12/2011

- First beta release ( v1.0 ).
- Removed debug function 'asd'.
- Updated ( v1.1 ).
- Complete the select specific player' option.
- Added check to avoid send messages to yourself.
- Updated ( v1.2 ).
- Fixed error in 'player_spawn ( )' with 'cs_get_user_team ( )' if the player is connecting.
- Optimized stock 'send_the_message ( )' using 'get_players ( )' instead of do a for-loop of max players. Thanks @Xalus.
- Added a second 'index check' in the stock to avoid send messages to yourself.
- Updated ( v1.3 ).


07/12/2011

- Complete re-writed all the code.
- Remove the two checks for name changed to only one.
- Change some texts and prints.
- Change the 'exit' button of the menus to 'back to ...'.
- Optimized chat tags and permissions.
- Re-organized the groups of 'send a custom message' with one more menu.
- Updated ( v2.0 )
- Created the users permissions system.
- Moved the main menu to a global string.
- Fixed some index errors.
- Updated ( v2.1 ).


08/12/2011

- Fixed 'get_players' errors.
- Fixed arrays without index.
- Added the configuration menu.
- Added option to disable the plugin.
- Added a command to enable it again.
- Added reload users permissions option.
- Fixed exit name of some menus.
- Updated ( v2.2 )
- Created variable to set/not default permissions.
- Created variable to set/not a limit of messages.
- Created variable to set an amount of max messages.
- Added some checks of messages sended.
- Added all to the 'plugin configuration' menu.
- Fixed some errors with the second 'messagemode'. Thanks @Stereo.
- Updated ( v2.3 )

- Final notes:
Remember that the plugin is a BETA release and maybe there are some things that don't work correctly. If you find some similar, please write a post to fix it. I will add the others features soon ;).

Last edited by Korxu; 11-07-2015 at 16:47.
Korxu is offline
tyin
Member
Join Date: Jun 2011
Location: Macedonia
Old 12-06-2011 , 11:39   Re: Advanced Chat [ v1.0 | BETA ]
Reply With Quote #2

looking awesome! Keep it up!
tyin is offline
Korxu
Senior Member
Join Date: Sep 2010
Old 12-06-2011 , 12:20   Re: Advanced Chat [ v1.1 | BETA ]
Reply With Quote #3

Quote:
Originally Posted by tyin View Post
looking awesome! Keep it up!
Thanks @tyin.

Updated to v1.1.
- Function 'asd' removed ( I used it to do debug tests ).

Updated to v1.2.
- Now, you can send your custom message to a specific player.
- Added check to don't send a message to yourself.

Thread updated.
- Added screenshots.

Last edited by Korxu; 12-06-2011 at 14:15. Reason: Updated, see changelog.
Korxu is offline
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 12-06-2011 , 13:16   Re: Advanced Chat [ v1.2 | BETA ]
Reply With Quote #4

Question, I saw it in some more codes..

Why not just use is_user_alive ? Instead of a new gi_PlayerAlive for it?

____________

stock send_the_message ( const index, message [ ] )

Could get optimized with get_players (.. ), I think.
__________________
Retired.

Last edited by Xalus; 12-06-2011 at 13:20.
Xalus is offline
Korxu
Senior Member
Join Date: Sep 2010
Old 12-06-2011 , 13:18   Re: Advanced Chat [ v1.2 | BETA ]
Reply With Quote #5

Quote:
Originally Posted by Xalus View Post
Question, I saw it in some more codes..

Why not just use is_user_alive ? Instead of a new gi_PlayerAlive for it?
I read in others tutorials and threads that it is better to create a variable and set true/false depending if the players is alive/dead, instead of use 'is_user_alive ( )' all the times.

Quote:
Originally Posted by Xalus View Post
stock send_the_message ( const index, message [ ] )

Could get optimized with get_players (.. ), I think.
Mmhh... well, I think that it is better that do a for-loop of the maxplayers, thanks. I will include it in the next update.

Last edited by Korxu; 12-06-2011 at 13:23.
Korxu is offline
pacheco
Senior Member
Join Date: Jul 2011
Old 12-06-2011 , 13:49   Re: Advanced Chat [ v1.2 | BETA ]
Reply With Quote #6

Awesome! Nice plugin, Korxu
__________________



pacheco is offline
Korxu
Senior Member
Join Date: Sep 2010
Old 12-06-2011 , 14:18   Re: Advanced Chat [ v1.2 | BETA ]
Reply With Quote #7

Quote:
Originally Posted by pacheco View Post
Awesome! Nice plugin, Korxu
Thanks @pacheco.

Updated to v1.3.
- Error in 'player_spawn' with connecting players fixed.
- Change the way to send the message to a group of people using 'get_players ( )' instead of do a for-loop of the max players. Also, deleted the variable 'gi_MaxPlayers'.
- Added a second index check in the 'send_the_message' stock. If the player open the 'select specific player' menu and change his name, he can avoid the first check.

Thread updated.
- Added configuration section.

Last edited by Korxu; 12-06-2011 at 14:33. Reason: Updated, see changelog.
Korxu is offline
Kidev
Veteran Member
Join Date: Jun 2010
Location: France
Old 12-06-2011 , 14:44   Re: Advanced Chat [ v1.3 | BETA ]
Reply With Quote #8

Your function 'send_the_message' is redundant ; you should loop THEN swith: you repeat a lot of code. Moreover, I think you haven't to switch.
__________________

Last edited by Kidev; 12-06-2011 at 14:48.
Kidev is offline
Korxu
Senior Member
Join Date: Sep 2010
Old 12-06-2011 , 14:49   Re: Advanced Chat [ v1.3 | BETA ]
Reply With Quote #9

Quote:
Originally Posted by -Kid- View Post
Your function 'send_the_message' is redundant ; you should loop THEN swith: you repeat a lot of code. More, I think you haven't to switch.
I think that this is less efficient, do a switch in each player. If the server has 32 players online, you do a switch 32 times, but actually, I do one swich and later one for-loop of players. I think that how it is now is better.

And if I don't do a switch, I will need a lot of checks....
Korxu is offline
Kidev
Veteran Member
Join Date: Jun 2010
Location: France
Old 12-06-2011 , 14:53   Re: Advanced Chat [ v1.3 | BETA ]
Reply With Quote #10

Quote:
Originally Posted by Korxu View Post
I think that this is less efficient, do a switch in each player. If the server has 32 players online, you do a switch 32 times, but actually, I do one swich and later one for-loop of players. I think that how it is now is better.
Your code will be much more visible but no much more efficient.

Quote:
Originally Posted by Korxu View Post
And if I don't do a switch, I will need a lot of checks....
No, just arrays
__________________
Kidev 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 08:37.


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