Discord sunucumuz açılmıştır, hepinizi bekleriz

https://discord.gg/43gGDQe6tS

İstek - Slot,Admin,Kurucu Vs Say Renk Degisimi..

Eklenti sorunlarınız ve özel eklenti istekleriniz

Moderatör: Moderatörler

Kullanıcı avatarı

Konu Sahibi
BawikaL
Yasaklı Üye
Yasaklı Üye
Mesajlar: 178
Kayıt: Cum Şub 24, 2017 6:58 pm
Server Ip/DNS: CS42.CSDuragi.COM
Clan İsmi: ExiLe Gaming

İstek - Slot,Admin,Kurucu Vs Say Renk Degisimi..

Mesaj gönderen BawikaL »

Merhabalar Degerli Forum sakinleri..
Öncelikle Kandilinizi Kutlar İyi forumlar dilerimm.

arastırmalarıma ragmen bulamadım..
bi eklenti rica ediyordum forum sakinlerinin bazıları bileceginden eminim.
Yetkili kişiler saydan Kırmızı yazı mavı yazıı vs gibi saydan yazdıkları rengi degistirmesi icin bir eklenti mevcuttu sanırsam..
Normal default olarak say yazıları Sarı yeşil vs gibi..
İstedigim Eklentı olarak şey şu..
Slot,admın kurucu vs Yani 'B' Yetkisi bile olan kişiler saydan Konusurken vs say yazısını Beyaz renkte olmasını istiyorum.
Elinde olan vs varsa Sma olarak atarlarsa Cok memnun olurum..
gerek bana gerek forumda ihtiyacı olan diger kardeslemıze yararı olacagından emınım ..
Simdiden tesekurler..

@CSmiLeFaCe
@redarmygaming
@Tasarimci v2
@TunnS[C]
@Fatih ~ EjderYa
vs

Link:
Linklerini gizle
Linki Kopyala
Kullanıcı avatarı

NuriReisHDYoutuber
Yasaklı Üye
Yasaklı Üye
Mesajlar: 1133
Kayıt: Prş Mar 02, 2017 8:56 pm

İstek - Slot,Admin,Kurucu Vs Say Renk Degisimi..

Mesaj gönderen NuriReisHDYoutuber »

şu kodu https://panel.csduragi.com/urun/editor/ ... /ichat.cfg Kopyalayıp Yapıştırırmısınız ?

Kod: Tümünü seç

/////////////////////////////////////////////////////////
//					  iChat by Kid				       //
//													   //
// Put iChat.amxx on the last line of your plugins.ini //
// Except if you want to use AllChat, more info below. //
//		 Don't use any other chat related plugins!	   //
//				Or conflicts might appear!			   //
//					Version: 2.3.3					   //
/////////////////////////////////////////////////////////


////////////////////
// Format configs //
////////////////////

// You can use colors:
// Colors: <default>, <green>, <team>, <blue>, <red> and <grey>.
// WARNING: You can use only ONE 'Team specific' color on one format line!
// 'Team specific' colors are <team>, <blue>, <red> and <grey>.
// If you use more than one, the color will be the one of the first color used!
// For exemple, FORMAT_DEF_ALIVE "<green>Kid <grey>is <default> happy<grey>!" will work,
// But not FORMAT_DEF_ALIVE "<blue>Kid <red>is <grey> sad<grey>..."! Here, the color for all 'Team specific' colors will be blue (the first, as said before).
// So FORMAT_DEF_ALIVE "<blue>Kid <red>is <grey> sad..." is the same as FORMAT_DEF_ALIVE "<blue>Kid <blue>is <blue> sad...".
// If no colors specified, it will be <default> color.
// You can also change the default color to whatever YOU WANT (pink, violet, black, white...)!
// It will just ask to players if they want, and if they won't, you can choose their punishment (kick or not).
// See below, on 'Config' part to configure that.

