Raised This Month: $ Target: $400
 0% 

CS Color Chat Function Updated:[01/26/2007]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 05-01-2007 , 17:26   Re: CS Color Chat Function Updated:[01/26/2007]
Reply With Quote #1

Quote:
Originally Posted by BoOnSpoOn View Post
Hello, got a question. Tried to use Colorchat in another PLugin, but if I only add the .amxx file into the plugins folder and replace

by

It's uncompileable oO So, do I have to copy the ColorChat.sma into the ProKreedz.sma (That's the plugin I want to use it in) or is there any code to tell ProKreedz to check Colorchat.sma like
#include ColorChat.amxx
Sorry for my bad english
Quote:
Originally Posted by Rolnaaba View Post
#include "ColorChat.sma"
You can do what Rolnaaba said but there are some test functions in there that everyone can use. Make sure you remove those test functions. Make sure ColorChat.sma is in the same folder as your ProKreedz.sma

You really need to look at the example in the ColorChat.sma. This function only print into the chat area. Since this is dealing with colors it handled alittle different then the normal client_print.
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
mateo10
Veteran Member
Join Date: Jan 2006
Old 05-01-2007 , 12:24   Re: CS Color Chat Function Updated:[01/26/2007]
Reply With Quote #2

And
Code:
client_print(id,print_chat,First checkpoint created)
is totally wrong. The correct use is:
Code:
client_print(id,print_chat,"First checkpoint created")

If you compile the thing you said, the compiler will thing it's a variable instead of a string. You have to use the quotation marks around it ("").
mateo10 is offline
mateo10
Veteran Member
Join Date: Jan 2006
Old 07-06-2007 , 05:58   Re: CS Color Chat Function Updated:[01/26/2007]
Reply With Quote #3

This gives me runtime errors:
Code:
public print_green(id, const msg[], {Float,Sql,Result,_}:...) {     static message[256];     message[0] = 0x04;     vformat(message[1], 251, msg, 4);     message[192] = '^0';     new index, MSG_Type;     if(!id)     {         index = FindPlayer();         MSG_Type = MSG_ALL;     }     else     {         MSG_Type = MSG_ONE;         index = id;     }     emessage_begin(MSG_Type, get_user_msgid("SayText"), _, index);     ewrite_byte(index);     ewrite_string(message);     emessage_end(); }

Last edited by mateo10; 07-06-2007 at 06:16.
mateo10 is offline
Fredd
Veteran Member
Join Date: Jul 2007
Old 08-08-2007 , 18:07   Re: CS Color Chat Function Updated:[01/26/2007]
Reply With Quote #4

hey teame06, is it possible to add a new parm with chat types? like print_chat, print_center...etc ?
edit: im getting bunch of message_ and write_bye errors i added "e" in front of every line so it likes use's the emessage way and now runs fine with no debug errors
__________________
Need a private coder? AMXX, SourceMOD, MMS? PM me!

Last edited by Fredd; 08-09-2007 at 19:21.
Fredd is offline
Mazke
Junior Member
Join Date: Oct 2007
Old 01-03-2008 , 11:15   Re: CS Color Chat Function Updated:[01/26/2007]
Reply With Quote #5

can this be used in print_chat ?
__________________
84.48.59.235:27015 Maske hideNseek
Mazke is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 01-03-2008 , 14:13   Re: CS Color Chat Function Updated:[01/26/2007]
Reply With Quote #6

What ?! When you use this, the message is printed in CHAT.
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
travo
Senior Member
Join Date: Aug 2006
Old 01-09-2008 , 00:04   Re: CS Color Chat Function Updated:[01/26/2007]
Reply With Quote #7

I use this
PHP Code:
stock client_printc(const id,const input[], any:...)
{
    new 
msg[191], players[32], count 1;
    
vformat(msg,190,input,3);
    
replace_all(msg,190,"\g","^4");// green clr
    
replace_all(msg,190,"\o","^1");// orange clr
    
replace_all(msg,190,"\t","^3");// team clr
    
if (idplayers[0] = id; else get_players(players,count,"ch");
    for (new 
i=0;i<count;i++)
        if (
is_user_connected(players[i]))
        {
            
message_begin(MSG_ONE_UNRELIABLE,get_user_msgid("SayText"),_,players[i]);
            
write_byte(players[i]);
            
write_string(msg);
            
message_end();
        }

Usage
PHP Code:
client_printc(0,"\g message to\o everyone")
client_printc(id,"\gmessage to \t%s",name
message to everyone
message to name

Last edited by travo; 01-11-2008 at 00:28.
travo is offline
Frozen^
Junior Member
Join Date: Nov 2007
Old 02-11-2008 , 18:42   Re: CS Color Chat Function Updated:[01/26/2007]
Reply With Quote #8

I need little help on this one, how you put that code to only player with green, i cant get it. Well i would like to get it on Chance to get weapons, this for green:
Quote:
if(random_num(0, 100) <= 5)
{
give_item(player,"weapon_fiveseven");
new weapon_id = find_ent_by_owner(-1, "weapon_fiveseven", player);
cs_set_weapon_ammo(weapon_id, 2);
client_print(player, print_chat, "You were lucky, you got a five seven with 2 bullets (5%% chance)")
}
If you can past something codes ty alot!
Frozen^ is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-11-2008 , 19:09   Re: CS Color Chat Function Updated:[01/26/2007]
Reply With Quote #9

Code:
ColorChat(player, GREEN, "You were lucky, you got a five seven with 2 bullets (5%% chance)");
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
413-X-
Member
Join Date: Feb 2008
Old 02-16-2008 , 12:57   Re: CS Color Chat Function Updated:[01/26/2007]
Reply With Quote #10

nice really helped me
413-X- 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 06:40.


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