Raised This Month: $ Target: $400
 0% 

Colored TXT


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 03-13-2009 , 11:00   Colored TXT
Reply With Quote #1

Hi,

i know there are already more topics about this but there i cant understand anything...

so i want to print ma txt colored.

PHP Code:
#include <amxmodx>

#define PLUGIN "Commands Helper"
#define VERSION "1.0"
#define AUTHOR "One"
new ad_time

public plugin_init()
{
    
register_clcmd("say cm""CommandHelper")
    
register_clcmd("say /cm""CommandHelper")
    
ad_time register_cvar("ads_time","60");
    
set_task(float(get_pcvar_num(ad_time)), "ads");
}

public 
CommandHelper(id)
{
    
show_motd(id,"commands.txt""Commands Helper")
}  
public 
ads()
{
    
client_print(0print_chat"Say /cm to see the validable Commands to you!")    
    
set_task(float(get_pcvar_num(ad_time)), "ads")

how can i give this random colors? exam :

first time : green
secund time : blue
& ....
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
minimiller
Veteran Member
Join Date: Aug 2007
Location: United Kingdom
Old 03-13-2009 , 11:05   Re: Colored TXT
Reply With Quote #2

PHP Code:
#include <amxmodx>
#include <colorchat>

#define PLUGIN "Commands Helper"
#define VERSION "1.0"
#define AUTHOR "One"
new ad_time

public plugin_init()
{
    
register_clcmd("say cm""CommandHelper")
    
register_clcmd("say /cm""CommandHelper")
    
ad_time register_cvar("ads_time","60");
    
set_task(float(get_pcvar_num(ad_time)), "ads");
}

public 
CommandHelper(id)
{
    
show_motd(id,"commands.txt""Commands Helper")
}  

public 
ads()
{
    switch(
random_num(1,4))
    {
        case 
1//Red
        
{
            
ColorChat(0RED"Say /cm to see the validable Commands to you!");
            
set_task(float(get_pcvar_num(ad_time)), "ads");
        }
        case 
2//Green
        
{
            
ColorChat(0GREEN"Say /cm to see the validable Commands to you!");
            
set_task(float(get_pcvar_num(ad_time)), "ads");
        }
        case 
3//Blue
        
{
            
ColorChat(0BLUE"Say /cm to see the validable Commands to you!");
            
set_task(float(get_pcvar_num(ad_time)), "ads");
        }
        case 
4//Grey
        
{
            
ColorChat(0GREY"Say /cm to see the validable Commands to you!");
            
set_task(float(get_pcvar_num(ad_time)), "ads");
        }
    }

__________________
minimiller is offline
Send a message via MSN to minimiller
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 03-13-2009 , 11:08   Re: Colored TXT
Reply With Quote #3

Ty, but :

#include <colorchat>

Code:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Error: Cannot read from file: "colorchat" on line 2

Compilation aborted.
1 Error.
Could not locate output file C:\Dokumente und Einstellungen\One\Desktop\aaaaa\command_helper.amx (compile failed).

where can i dl colorchat.inc?
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
minimiller
Veteran Member
Join Date: Aug 2007
Location: United Kingdom
Old 03-13-2009 , 11:11   Re: Colored TXT
Reply With Quote #4

have fun =]
Attached Files
File Type: inc colorchat.inc (2.5 KB, 304 views)
__________________
minimiller is offline
Send a message via MSN to minimiller
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 03-13-2009 , 11:12   Re: Colored TXT
Reply With Quote #5

Quote:
Originally Posted by minimiller View Post
have fun =]
TY.
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 03-13-2009 , 11:48   Re: Colored TXT
Reply With Quote #6

ok new problem :

when i say /cm this will open a motd but there is only :

PHP Code:
commands.txt 
i added ma commands.txt in config folder but this will not work

PHP Code:
<meta http-equiv="Content-Language" content="de">
<
style fprolloverstyle>A:hover {colorredfont-weightbold}
</
style>
<
body background="http://cs-rockers.de/background-1.jpg" bgproperties="fixed">