// Tags are the most cool feature on my plugin! You can put some data on your messages!
// Tags: 	%NAME% 		-> Replaced by User name
//			%MESSAGE% 	-> Replaced by User message
//			%STEAMID% 	-> Replaced by User Steam ID
//			%LIFE% 		-> Replaced by User life
//			%TEAM%		-> Replaced by User Team (see iChat.txt. You can modify Team Names)
//			%POS%		-> Replaced by User Location, like 'Bombsite B'... (WORK ONLY ON CONDITION ZERO)
//			%TEAMTAG%	-> Replaced by User Team Tag (see 'Config' part, avaible for CT, T and SPEC, alive and dead)
//			#CUSTOMx#	-> Replaced by User custom data number x. You have to enable CHAT_USE_CUSTOM_TAGS below. This is for developers. As you can see, '%' have been replaced by '#', this isn't an error.

// And don't worry, a player who write '%POS%', or '%NAME%' on the chat will not be replaced by the data.
// Same for names. If a player says "%NAME%" this will not be replaced by his name, for exemple.
//
// For exemple, if i want my chat looks like Minecraft's (really cool with CHAT_DEFAULT_COLOR "255255255" (white), or with <grey> tag):
// FORMAT_DEF_ALIVE "<%NAME%> %MESSAGE%" or FORMAT_DEF_ALIVE "<grey><%NAME%> %MESSAGE%"
//
// Counter Strike Condition Zero's default is (%POS% can only be used on Condition Zero):
// FORMAT_DEF_ALIVE "<team>%NAME%<default> :  %MESSAGE%"
// FORMAT_DEF_DEAD "<default>*DEAD* <team>%NAME%<default> :  %MESSAGE%"
// FORMAT_TEAM_DEF_ALIVE "<default>%TEAM% <team>%NAME%<default> @<green> %POS% <default>:  %MESSAGE%"
// FORMAT_TEAM_DEF_DEAD "<default>*DEAD* %TEAM% <team>%NAME%<default> :  %MESSAGE%"
//
// You can also use specific formats for Admins, like:
// FORMAT_ADMIN_ALIVE "<white>[-] <team>%NAME%<default> :  <white>%MESSAGE%"
// There is also a VIP support! Use:
// FORMAT_VIP_ALIVE "<white>[-] <team>%NAME%<default> :  <white>%MESSAGE%"
// Flags are explained below.

// Default users (no flags) -> Default CS Chat (not CZ)
// General Chat - Alive
FORMAT_DEF_ALIVE "<team>%NAME%<default> :  %MESSAGE%"
// General Chat - Dead
FORMAT_DEF_DEAD "<default>*DEAD* <team>%NAME%<default> :  %MESSAGE%"
// Team Chat - Alive
FORMAT_TEAM_DEF_ALIVE "<default>%TEAM% <team>%NAME%<default> :  %MESSAGE%"
// Team Chat - Dead
FORMAT_TEAM_DEF_DEAD "<default>*DEAD* %TEAM% <team>%NAME%<default> :  %MESSAGE%"

// Admins (flag CHAT_FLAG_ADMIN, configurable below) -> Default CS Chat (not CZ) with [-] tag and message in green.
// General Chat - Alive
FORMAT_ADMIN_ALIVE "<white>[-] <team>%NAME%<default> :  <white>%MESSAGE%"
// General Chat - Dead
FORMAT_ADMIN_DEAD "<white>[-] <default>*DEAD* <team>%NAME%<default> :  <white>%MESSAGE%"
// Team Chat - Alive
FORMAT_TEAM_ADMIN_ALIVE "<white>[-] <default>%TEAM% <team>%NAME%<default> :  <white>%MESSAGE%"
// Team Chat - Dead
FORMAT_TEAM_ADMIN_DEAD "<white>[-] <default>*DEAD* %TEAM% <team>%NAME%<default> :  <white>%MESSAGE%"

// VIP's (flag CHAT_FLAG_VIP, configurable below) -> Default CS Chat (not CZ) with [-] tag.
// General Chat - Alive
FORMAT_VIP_ALIVE "<white>[-] <team>%NAME%<default> :  %MESSAGE%"
// General Chat - Dead
FORMAT_VIP_DEAD "<white>[-] <default>*DEAD* <team>%NAME%<default> :  %MESSAGE%"
// Team Chat - Alive
FORMAT_TEAM_VIP_ALIVE "<white>[-] <default>%TEAM% <team>%NAME%<default> :  %MESSAGE%"
// Team Chat - Dead
FORMAT_TEAM_VIP_DEAD "<white>[-] <default>*DEAD* %TEAM% <team>%NAME%<default> :  %MESSAGE%"

