Raised This Month: $150 Target: $400
 37% 

Team Scores On Chat (With Multilingual)


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Statistical       
ProgramViewer
New Member
Join Date: Jul 2023
Old 11-12-2024 , 01:49   Team Scores On Chat (With Multilingual)
Reply With Quote #1

Description:
This plugin displays the current scores of the Counter-Terrorist and Terrorist teams at the start of each round in the chat. It provides a simple, no-frills solution to keep players updated on the leading team or a tie, with a single message per round. No complex interfaces or additional setup are required.

Features:
-Displays the current scores of Counter-Terrorists and Terrorists at the beginning of each round.
-Simple output, ensuring easy readability without clutter.
-Multilingual support: Automatically adapts to the player’s language settings for an improved user experience.

How It Works:
The plugin tracks and updates the teams' scores throughout the game. At the start of each round, a short message is displayed in the chat summarizing the score, showing whether one team is leading or if it's a tie. It runs seamlessly in the background without requiring any action from players or server admins. Additionally, the multilingual feature ensures the message matches the player's language preferences, enhancing accessibility.

Images Preview:
Screenshots are provided to show how the messages appear in different scenarios, including a tie, Terrorists leading, and Counter-Terrorists leading.

Feedback and Contact:
This is my first post, and I’m still learning the process of plugin submissions and formatting. If you encounter any issues or have suggestions for improvements, I welcome your feedback! Feel free to reach out—I’m open to making changes based on your input as I continue to refine my work.

If you have any questions or would like to discuss any related topic, don't hesitate to send me a private message. I'm open-minded and always happy to chat!

EDIT: Uploaded the updated plugin file team_score_on_chat.sma.
Changes include:
-Removal of unnecessary for loop in event_new_round().
-Elimination of unnecessary id parameter in show_scores_in_chat() function.
-The g_maxplayers variable is no longer needed after the removal of the loop.
-Version is now 1.1.
Attached Thumbnails
Click image for larger version

Name:	cts-lead.jpg
Views:	159
Size:	27.3 KB
ID:	206422   Click image for larger version

Name:	tie.jpg
Views:	79
Size:	25.2 KB
ID:	206423   Click image for larger version

Name:	tts-lead.jpg
Views:	77
Size:	34.4 KB
ID:	206424  
Attached Files
File Type: txt team_score_on_chat.txt (469 Bytes, 27 views)
File Type: sma Get Plugin or Get Source (team_score_on_chat.sma - 75 views - 1.5 KB)

Last edited by ProgramViewer; 11-12-2024 at 11:48. Reason: Updated to reflect feedback on LANG_PLAYER usage and removed player loop.
ProgramViewer is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-12-2024 , 02:48   Re: Team Scores On Chat (With Multilingual)
Reply With Quote #2

Quote:
LANG_PLAYER is a special modifier that should only be used when sending a message to all players - it means "show in every player's native language"
This means that you are using LANG_PLAYER wrong. It also means that you don't need to do any looping through the players because LANG_PLAYER is specifically for this use case. This is the example provided in the Wiki:

Code:
client_print(0, print_chat, "[AMXX] %L", LANG_PLAYER, "HELLO")
So, you can remove the loop and simply change "id" in client_print() to 0.

Wiki Reference: Advanced Scripting: Multi-Lingual Support
__________________
fysiks is offline
ProgramViewer
New Member
Join Date: Jul 2023
Old 11-12-2024 , 11:54   Re: Team Scores On Chat (With Multilingual)
Reply With Quote #3

Hello fysiks,

Thank you for your helpful feedback! I’ve taken your suggestion into account and made the following changes to the plugin:

-Removed the unnecessary for loop in event_new_round().
-Eliminated the id parameter in the show_scores_in_chat() function, as it is no longer needed.
-The g_maxplayers variable has been removed, as it was part of the loop that was eliminated.

Thanks again for your support!
ProgramViewer 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 06:48.


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