<
p align="center">
<
img border="0" src="http://cs-rockers.de/forum/styles/vphpbb3/imageset/site_logo.png" width="995" height="119"></p>
<
p align="left"><b>/TS2 oder TS2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
damit werdet ihr in TS²Server umgeleitet.</b></p>
<
p align="left"><b>/cam oder /camera&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
damit könnt ihr eure sicht wechseln</b></p>
<
p align="left"><b>blackjack&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
damit könnt ihr Blackjack spielen</b></p>
<
p align="left"><b>/poker oder poker&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
damit könnt ihr Poker spielen</b></p>
<
p align="left"><b>/hats&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
damit könnt ihr euch so genannte Hüte aussuchen</b></p>
<
p align="left"><b>/quesion&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
damit könnt ihr Quiz starten und auf Fragen antworten und für jede Antwort 
2000 
gewinnen</b></p>
<
p align="left"><b>tetris&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
damit könnt ihr das alte gute Spiel &quot;TETRIS&quotspielen.</b></p
here ma command.txt
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
iNspiratioN
Member
Join Date: Feb 2009
Location: Lithuania
Old 03-13-2009 , 11:50   Re: Colored TXT
Reply With Quote #7

you need to add it in CSTRIKE folder.
iNspiratioN is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 03-13-2009 , 11:54   Re: Colored TXT
Reply With Quote #8

Quote:
Originally Posted by iNspiratioN View Post
you need to add it in CSTRIKE folder.
hihi i 4get it :-D ty
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
iNspiratioN
Member
Join Date: Feb 2009
Location: Lithuania
Old 03-13-2009 , 11:58   Re: Colored TXT
Reply With Quote #9

no prob
__________________
iNspiratioN is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 03-13-2009 , 12:16   Re: Colored TXT
Reply With Quote #10

ok i changed my idea & maked this to :

PHP Code:
#include <amxmodx>
#include <colorchat>

#define PLUGIN "Commands Helper"
#define VERSION "1.0"
#define AUTHOR "One"
new ad_time

