Raised This Month: $ Target: $400
 0% 

Colored text messages


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
feren02
Senior Member
Join Date: Mar 2012
Old 05-06-2012 , 05:10   Colored text messages
Reply With Quote #1

Hi,

How can I put colors in texts in "Configuration Settings" file?

E.g.
PHP Code:
]/eat
exact
don
't show
text
All
[green][o-cP` Battle Arena][/green] %name is eating%text.
don'
t log 
>>> The [o-cP` Battle Arena] should be green in text message in-game.

Here are the files that I have:

.SMA
.CFG



Many thanks in advance, looking forward!
Attached Files
File Type: sma Get Plugin or Get Source (GHW_Custom_Say_Commands.sma - 453 views - 14.1 KB)
File Type: ini say_commands.ini (1.2 KB, 75 views)

Last edited by feren02; 05-06-2012 at 05:16.
feren02 is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 05-06-2012 , 11:54   Re: Colored text messages
Reply With Quote #2

Wrong section.
Mitchell is offline
striker07
Veteran Member
Join Date: Mar 2012
Location: Solar System/Earth/Belgi
Old 05-07-2012 , 00:39   Re: Colored text messages
Reply With Quote #3

Quote:
Originally Posted by Mitchell View Post
Wrong section.
not really becous for that he needs an colorchat include or colorchat stock.
Look around there are plenty of plugins that already have colorprints in it. just copie it or make an include of it
striker07 is offline
feren02
Senior Member
Join Date: Mar 2012
Old 05-08-2012 , 10:44   Re: Colored text messages
Reply With Quote #4

Quote:
Originally Posted by Mitchell View Post
Wrong section.
I guess this section is not wrong.

What I am trying to ask is a help for the codes in the .sma file so that when I put [green] [/green] in a configuration settings file, there will be color in-game. The only color I can manage is the chatcolor by Conor but it is applicable in .sma files only, not for configuration settings file (the .ini file I attached)


-- Any help out there. Thank you, looking forward!

Last edited by feren02; 05-08-2012 at 10:44.
feren02 is offline
bazhenov93
Veteran Member
Join Date: Oct 2010
Old 05-08-2012 , 15:00   Re: Colored text messages
Reply With Quote #5

PHP Code:
#include <colorchat>
 
ColorChat(idGREEN"[o-cP` Battle Arena] ^1Your text"

?
bazhenov93 is offline
feren02
Senior Member
Join Date: Mar 2012
Old 05-09-2012 , 08:20   Re: Colored text messages
Reply With Quote #6

Quote:
Originally Posted by bazhenov93 View Post
PHP Code:
#include <colorchat>
 
ColorChat(idGREEN"[o-cP` Battle Arena] ^1Your text"

?
I just have said. Not in .sma files but in .ini files......... What I uploaded are related files:

1. .SMA file = the file where the .ini file is based and gets functions
2. .INI file = the file where I input the commands I want to have in my server in simple way because it already gets the functions from the .SMA file.

My question is, how can I put colored text messages using the .INI file but the script/function will come from the .SMA file so that when I put [green] [/green] in the .INI file, i will get a colored text chat in-game.
feren02 is offline
striker07
Veteran Member
Join Date: Mar 2012
Location: Solar System/Earth/Belgi
Old 05-09-2012 , 10:17   Re: Colored text messages
Reply With Quote #7

Quote:
Originally Posted by feren02 View Post
I just have said. Not in .sma files but in .ini files......... What I uploaded are related files:

1. .SMA file = the file where the .ini file is based and gets functions
2. .INI file = the file where I input the commands I want to have in my server in simple way because it already gets the functions from the .SMA file.

My question is, how can I put colored text messages using the .INI file but the script/function will come from the .SMA file so that when I put [green] [/green] in the .INI file, i will get a colored text chat in-game.
I dont think you can put colors on your server messages with php code using a .ini file, bazhenov93 is right.
download a colorchat include or strip a colorchat stock from an existing plugin into an include yourself. I recommend the colorprint from pastout's jailbreakmod. It is very good and can display multiple colors (green, team based red, blue) and is user friendly.

you can simply use his stock in the sma itself or if you use a plugin that uses a dictonary then you can put the colors in the dictonary itself.

a lil example:

In the script:
PHP Code:
//without using a dictonary:
fnColorPrint(id"sentence starts in default yellow ^2blue/red or teamcolor(not sure) ^3blue/red or teamcolor (not sure) ^4green text ^1yellow text ")
 
//with dictonary:
fnColorPrint(id"%L"LANG_SERVER"TESTLINE"'^4''^1'); 
Code:
//inside the dictonary (.txt):
TESTLINE = %cGreen text %cYellow Text.

Last edited by striker07; 05-09-2012 at 10:24.
striker07 is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 05-09-2012 , 10:19   Re: Colored text messages
Reply With Quote #8

Take a look at this plugin.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
striker07
Veteran Member
Join Date: Mar 2012
Location: Solar System/Earth/Belgi
Old 05-09-2012 , 10:25   Re: Colored text messages
Reply With Quote #9

Quote:
Originally Posted by wickedd View Post
Take a look at this plugin.
there ya go, GHW released all the good stuff
striker07 is offline
feren02
Senior Member
Join Date: Mar 2012
Old 05-09-2012 , 12:57   Re: Colored text messages
Reply With Quote #10

Quote:
Originally Posted by striker07 View Post
there ya go, GHW released all the good stuff
hi that is why I attached a .SMA file so that I could seek help in scripting. I have that plugin by GHW, but it is different from the GHW Say commands I have. Kindly assist me what code will I put in the GHW say commands in order to use color coding in the .INI files and appear in-game.

Maybe you still don't understand my point

Here it is in detail:

I attached GHW Say commands - .SMA FILE - Where codes are put and where you include <chatcolor> to have colored chat text messages in-game.
I attached Say_Commands - .INI FILE - Where texts are put so they apprear in-game, but the functions will be called from the .SMA file.


*It is clear to me that:

Quote:
I dont think you can put colors on your server messages with php code using a .ini file, bazhenov93 is right.
download a colorchat include or strip a colorchat stock from an existing plugin into an include yourself.
----- I know I can't put codes in a .INI File, that is why I am asking it to be put in the .SMA file I attached so that when I put codes in the .INI file like ([green] [/green]) --- The functions will be called from the .SMA file.


Hope its somehow clear, looking forward

Last edited by feren02; 05-09-2012 at 13:04.
feren02 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 00:20.


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