Raised This Month: $ Target: $400
 0% 

Color change in every 3 sec


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
vl@d
Senior Member
Join Date: Dec 2006
Location: Romania
Old 06-16-2007 , 04:05   Color change in every 3 sec
Reply With Quote #1

Can anyone give me some explication about how to change the color of the text every 3-5 sec.
I mean con_color for the client.
Can anyone tell me.
I tried to make a plugin but i faild.
__________________


I hate Spammers....
vl@d is offline
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 06-16-2007 , 04:18   Re: Color change in every 3 sec
Reply With Quote #2

set_user_info(id, "con_color", "R G B")

greetz regalis
__________________
regalis is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 06-16-2007 , 04:20   Re: Color change in every 3 sec
Reply With Quote #3

And make a task!
Code:
set_task(.....
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
vl@d
Senior Member
Join Date: Dec 2006
Location: Romania
Old 06-16-2007 , 04:59   Re: Color change in every 3 sec
Reply With Quote #4

damn not working. (
the color is not changing.
Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plugin"
#define VERSION "1.0"
#define AUTHOR "Author"



public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_cvar("color_change", "1");
    register_concmd("color","color_change",ADMIN_ALL,"color change")
}

public color_change(id){
    
    set_task(0.0,"color1")
    set_task(3.0,"color2")

    return PLUGIN_HANDLED
}

public color1(id) {
    set_user_info(id,"con_color","255 24 30")
}

public color2(id){
    set_user_info(id,"con_color","240 240 240")
}
__________________


I hate Spammers....
vl@d is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 06-16-2007 , 05:15   Re: Color change in every 3 sec
Reply With Quote #5

=>>
Code:
#include <amxmodx>
#include <amxmisc>
 
#define PLUGIN "New Plugin"
#define VERSION "1.0"
#define AUTHOR "Author"

public plugin_init() {
 
 register_plugin(PLUGIN, VERSION, AUTHOR)
 register_concmd("amx_color","change_color")
}
 
public change_color()
{
 set_task(3.0,"set_color",_,_,_,"b")
}
 
public set_color()
{
 new players[32], num
 get_players(players, num)
 
 new player
 for(new i = 0; i < num; i++)
 {
  player = players[i]
  
  client_cmd(player,"con_color %d %d %d",random(256),random(256),random(256))
 }
}
Type amx_color and color of chat for all players will change in random colors! Interval sec.
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
vl@d
Senior Member
Join Date: Dec 2006
Location: Romania
Old 06-16-2007 , 05:22   Re: Color change in every 3 sec
Reply With Quote #6

it works.
thx very much.

Edit: it works ir changes the color but i saw only 3 colors in total.
__________________


I hate Spammers....

Last edited by vl@d; 06-16-2007 at 05:57.
vl@d 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 10:41.


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