public plugin_init()
{
    
ad_time register_cvar("ads_time","120");
    
set_task(float(get_pcvar_num(ad_time)), "ads");
}
public 
ads()
{
    switch(
random_num(1,24))
    {
        case 
1//Red
        
{
            
ColorChat(0RED"Schreib ts2 um in unser TS-Server umgeleitet zu werden.");
            
set_task(float(get_pcvar_num(ad_time)), "ads");
        }
        case 
2//Green
        
{
            
ColorChat(0GREEN"Schreib ts2 um in unser TS-Server umgeleitet zu werden.");
            
set_task(float(get_pcvar_num(ad_time)), "ads");
        }
        case 
3//Blue
        
{
            
ColorChat(0BLUE"Schreib ts2 um in unser TS-Server umgeleitet zu werden.");
            
set_task(float(get_pcvar_num(ad_time)), "ads");
        }
        case 
4//Grey
        
{
            
ColorChat(0GREY"Schreib ts2 um in unser TS-Server umgeleitet zu werden.");
            
set_task(float(get_pcvar_num(ad_time)), "ads");
        }
    case 
5//Red
        
{
            
ColorChat(0RED"Schreibe /cam um deine sicht zu wechseln.");
            
set_task(float(get_pcvar_num(ad_time)), "ads");
        }
        case 
6//Green
        
{
            
ColorChat(0GREEN"Schreibe /cam um deine sicht zu wechseln.");
            
set_task(float(get_pcvar_num(ad_time)), "ads");
        }
        case 
7//Blue
        
{
            
ColorChat(0BLUE"Schreibe /cam um deine sicht zu wechseln.");
            
set_task(float(get_pcvar_num(ad_time)), "ads");
        }
        case 
8//Grey
        
{
            
ColorChat(0GREY"Schreibe /cam um deine sicht zu wechseln.");
            
set_task(float(get_pcvar_num(ad_time)), "ads");
        case 
9//Red
        
{
            
ColorChat(0RED"Schreibe blackjack um Blackjack zu spielen.");
            
set_task(float(get_pcvar_num(ad_time)), "ads");
        }
        case 
10//Green
        
{
            
ColorChat(0GREEN"Schreibe blackjack um Blackjack zu spielen.");
            
set_task(float(get_pcvar_num(ad_time)), "ads");
        }
        case 
11//Blue
        
{
            
ColorChat(0BLUE"Schreibe blackjack um Blackjack zu spielen.");
            
set_task(float(get_pcvar_num(ad_time)), "ads");
        }
        case 
12//Grey
        
{
            
ColorChat(0GREY"Schreibe blackjack um Blackjack zu spielen.");
            
set_task(float(get_pcvar_num(ad_time)), "ads");
    case 
13//Red
        
{
            
ColorChat(0RED"Schreibe poker um Poker zu spielen.");
            
set_task(float(get_pcvar_num(ad_time)), "ads");
        }
        case 
14//Green
        
{
            
ColorChat(0GREEN"Schreibe poker um Poker zu spielen.");
            
set_task(float(get_pcvar_num(ad_time)), "ads");
        }
        case 
15//Blue
        
{
            
ColorChat(0BLUE"Schreibe poker um Poker zu spielen.");
            
set_task(float(get_pcvar_num(ad_time)), "ads");
        }
        case 
16//Grey
        
{
            
ColorChat(0GREY"Schreibe poker um Poker zu spielen.");
            
set_task(float(get_pcvar_num(ad_time)), "ads");
        
    case 
17//Red
        
{
            
ColorChat(0RED"Schreibe /hats um dich zu verkleiden.");
            
set_task(float(get_pcvar_num(ad_time)), "ads");
        }
        case 
18//Green
        
{
            
ColorChat(0GREEN"Schreibe /hats um dich zu verkleiden.");
            
set_task(float(get_pcvar_num(ad_time)), "ads");
        }
        case 
19//Blue
        
{
            
ColorChat(0BLUE"Schreibe /hats um dich zu verkleiden.");
            
set_task(float(get_pcvar_num(ad_time)), "ads");
        }
        case 
20//Grey
        
{
            
ColorChat(0GREY"Schreibe /hats um dich zu verkleiden.");
            
set_task(float(get_pcvar_num(ad_time)), "ads");
    case 
21//Red
        
{
            
ColorChat(0RED"Schreibe /quiz um an unserem quiz teilzunehmen.");
            
set_task(float(get_pcvar_num(ad_time)), "ads");
        }
        case 
22//Green
        
{
            
ColorChat(0GREEN"Schreibe /quiz um an unserem quiz teilzunehmen.");
            
set_task(float(get_pcvar_num(ad_time)), "ads");
        }
        case 
23//Blue
        
{
            
ColorChat(0BLUE"Schreibe /quiz um an unserem quiz teilzunehmen.");
            
set_task(float(get_pcvar_num(ad_time)), "ads");
        }
        case 
24//Grey
        
{
            
ColorChat(0GREY"Schreibe /quiz um an unserem quiz teilzunehmen.");
            
set_task(float(get_pcvar_num(ad_time)), "ads");
    case 
21//Red
        
{
            
ColorChat(0RED"Schreibe tetris um Tetris zu spielen.");
            
set_task(float(get_pcvar_num(ad_time)), "ads");
        }
        case 
22//Green
        
{
            
ColorChat(0GREEN"Schreibe tetris um Tetris zu spielen.");
            
set_task(float(get_pcvar_num(ad_time)), "ads");
        }
        case 
23//Blue
        
{
            
ColorChat(0BLUE"Schreibe tetris um Tetris zu spielen.");
            
set_task(float(get_pcvar_num(ad_time)), "ads");
        }
        case 
24//Grey
        
{
            
ColorChat(0GREY"Schreibe tetris um Tetris zu spielen..");
            
set_task(float(get_pcvar_num(ad_time)), "ads");
    }

but error on line 57 :

PHP Code:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c1997-2006 ITB CompuPhaseAMX Mod X Team

Warning
Loose indentation on line 57
Error
Invalid statementnot in switch on line 57
Warning
Expression has no effect on line 57
Error
Expected token";"but found ":" on line 57
Error
Invalid expressionassumed zero on line 57
Error
Too many error messages on one line on line 57

Compilation aborted
.
4 Errors.
Could not locate output file C:\Dokumente und Einstellungen\One\Desktop\aaaaa\command_helper.amx (compile failed). 
line 57 : case 9: //Red
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
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 09:01.


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