Raised This Month: $ Target: $400
 0% 

Can I "client_print" to only one team?


Post New Thread Reply   
 
Thread Tools Display Modes
suhdude
Senior Member
Join Date: Mar 2016
Location: Sweden
Old 11-08-2017 , 10:20   Re: Can I "client_print" to only one team?
Reply With Quote #11

Quote:
Originally Posted by KiLLeR. View Post
Instead of explaining, it was a faster to edit the plugin you have gave in first post. So, here is itCODE)

But I think this is useless and ugly, because chat will be flooded if there is more players in the server when someone write "/money" in chat.
I really really appriciate you taking the time, but it doesent work for me.
It only displays my money, and says "teammates money" after every post.
Also this is for a private 5 v 5 gather server so flooding is no problem.

Anyways I think its better to just use this plugin I found, and make it automatically print /money to chat on spawn.
Should not be too hard to do using engclient_cmd? But I dont know how to trigger something on spawn like that..

Thanks again friend.

Code:
/* say_team /money // client cmd */ #include <amxmodx> #include <cstrike> #define PLUGIN "show_money" #define VERSION "1.0" #define AUTHOR "Weejee & n2k" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_clcmd("say /money", "cmd_money")     register_clcmd("say_team /money", "cmd_money") } public cmd_money(id) {     new iMoney;     new money_Buffer[100+1];     iMoney = cs_get_user_money(id);     format( money_Buffer, 100, "$%d", iMoney );         engclient_cmd( id, "say_team", money_Buffer ); }

Last edited by suhdude; 11-08-2017 at 10:22.
suhdude is offline
KiLLeR.
Senior Member
Join Date: Jul 2014
Location: Bulgaria
Old 11-08-2017 , 10:55   Re: Can I "client_print" to only one team?
Reply With Quote #12

I checked again the code, because no way to doesn't work since i only changed the hud message to chat message and there was a mistake with indexes. Code updated...

Last edited by KiLLeR.; 11-08-2017 at 10:57.
KiLLeR. is offline
suhdude
Senior Member
Join Date: Mar 2016
Location: Sweden
Old 11-08-2017 , 11:04   Re: Can I "client_print" to only one team?
Reply With Quote #13

Quote:
Originally Posted by KiLLeR. View Post
I checked again the code, because no way to doesn't work since i only changed the hud message to chat message and there was a mistake with indexes. Code updated...
Sorry maybe it doesent work becaues I test it with bots.
The original plugin works with bots tho..

I'm sorry isnt it much easier and less code to just have the other plugin run on spawn?
If someone could just tell me how to make every client do: "say_team /money"on spawn.
suhdude is offline
suhdude
Senior Member
Join Date: Mar 2016
Location: Sweden
Old 11-08-2017 , 12:18   Re: Can I "client_print" to only one team?
Reply With Quote #14

Quote:
Originally Posted by KiLLeR. View Post
I checked again the code, because no way to doesn't work since i only changed the hud message to chat message and there was a mistake with indexes. Code updated...
nvm I got some help and its working!

Thanks
suhdude is offline
KiLLeR.
Senior Member
Join Date: Jul 2014
Location: Bulgaria
Old 11-08-2017 , 13:31   Re: Can I "client_print" to only one team?
Reply With Quote #15

There is no way the plugin to doesn't work, since I only changed hudmessage to client_print. Okay, tommorow I will test it and will show you that it works.

Last edited by KiLLeR.; 11-08-2017 at 13:33.
KiLLeR. is offline
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 09:03.


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