// Printed when a client put "!me" behind his message (configurable below).
// So this line ( FORMAT_ME "* %NAME% %MESSAGE%" ) replace:
// "say !me is cool" by "* Kid is cool" if ME_COMMAND is "!me" (default)
// You can use colors and tags, of course.
FORMAT_ME_MESSAGE "* %NAME% %MESSAGE%"

// To change the "!me" command.
// If you're not using statsx, you can replace this by /me for exemple!
FORMAT_ME_COMMAND "!me"

// Players can toogle on or off their chat with this command
CHAT_CLCMD_CLEAR "!chat"


/////////////////////
// General Configs //
/////////////////////

// Prints a little thing, with my name in! This can motivate me to keep working!
// But if you're not cool, set it to 0 to disable...
CHAT_NOTIFY 1

// Allows iChat to stop itself. Change this is you are using map specific plugins, or other plugins files than plugins.ini.
// In others cases than thoses listed above, check your logs before turning this to 0!
// Note: if set to 0, some plugins may not recieve their chat commands (/shop...)
CHAT_CAN_STOP_ITSELF 1

// Prints a messages to all Admins and logs a message if iChat is outdated.
// * SOON *
CHAT_CHECK_UPDATES 0

// Defines if wether or not the ADMIN rank overrides the VIP one.
// For exemple, if set to 1, and if you're VIP and ADMIN, you will be considered as an ADMIN in the chat.
// But if set to 0 and if you're VIP and ADMIN, you will be considered as a VIP in the chat.
CHAT_ADMIN_OVERRIDES 1

// Change here the acces flags. Avaible flags are: "abcdefghijklmnopqrstu" (like in users.ini)
// You can also use "ALL" for everyone.
// You can use multiple flags.
// Flag to reload the config file
CHAT_FLAG_RELOAD "l"
// Flag to see all messages (teams, radius...).
CHAT_FLAG_SPY "m"
// Flag to see chat
CHAT_FLAG_SEE_CHAT "ALL"
// Flag to use chat
CHAT_FLAG_CHAT "ALL"
// Flag to be Admin and be able to use "FORMAT_ADMIN_*" formats.
CHAT_FLAG_ADMIN "n"
// Flag to be VIP and be able to use "FORMAT_VIP_*" formats.
// There is an other way to set users VIP (for developers): you can use functions:
// iChatIsUserVip( index ), iChatSetUserVip( index ), iChatRemoveUserVip( index ). You have to include <ichat>.
CHAT_FLAG_VIP "o"

// It's sv_alltalk for iChat (Deads players can see others dead messages, and alive players can see other alive players messages).
// You can also use iChatManagement to manage this. More informations just below.
CHAT_ALL_TALK 0

// Team Tags
// Colors are allowed in Teams Tags!
// Should be cool on a BaseBuilder, with:
// CHAT_TEAM_TAG_1_A "<green>[ZOMBIE]<default>"
// CHAT_TEAM_TAG_2_A "<green>[BUILDER]<default>"
// And in default when dead
// Team Tag for Alive Terrosits
CHAT_TEAM_TAG_1_A "<green>[T]<default>"
// Team Tag for Dead Terrosits (Ahmed!)
CHAT_TEAM_TAG_1_D "<green>[<default>T<green>]<default>"

// Team Tag for Alive Counter-Terrorists
CHAT_TEAM_TAG_2_A "<green>[CT]<default>"
// Team Tag for Dead Counter-Terrorists
CHAT_TEAM_TAG_2_D "<green>[<default>CT<green>]<default>"

// Team Tag for Spectators
CHAT_TEAM_TAG_3 "<green>[SPEC]<default>"

// This is the '<default>' color. "-1" to use client's default color.
// Else, "RRRGGGBBB". For exemple, black for the <default> color:
// CHAT_DEFAULT_COLOR "000000000"
// Or white:
// CHAT_DEFAULT_COLOR "255255255"
CHAT_DEFAULT_COLOR "-1"

// Punishment if client won't set his color to default color.
// It's a menu. It's only displayed on first spawn.
// 0 - Let him play!
// 1 - Kick him as long as he deny.
CHAT_PUNISHMENT 0

