AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   problem with color chat (https://forums.alliedmods.net/showthread.php?t=89173)

Emilioneri 04-03-2009 08:07

problem with color chat
 
PHP Code:

/* Plugin generated by Emilioneri */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Advertisement"
#define VERSION "1.0"
#define AUTHOR "Emilioneri"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
// Add your code here...
    
register_logevent("Event_Round_Start"2"1=Round_Start")
}

public 
Event_Round_Start()
{
    
client_print(0print_chat"^x04^"[WwW.CaMe.Tk]^"^x01")
    
client_print(0print_chat"Want to be an admin ?? contact me. my skype:  ^x04^"bla bla bla^"^x01 Protect server rules!")
    return 
PLUGIN_CONTINUE


It should print site and skype green coloures. But it doesn't. Why :?:

fysiks 04-03-2009 08:15

Re: problem with color chat
 
Because color chat does not work in client_print. You have to use the ColorChat function (which is in the ColorChat.inc)

Emilioneri 04-03-2009 08:28

Re: problem with color chat
 
ColorChat.inc :?: :?: :?: :?:

fysiks 04-03-2009 08:42

Re: problem with color chat
 
http://forums.alliedmods.net/showthread.php?t=45753

That's not the include but it has everything that the include does and you will be able to compile online if you just put all the required functions in your script :).

alan_el_more 04-03-2009 09:36

Re: problem with color chat
 
1 Attachment(s)
add in the folder scripting/include

and use this:
PHP Code:

Colorchat(0GREEN"^x04^"[WwW.CaMe.Tk]^"^x01"
    
Colorchat(0GREEN"Want to be an admin ?? contact me. my skype:  ^x04^"bla bla bla^"^x01 Protect server rules!"


Emilioneri 04-03-2009 14:01

Re: problem with color chat
 
Quote:

Originally Posted by alan_el_more (Post 796197)
add in the folder scripting/include

and use this:
PHP Code:

Colorchat(0GREEN"^x04^"[WwW.CaMe.Tk]^"^x01"
    
Colorchat(0GREEN"Want to be an admin ?? contact me. my skype:  ^x04^"bla bla bla^"^x01 Protect server rules!"


Thx :)

xPaw 04-03-2009 14:08

Re: problem with color chat
 
this will be more right.

PHP Code:

ColorChat0GREEN"^x04[WwW.CaMe.Tk]" );
ColorChat0GREEN"^x01Want to be an admin? Contact me. My Skype:^x04 blabla^x01 Protect server rules!" ); 


fysiks 04-03-2009 19:38

Re: problem with color chat
 
I have the include too but I would say just put the functions directly in your code because ColorChat.inc is not standard to amxmodx. This will make it more transferable and should be able to compile online :). If you only need it for your personal use the include will work fine.


All times are GMT -4. The time now is 02:15.

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