AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   color post (https://forums.alliedmods.net/showthread.php?t=207613)

Sutar 02-04-2013 16:42

color post
 
Here's the script:
Code:

#include <amxmodx>

public plugin_init()
{
        register_plugin("Color Chat", "1.5", "Sutar")
        set_task(2.0, "sayspl", 0, "", 0, "b")
}

public sayspl()
{
        message_begin(MSG_ALL, get_user_msgid("TeamInfo"))
        write_byte(0)
        write_string("TERRORIST")
        message_end()
       
        message_begin(MSG_ALL, get_user_msgid("SayText"))
        write_byte(0)
        write_string("^x03Red color")
        message_end()
}

How to make colored message, without the player id?

Cheezpuff 02-04-2013 18:43

Re: color post
 
Quote:

Originally Posted by Sutar (Post 1887100)
Here's the script:
Code:

#include <amxmodx>

public plugin_init()
{
    register_plugin("Color Chat", "1.5", "Sutar")
    set_task(2.0, "sayspl", 0, "", 0, "b")
}

public sayspl()
{
    message_begin(MSG_ALL, get_user_msgid("TeamInfo"))
    write_byte(0)
    write_string("TERRORIST")
    message_end()
   
    message_begin(MSG_ALL, get_user_msgid("SayText"))
    write_byte(0)
    write_string("^x03Red color")
    message_end()
}

How to make colored message, without the player id?

why you used
PHP Code:

^x03Red color 

and not a normal colorchat?

for Colored Message -.-?

fysiks 02-04-2013 21:08

Re: color post
 
Quote:

Originally Posted by Sutar (Post 1887100)
How to make colored message, without the player id?

What?

Sutar 02-05-2013 09:00

Re: color post
 
Quote:

Originally Posted by Cheezpuff (Post 1887167)
why you used
PHP Code:

^x03Red color 

and not a normal colorchat?
for Colored Message -.-?

In the codes, many checks. I do not need.

Quote:

Originally Posted by fysiks (Post 1887258)
What?

In the chat to be red message Red color for all players.
But in write_byte() You must specify the id player.
if id = 0, then no colored posts. How can you make sure that it is colored, no player id?

hypheni 02-05-2013 09:58

Re: color post
 
You can not use write_byte() command like client_print(). You have to use write_byte with id of player. In case of all players you should loop though all of them. That's the way.


All times are GMT -4. The time now is 20:36.

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