// Admins with CHAT_FLAG_SPY flag (configurable above) can see all messages (teams, radius...).
CHAT_ADMIN_SPY 1

// Remove all chat message wich begins with '/', '!' and '@' (like /top15, /rank...).
CHAT_CLCMD_REMOVE 1

// Remove notice when a player change his name. 0 to disable.
CHAT_REMOVE_CHANGE_NAME 0

// This prints the message only to players on the sender's radius. 0.0 for dislable.
// General Chat
CHAT_RADIUS_ALL 0.0
// Team Chat
CHAT_RADIUS_TEAM 0.0

// Force chat to be a simple print. Use this if your game doesn't support colors,
// Or if you simply doesn't want colors in your chat. Change only if you know what you're doing.
CHAT_NO_COLORS 0

// Allows you to use custom formats for the Steam IDs stored in 'ichat_custom_formats.ini'
// You need Steam. This plugin doesn't support and won't ever support custom format by name or IP.
CHAT_USE_CUSTOM_FORMATS 0

// Enable custom data. This is for developers, but it's easy to use.
// This allows you to send custom data from your plugins to iChat, to put it in your chat.
// This is how to send data:
// First, include <ichat>. Then, you can use native iChatSendCustomData( iIndex, iTagNum, szData[ ] );
// iIndex is the player's index.
// iTagNum is the index of the custom tag, the 'x' in #CUSTOMx#.
// szData[ ] is the data. Must be a string, 16 chars max, changeable in iChat source code.
// You can use 2 custom datas (0, 1) maximum, but you can change this value in iChat source code.
// You have to use iChatSendCustomData( ) each time that your variable is changed (connect, disconnect...), because iChat won't reset it.
// Finally, put #CUSTOMx# in your chat formats like others tags, where 'x' is cutom data id.
// For exemple, to send iLevel[ id ] var to iChat, each time that iLevel[ id ] is changed, I'll do:
// new szLevel[ 16 ]; formatex( szLevel, charsmax( szLevel ), "[%i]", iLevel[ id ] );
// iChatSendCustomData( id, 0, szLevel );
// And in ichat.cfg formats, since I used the id 0 for custom data ( iChatSendCustomData( id, 0, szLevel ) ), I'll put: #CUSTOM0#
// If I want to send another data wich the id 1 for custom data ( iChatSendCustomData( id, 1, szData ) ), I'll put: #CUSTOM1#
// This is actually very powerful, isn't it?
CHAT_USE_CUSTOM_TAGS 0

// Congratulations, you have reached the end of this config file! You just have entirely modified the CS chat!

Link:
Linklerini gizle
Linki Kopyala
Kullanıcı avatarı

Konu Sahibi
BawikaL
Yasaklı Üye
Yasaklı Üye
Mesajlar: 178
Kayıt: Cum Şub 24, 2017 6:58 pm
Server Ip/DNS: CS42.CSDuragi.COM
Clan İsmi: ExiLe Gaming

İstek - Slot,Admin,Kurucu Vs Say Renk Degisimi..

Mesaj gönderen BawikaL »

agam ben bu chat eklentısını kullanmıyorum bu attıgınız sanısam csd orj ichat eklentisi.
sma tarzı bıseyler olabilirmi ?

Link:
Linklerini gizle
Linki Kopyala
Kullanıcı avatarı

NuriReisHDYoutuber
Yasaklı Üye
Yasaklı Üye
Mesajlar: 1133
Kayıt: Prş Mar 02, 2017 8:56 pm

İstek - Slot,Admin,Kurucu Vs Say Renk Degisimi..

Mesaj gönderen NuriReisHDYoutuber »

yapabilecek varsa bilemiyorum fakat bunu yapsanız daha iyi olur .

Link:
Linklerini gizle
Linki Kopyala
Kullanıcı avatarı

seypa
Mesajlar: 1390
Kayıt: Cmt Ağu 13, 2016 12:49 pm
Konum: Pendik/İstanbul
İletişim:

İstek - Slot,Admin,Kurucu Vs Say Renk Degisimi..

Mesaj gönderen seypa »

Eklenti icinden editlenmesi gerek

Link:
Linklerini gizle
Linki Kopyala
Kullanıcı avatarı

