How to replace color in chat?
Im trying to find tutorial how to replace color of messages what player say but i cant find it have somebody?
|
Re: How to replace color in chat?
I have it if it will help somebody:
Code:
/* Plugin generated by AMXX-Studio */ |
Re: How to replace color in chat?
You should use a switch instead of an if else if structure for the user's team. Calling get_user_team() that many times is inefficient.
|
Re: How to replace color in chat?
i read somewhere function if is faster than switch and when i use switch it doesnt show messages what i type when i change team and it kill myself with if is it working normal. Is it true?
I dont know how to do else in switch |
Re: How to replace color in chat?
PHP Code:
|
Re: How to replace color in chat?
|
Re: How to replace color in chat?
after testing when i do
Code:
ColorChat(id, TEAM_COLOR, "%s ^3%s : ^4%s",prefix[5], Name, Message)Code:
ColorChat(0, TEAM_COLOR, "%s ^3%s : ^4%s",prefix[5], Name, Message) |
Re: How to replace color in chat?
In API
Code:
client_print_color |
Re: How to replace color in chat?
You can't choose red or blue, only team color. I know that there exists a function that tricks the game into thinking you are on the other team to force a color but I don't know if it actually works or is reliable.
index is the specific player which is often called "id" in most plugins/functions and is the player's entity index. |
Re: How to replace color in chat?
And is any other way how to do colored chat with prefixes where Terrorist will see name of Counter-Terrorist in blue color?
|
| All times are GMT -4. The time now is 23:10. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.