Raised This Month: $51 Target: $400
 12% 

Changing colors in sourcemod


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
M3Power
Member
Join Date: Apr 2017
Old 04-15-2017 , 14:59   Changing colors in sourcemod
Reply With Quote #1

Hello,

I've downloaded quake sounds plugin, it works great and all. But I'd like to change some colors in the translation file.

I'd like to change announce message color:

Code:
From this:

"Say !quake or /quake to set your quake sounds preferences"
to "Say !quake or /quake to set your quake sounds preferences"
So I want to change certain colors form default to custom. I don't know how to do it so I would appreciate very much if someone could explain how does colors in sourcemod really work (how to change them).

This is the plugin I'd like to change color in it's translation file loacted in /cstrike/addons/sourcemod/translations. Perhaps I should change something in the plugin so it can print colored announcements/translations...?

Here is the screenshot of the translation file and the line I'd like to change the color in:



Kind regards.

Last edited by M3Power; 04-15-2017 at 15:03.
M3Power is offline
sneaK
SourceMod Moderator
Join Date: Feb 2015
Location: USA
Old 04-15-2017 , 15:30   Re: Changing colors in sourcemod
Reply With Quote #2

You need to utilize an include like multicolors and change the way the it's processed inside of the plugin (ex. changing PrintToChat > CPrintToChat). Really rough explanation but that should be enough info for you to get started
__________________
sneaK is offline
M3Power
Member
Join Date: Apr 2017
Old 04-15-2017 , 15:50   Re: Changing colors in sourcemod
Reply With Quote #3

Quote:
Originally Posted by blackhawk74 View Post
You need to utilize an include like multicolors and change the way the it's processed inside of the plugin (ex. changing PrintToChat > CPrintToChat). Really rough explanation but that should be enough info for you to get started
Thanks for the explanation, now I can make a perception on how it works.

So, I've changed PrintToChat to CPrintToChat in .sp file and while I tried to compile it in my windows sourcemod compiler I got the error:

Code:
/home/groups/sourcemod/upload_tmp/phpKyPV7M.sp(613) : error 017: undefined symbol "CPrintToChat"  1 Error.
I have uploaded multicolors you suggested me in my windows sourcemod but still got this error.
Also on online sourcemod compiler same error appears, so I can't compile .sp to .smx
M3Power is offline
sneaK
SourceMod Moderator
Join Date: Feb 2015
Location: USA
Old 04-15-2017 , 16:11   Re: Changing colors in sourcemod
Reply With Quote #4

When you compile the plugin you need to add the include at the top, with all the others

Code:
#include <multicolors>
No need to upload the actual include files, just make sure you have them in your local folder in the proper hierarchy when you go to compile the plugin.
__________________
sneaK is offline
M3Power
Member
Join Date: Apr 2017
Old 04-15-2017 , 16:52   Re: Changing colors in sourcemod
Reply With Quote #5

Quote:
Originally Posted by blackhawk74 View Post
When you compile the plugin you need to add the include at the top, with all the others

Code:
#include <multicolors>
No need to upload the actual include files, just make sure you have them in your local folder in the proper hierarchy when you go to compile the plugin.
Did what you've said. But cannot compile the .sp:

M3Power is offline
sneaK
SourceMod Moderator
Join Date: Feb 2015
Location: USA
Old 04-15-2017 , 17:13   Re: Changing colors in sourcemod
Reply With Quote #6

Oh right, I don't know why the author did this. Remove this line (it's forcing new-style declarations which quake sounds v3 hasn't been updated for): https://github.com/Bara20/Multi-Colo...colors.inc#L12
__________________

Last edited by sneaK; 04-15-2017 at 17:13.
sneaK is offline
M3Power
Member
Join Date: Apr 2017
Old 04-15-2017 , 17:45   Re: Changing colors in sourcemod
Reply With Quote #7

Quote:
Originally Posted by blackhawk74 View Post
Oh right, I don't know why the author did this. Remove this line (it's forcing new-style declarations which quake sounds v3 hasn't been updated for): https://github.com/Bara20/Multi-Colo...colors.inc#L12
Well, that helped quite a lot.
Works flawlessly now Thanks alot

Btw, which notepad/app you use for opening for example .inc files. If I open it in notepad it is all messed up and it's hard to find/read the stuff included.
M3Power is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 04-15-2017 , 17:48   Re: Changing colors in sourcemod
Reply With Quote #8

Quote:
Originally Posted by M3Power View Post
Btw, which notepad/app you use for opening for example .inc files. If I open it in notepad it is all messed up and it's hard to find/read the stuff included.
Pretty much any decent text editor supports Unix line endings, I'd suggest trying Atom, VSCode, or Notepad++.
__________________
asherkin 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 16:24.


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