Konu Sahibi
BawikaL
Yasaklı Üye
Yasaklı Üye
Mesajlar: 178
Kayıt: Cum Şub 24, 2017 6:58 pm
Server Ip/DNS: CS42.CSDuragi.COM
Clan İsmi: ExiLe Gaming

İstek - Slot,Admin,Kurucu Vs Say Renk Degisimi..

Mesaj gönderen BawikaL »

@CSmiLeFaCe
@redarmygamingaming
@Tasarimci v2i v2
@TunnS[C][C]
@Fatih ~ EjderYa

Link:
Linklerini gizle
Linki Kopyala
Kullanıcı avatarı

TunnS[C]
Mesajlar: 3971
Kayıt: Prş Oca 05, 2017 12:38 pm
Konum: Ordu
Server Ip/DNS: 213.238.173.78
Clan İsmi: CapitaLL |
İletişim:

İstek - Slot,Admin,Kurucu Vs Say Renk Degisimi..

Mesaj gönderen TunnS[C] »

B yetkısı olan her kez beyaz yazması lazım bak bı.

Kod: Tümünü seç

#include <amxmodx>
#include <amxmisc>

#define PLUGIN         	"Admin Yesil Yazi & Adminlerde Tag"
#define VERSION     	"2.2"
#define AUTHOR         	"EDITLEYEN: Optimist"

#define ACCESS_LEVEL    ADMIN_IMMUNITY
#define ADMIN_LISTEN    ADMIN_BAN

new message[192]
new sayText
new teamInfo
new maxPlayers

new g_MessageColor
new g_NameColor
new g_AdminListen

new strName[191]
new strText[191]
new alive[11]

new const g_szTag[][] = {
    "[Sunucu Sahibi]",
    "[Sunucu Sahibi]",
    "[Admin]",
    "[Slot]"
}

new const g_iTagFlag[sizeof(g_szTag)] = {
    ADMIN_RCON,
    ADMIN_RCON,
    ADMIN_BAN,
    ADMIN_RESERVATION
}

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR)

    g_MessageColor = register_cvar("amx_color", "3") 
    g_NameColor = register_cvar("amx_namecolor", "6") 
    g_AdminListen = register_cvar("amx_listen", "1")


    sayText = get_user_msgid("SayText")
    teamInfo = get_user_msgid("TeamInfo")
    maxPlayers = get_maxplayers()


    register_message(sayText, "avoid_duplicated")

    register_concmd("amx_color", "set_color", ACCESS_LEVEL, "<color>")
    register_concmd("amx_namecolor", "set_name_color", ACCESS_LEVEL, "<color>")
    register_concmd("amx_listen", "set_listen", ACCESS_LEVEL, "<1 | 0>")
    register_clcmd("say", "hook_say")
    register_clcmd("say_team", "hook_teamsay")
}


public avoid_duplicated(msgId, msgDest, receiver)
{
    return PLUGIN_HANDLED
}

get_tag_index(id)
{
    new flags = get_user_flags(id)
    
    for(new i = 1; i < sizeof(g_iTagFlag); i++)
    {
        if(check_admin_flag(flags, g_iTagFlag[i]))
        {
            return i
        }
    }
    
    return 0
}

check_admin_flag(flags, flag)
{
    if(flag == ADMIN_ADMIN)
    {
        return ((flags & ~ADMIN_USER) > 0)
    }
    else if(flag == ADMIN_ALL)
    {
        return 1
    }
    
    return (flags & flag)
}

