Raised This Month: $12 Target: $400
 3% 

Help with plugin please


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
extreem
Member
Join Date: Apr 2011
Location: Czech Republick
Old 04-14-2011 , 14:35   Help with plugin please
Reply With Quote #1

Please help with colorchat
Plugin:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <colorchat>

#define PLUGIN "sayomg"
#define VERSION "1.0"
#define AUTHOR "Extreem"

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /rs""reset_score")
    
register_clcmd("say /resetscore""reset_score")
    
register_dictionary("resetscore.txt")
}

public 
reset_score(id)
{
    
cs_set_user_deaths(id10)
    
set_user_frags(id10)
    
cs_set_user_deaths(id10)
    
set_user_frags(id10)
    new 
name[33]
    
get_user_name(idname32)
    
ColorChat(0NORMAL"%L",LANG_SERVER"RESET_SCORE"name)
}
public 
client_putinserver(id)
{
        
set_task(10.0"connectzprava"id__"a"1)
}
public 
connectzprava(id)
{
    new 
name[32]
    
get_user_name(idname31)
    if(
is_user_connected(id))
    {
    
ColorChat(idNORMAL,"%L",LANG_SERVER"RESET_SCORE_MESSAGE"name)
    }

resetscore.txt
Code:
[en]
RESET_SCORE = Player ^4 %s reset score
RESET_SCORE_MESSAGE = Vazeny ^4 %s, reconnect neni nutnej, vpis /rs

[ru]
RESET_SCORE = Player %s обнулил щет
RESET_SCORE_MESSAGE = Vazeny %s, reconnect neni nutnej, vpis /rs

[cz]
RESET_SCORE = Player %s resetoval score
RESET_SCORE_MESSAGE = Vazeny %s, reconnect neni nutnej, vpis /rs

[sk]
RESET_SCORE = Player %s resetoval score
RESET_SCORE_MESSAGE = Vazeny %s, reconnect neni nutnej, vpis /rs
I dont have green color
LooK FoTo:
Attached Thumbnails
Click image for larger version

Name:	de_dust20003.jpg
Views:	87
Size:	29.3 KB
ID:	84732  
__________________
extreem is offline
Send a message via Skype™ to extreem
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 04-14-2011 , 15:53   Re: Help with plugin please
Reply With Quote #2

In your language file, you only have the '^4' for the English language. Add it to the other languages to see the text in green.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
extreem
Member
Join Date: Apr 2011
Location: Czech Republick
Old 04-14-2011 , 16:14   Re: Help with plugin please
Reply With Quote #3

Dont help:
Code:
[en]
RESET_SCORE = Player ^4 %s reset score
RESET_SCORE_MESSAGE = Vazeny ^4 %s, reconnect neni nutnej, vpis /rs

[ru]
RESET_SCORE = Player ^4 %s reset score
RESET_SCORE_MESSAGE = Vazeny ^4 %s, reconnect neni nutnej, vpis /rs

[cz]
RESET_SCORE = Player ^4 %s reset score
RESET_SCORE_MESSAGE = Vazeny ^4 %s, reconnect neni nutnej, vpis /rs

[sk]
RESET_SCORE = Player ^4 %s reset score
RESET_SCORE_MESSAGE = Vazeny ^4 %s, reconnect neni nutnej, vpis /rs
FoTo:
Attached Thumbnails
Click image for larger version

Name:	de_dust20004.jpg
Views:	105
Size:	22.2 KB
ID:	84736  
__________________
extreem is offline
Send a message via Skype™ to extreem
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-14-2011 , 19:36   Re: Help with plugin please
Reply With Quote #4

IIRC, you can't use the ^4 in ML files. You have to use a different identifier that replaces with the ^4 in the plugin. There is a color chat that does this and uses !g for green etc.

This: http://forums.alliedmods.net/showthread.php?t=94960
Or this: http://forums.alliedmods.net/showpos...2&postcount=90
__________________
fysiks is offline
Reply


Thread Tools
Display Modes

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 04:49.


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