AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help with plugin please (https://forums.alliedmods.net/showthread.php?t=154883)

extreem 04-14-2011 14:35

Help with plugin please
 
1 Attachment(s)
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:

Xanimos 04-14-2011 15:53

Re: Help with plugin please
 
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.

extreem 04-14-2011 16:14

Re: Help with plugin please
 
1 Attachment(s)
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:

fysiks 04-14-2011 19:36

Re: Help with plugin please
 
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


All times are GMT -4. The time now is 08:11.

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