public hook_say(id)
{
    read_args(message, 191)
    remove_quotes(message)

    
    if(message[0] == '@' || message[0] == '/' || message[0] == '!' || equal(message, "")) 
        return PLUGIN_CONTINUE

    new name[32]
    get_user_name(id, name, 31)

    new admin = get_tag_index(id)

    new isAlive

    if(is_user_alive(id))
    {
        isAlive = 1
        alive = "^x01"
    }
    else
    {
        isAlive = 0
        alive = "^x01*DEAD* "
    }

    static color[10]

    if(admin)
    {
        // İsim
        switch(get_pcvar_num(g_NameColor))
        {
            case 1:
                format(strName, 191, "^x04%s %s%s", g_szTag[admin], alive, name)
            case 2:
                format(strName, 191, "^x04%s %s^x04%s ", g_szTag[admin], alive, name)
            case 3:
            {
                color = "SPECTATOR"
                format(strName, 191, "^x04%s %s^x03%s ", g_szTag[admin], alive, name)
            }
            case 4:
            {
                color = "CT"
                format(strName, 191, "^x04%s %s^x03%s", g_szTag[admin], alive, name)
            }
            case 5:
            {
                color = "TERRORIST"
                format(strName, 191, "^x04%s %s^x03%s", g_szTag[admin], alive, name)
            }
            case 6:
            {
                get_user_team(id, color, 9)
                format(strName, 191, "^x04%s %s^x03%s", g_szTag[admin], alive, name)
            }
        }

        // Mesaj
        switch(get_pcvar_num(g_MessageColor))
        {
            case 1:    // Sari
                format(strText, 191, "%s", message)
            case 2:    // Yesil
                format(strText, 191, "^x04%s", message)
            case 3:    // Beyaz
            {
                copy(color, 9, "SPECTATOR")
                format(strText, 191, "^x03%s", message)
            }
            case 4:    // Mavi
            {
                copy(color, 9, "CT")
                format(strText, 191, "^x03%s", message)
            }
            case 5:    // Kirmizi
            {
                copy(color, 9, "TERRORIST")
                format(strText, 191, "^x03%s", message)
            }
        }
    }
    else     
    {
        get_user_team(id, color, 9)
        format(strName, 191, "%s^x03%s", alive, name)
        format(strText, 191, "%s", message)
    }

    format(message, 191, "%s^x01 :  %s", strName, strText)

    sendMessage(color, isAlive)    

    return PLUGIN_CONTINUE
}


public hook_teamsay(id)
{
    new playerTeam = get_user_team(id)
    new playerTeamName[19]

    switch(playerTeam) 
    {
        case 1:
            copy(playerTeamName, 11, "Terrorists")

        case 2:
            copy(playerTeamName, 18, "Counter-Terrorists")

        default:
            copy(playerTeamName, 9, "Spectator")
    }

    read_args(message, 191)
    remove_quotes(message)

   
    if(message[0] == '@' || message[0] == '/' || message[0] == '!' || equal(message, "")) 
        return PLUGIN_CONTINUE

    new name[32]
    get_user_name(id, name, 31)

    new admin = get_tag_index(id)

    new isAlive

    if(is_user_alive(id))
    {
        isAlive = 1
        alive = "^x01"
    }
    else
    {
        isAlive = 0
        alive = "^x01*DEAD* "
    }

    static color[10]

    if(admin)
    {
        // İsim
        switch(get_pcvar_num(g_NameColor))
        {
            case 1:
                format(strName, 191, "%s(%s)^x04%s %s", alive, playerTeamName, g_szTag[admin], name)
            case 2:
                format(strName, 191, "%s(%s)^x04%s ^x04%s", alive, playerTeamName, g_szTag[admin], name)
            case 3:
            {
                color = "SPECTATOR"
                format(strName, 191, "%s(%s)^x04%s ^x03%s", alive, playerTeamName, g_szTag[admin], name)
            }
            case 4:
            {
                color = "CT"
                format(strName, 191, "%s(%s)^x04%s ^x03%s", alive, playerTeamName, g_szTag[admin], name)
            }
            case 5:
            {
                color = "TERRORIST"
                format(strName, 191, "%s(%s)^x04%s ^x03%s", alive, playerTeamName, g_szTag[admin], name)
            }
            case 6:
            {
                get_user_team(id, color, 9)
                format(strName, 191, "%s(%s)^x04%s ^x03%s", alive, playerTeamName, g_szTag[admin], name)
            }
        }

        // Message
        switch(get_pcvar_num(g_MessageColor))
        {
            case 1:    // Sari
                format(strText, 191, "%s", message)
            case 2:    // Yesil
                format(strText, 191, "^x04%s", message)
            case 3:    // Beyaz
            {
                copy(color, 9, "SPECTATOR")
                format(strText, 191, "^x03%s", message)
            }
            case 4:    // Mavi
            {
                copy(color, 9, "CT")
                format(strText, 191, "^x03%s", message)
            }
            case 5:    // Kirmizi
            {
                copy(color, 9, "TERRORIST")
                format(strText, 191, "^x03%s", message)
            }
        }
    }
    else     
    {
        get_user_team(id, color, 9)
        format(strName, 191, "%s(%s) ^x03%s", alive, playerTeamName, name)
        format(strText, 191, "%s", message)
    }

    format(message, 191, "%s ^x01:  %s", strName, strText)

    sendTeamMessage(color, isAlive, playerTeam)    

    return PLUGIN_CONTINUE
}


public set_color(id, level, cid)
{
    if(!cmd_access(id, level, cid, 2))
        return PLUGIN_HANDLED

    new arg[1], newColor
    read_argv(1, arg, 1)

    newColor = str_to_num(arg)

    if(newColor >= 1 && newColor <= 5)
    {
        set_pcvar_num(g_MessageColor, newColor)

        if(get_pcvar_num(g_NameColor) != 1 &&
            ((newColor == 3 &&  get_pcvar_num(g_NameColor) != 3)
            ||(newColor == 4 &&  get_pcvar_num(g_NameColor) != 4)
            ||(newColor == 5 &&  get_pcvar_num(g_NameColor) != 5)))
        {
            set_pcvar_num(g_NameColor, 2)
        }
    }

    return PLUGIN_HANDLED
}


public set_name_color(id, level, cid)
{
    if(!cmd_access(id, level, cid, 2))
        return PLUGIN_HANDLED

    new arg[1], newColor
    read_argv(1, arg, 1)

    newColor = str_to_num(arg)

    if(newColor >= 1 && newColor <= 6)
    {
        set_pcvar_num(g_NameColor, newColor)

        if((get_pcvar_num(g_MessageColor) != 1
            &&((newColor == 3 &&  get_pcvar_num(g_MessageColor) != 3)
            ||(newColor == 4 &&  get_pcvar_num(g_MessageColor) != 4)
            ||(newColor == 5 &&  get_pcvar_num(g_MessageColor) != 5)))
            || get_pcvar_num(g_NameColor) == 6)
        {
            set_pcvar_num(g_MessageColor, 2)
        }
    }

    return PLUGIN_HANDLED
}


public set_listen(id, level, cid)
{
    if(!cmd_access(id, level, cid, 2))
        return PLUGIN_HANDLED

    new arg[1], newListen
    read_argv(1, arg, 1)

    newListen = str_to_num(arg)

    set_pcvar_num(g_AdminListen, newListen)

    return PLUGIN_HANDLED
}


public sendMessage(color[], alive)
{
    new teamName[10]

    for(new player = 1; player < maxPlayers; player++)
    {
        if(!is_user_connected(player))
            continue

        if(alive && is_user_alive(player) || !alive && !is_user_alive(player) || get_pcvar_num(g_AdminListen) && get_user_flags(player) & ADMIN_LISTEN)
        {
            get_user_team(player, teamName, 9)
            changeTeamInfo(player, color)
            writeMessage(player, message)
            changeTeamInfo(player, teamName)
        }
    }
}


public sendTeamMessage(color[], alive, playerTeam)
{
    new teamName[10]

    for(new player = 1; player < maxPlayers; player++)
    {
        if(!is_user_connected(player))
            continue

        if(get_user_team(player) == playerTeam || get_pcvar_num(g_AdminListen) && get_user_flags(player) & ADMIN_LISTEN)
        {
            if(alive && is_user_alive(player) || !alive && !is_user_alive(player) || get_pcvar_num(g_AdminListen) && get_user_flags(player) & ADMIN_LISTEN)
            {
                get_user_team(player, teamName, 9)
                changeTeamInfo(player, color)
                writeMessage(player, message)
                changeTeamInfo(player, teamName)
            }
        }
    }
}


public changeTeamInfo(player, team[])
{
    message_begin(MSG_ONE, teamInfo, _, player) 
    write_byte(player)                
    write_string(team)                
    message_end()                   
}


public writeMessage(player, message[])
{
    message_begin(MSG_ONE, sayText, {0, 0, 0}, player)    
    write_byte(player)                   
    write_string(message)                    
    message_end()                        
}  

Link:
Linklerini gizle
Linki Kopyala
Cevapla