It is currently 16 Jan 2019 14:11






Reply to topic  [ 11 posts ] 
 [Cerere Modificare Plugin] adminchat.amxx [rezolvat] 
Author Message
Online
Membru, skill +1
Membru, skill +1
User avatar

Joined: 21 Jul 2016 13:58
Posts: 186
Location: Ploiesti
Detinator Steam: Da
CS Status: Activ
Detinator server CS: Cs.Pro-League.Ro
SteamID: STEAM_0:0:47999435
Reputatie: Membru Club eXtreamCS (10 Mar - 10 Apr)
Fond eXtream: 0
Plugin Cerut: adminchat
Descriere (adica ce face el mai exact): cololeaza chatul adminilor
Serverul ruleaza (HLDS/ReHLD): reHLD
Versiune AMX Mod X: v1.8.3-dev+5134
Modul Serverului: Classic

Cum pot edita eroarea afisata in poze vreau sa apara asa :
(ALL) (ADMIN) IoNuT. : TEST

Image


| Afiseaza codul
/* AMX Mod X
* Admin Chat Plugin
*
* by the AMX Mod X Development Team
* originally developed by OLO
*
* This file is part of AMX Mod X.
*
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, the author gives permission to
* link the code of this program with the Half-Life Game Engine ("HL
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
* L.L.C ("Valve"). You must obey the GNU General Public License in all
* respects for all of the code used other than the HL Engine and MODs
* from Valve. If you modify this file, you may extend this exception
* to your version of the file, but you are not obligated to do so. If
* you do not wish to do so, delete this exception statement from your
* version.
*/

#include <amxmodx>
#include <amxmisc>

new g_msgChannel

#define MAX_CLR 10

new g_Colors[MAX_CLR][] = {"COL_WHITE", "COL_RED", "COL_GREEN", "COL_BLUE", "COL_YELLOW", "COL_MAGENTA", "COL_CYAN", "COL_ORANGE", "COL_OCEAN", "COL_MAROON"}
new g_Values[MAX_CLR][] = {{255, 255, 255}, {255, 0, 0}, {0, 255, 0}, {0, 0, 255}, {255, 255, 0}, {255, 0, 255}, {0, 255, 255}, {227, 96, 8}, {45, 89, 116}, {103, 44, 38}}
new Float:g_Pos[4][] = {{0.0, 0.0}, {0.05, 0.55}, {-1.0, 0.2}, {-1.0, 0.7}}

new amx_show_activity, amx_namegreen;

new g_msgSayText

public plugin_init()
{
register_plugin("Admin Chat", AMXX_VERSION_STR, "AMXX Dev Team")
register_dictionary("adminchatgreen.txt")
register_dictionary("common.txt")
register_clcmd("say", "cmdSayChat", ADMIN_CHAT, "@[@|@|@][w|r|g|b|y|m|c]<text> - displays hud message")
register_clcmd("say_team", "cmdSayAdmin", 0, "@<text> - displays message to admins")
register_concmd("amx_say", "cmdSay", ADMIN_CHAT, "<message> - sends message to all players")
register_concmd("amx_chat", "cmdChat", ADMIN_CHAT, "<message> - sends message to admins")
register_concmd("amx_psay", "cmdPsay", ADMIN_CHAT, "<name or #userid> <message> - sends private message")
register_concmd("amx_tsay", "cmdTsay", ADMIN_CHAT, "<color> <message> - sends left side hud message to all players")
register_concmd("amx_csay", "cmdTsay", ADMIN_CHAT, "<color> <message> - sends center hud message to all players")

amx_show_activity = get_cvar_pointer("amx_show_activity");

if (amx_show_activity == 0)
{
amx_show_activity = register_cvar("amx_show_activity", "2");
}

amx_namegreen = register_cvar("amx_namegreen", "0");
g_msgSayText = get_user_msgid("SayText");
}

public cmdSayChat(id)
{
if (!access(id, ADMIN_CHAT))
{
return PLUGIN_CONTINUE
}

new said[6], i = 0
read_argv(1, said, 5)

while (said[i] == '@')
{
i++
}

new message[192], name[32]
read_args(message, 191)
get_user_name(id, name, 31)
remove_quotes(message)
if (!i || i > 3)
{
if(!(get_pcvar_num(amx_namegreen)) ) return PLUGIN_CONTINUE
new players[32], inum, player
get_players(players, inum)
if(is_user_alive(id))
format(message, 191, "^4%s ^3: ^1%s", name, message)
else
format(message, 191, "^1*DEAD* ^4%s ^3: ^1%s", name, message)
for(new j = 0; j < inum; ++j) {
player = players[j]
ColorChat(player, id, message)
}
return PLUGIN_HANDLED_MAIN
}

new a = 0
switch (said[i])
{
case 'r': a = 1
case 'g': a = 2
case 'b': a = 3
case 'y': a = 4
case 'm': a = 5
case 'c': a = 6
case 'o': a = 7
}

new n, s = i
if (a)
{
n++
s++
}
while (said[s] && isspace(said[s]))
{
n++
s++
}


new authid[32], userid

get_user_authid(id, authid, 31)
userid = get_user_userid(id)

log_amx("Chat: ^"%s<%d><%s><>^" tsay ^"%s^"", name, userid, authid, message[i + n])
log_message("^"%s<%d><%s><>^" triggered ^"amx_tsay^" (text ^"%s^") (color ^"%L^")", name, userid, authid, message[i + n], "en", g_Colors[a])

if (++g_msgChannel > 6 || g_msgChannel < 3)
{
g_msgChannel = 3
}

new Float:verpos = g_Pos[i][1] + float(g_msgChannel) / 35.0

set_hudmessage(g_Values[a][0], g_Values[a][1], g_Values[a][2], g_Pos[i][0], verpos, 0, 6.0, 6.0, 0.5, 0.15, -1)

switch ( get_pcvar_num(amx_show_activity) )
{
case 3, 4:
{
new maxpl = get_maxplayers();
for (new pl = 1; pl <= maxpl; pl++)
{
if (is_user_connected(pl) && !is_user_bot(pl))
{
if (is_user_admin(pl))
{
show_hudmessage(pl, "%s : %s", name, message[i + n])
client_print(pl, print_notify, "%s : %s", name, message[i + n])
}
else
{
show_hudmessage(pl, "%s", message[i + n])
client_print(pl, print_notify, "%s", message[i + n])
}
}
}
}
case 2:
{
show_hudmessage(0, "%s : %s", name, message[i + n])
client_print(0, print_notify, "%s : %s", name, message[i + n])
}
default:
{
show_hudmessage(0, "%s", message[i + n])
client_print(0, print_notify, "%s", message[i + n])
}
}
if(a==1) {
client_cmd(0, "spk ^"vox/warning _comma message from administration^"")
}

return PLUGIN_HANDLED
}

public cmdSayAdmin(id)
{
new said[2]
read_argv(1, said, 1)

if (said[0] != '@')
return PLUGIN_CONTINUE

new message[192], name[32], authid[32], userid
new players[32], inum, player

read_args(message, 191)
remove_quotes(message)
get_user_authid(id, authid, 31)
get_user_name(id, name, 31)
userid = get_user_userid(id)

log_amx("Chat: ^"%s<%d><%s><>^" chat ^"%s^"", name, userid, authid, message[1])
log_message("^"%s<%d><%s><>^" triggered ^"amx_chat^" (text ^"%s^")", name, userid, authid, message[1])

if (is_user_admin(id))
format(message, 191, "^4(%L) ^3%s ^4: ^1%s", id, "ADMIN", name, message[1])
else
format(message, 191, "^4(%L) ^3%s ^4: ^1%s", id, "PLAYER", name, message[1])

get_players(players, inum)

for (new i = 0; i < inum; ++i)
{
player = players[i]
if (get_user_flags(player) & ADMIN_CHAT || player == id)
{
ColorChat(player, id, message)
}
}
return PLUGIN_HANDLED
}

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

new message[192], name[32], players[32], inum, authid[32], userid, player

read_args(message, 191)
remove_quotes(message)
get_user_authid(id, authid, 31)
get_user_name(id, name, 31)
userid = get_user_userid(id)
get_players(players, inum)

log_amx("Chat: ^"%s<%d><%s><>^" chat ^"%s^"", name, userid, authid, message)
log_message("^"%s<%d><%s><>^" triggered ^"amx_chat^" (text ^"%s^")", name, userid, authid, message)

format(message, 191, "^4(ADMINS) ^3%s ^4: ^1%s", name, message)
console_print(id, "%s", message)

for (new i = 0; i < inum; ++i)
{
player = players[i]
if (access(players[i], ADMIN_CHAT))
{
ColorChat(player, id, message)
}
}
return PLUGIN_HANDLED
}

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

new message[192], name[32], authid[32], userid

read_args(message, 191)
remove_quotes(message)
get_user_authid(id, authid, 31)
get_user_name(id, name, 31)
userid = get_user_userid(id)

console_print(id, "%L", id, "PRINT_ALL", name, message)

log_amx("Chat: ^"%s<%d><%s><>^" say ^"%s^"", name, userid, authid, message)
log_message("^"%s<%d><%s><>^" triggered ^"amx_say^" (text ^"%s^")", name, userid, authid, message)

new colored[192]


new players[32], inum, player
get_players(players, inum)

for (new i = 0; i < inum; i++)
{
player = players[i]
switch(get_pcvar_num(amx_show_activity))
{
case 3, 4:
{
if(is_user_admin(player)){
formatex(colored,191,"^1(%L) ^4 ADMIN ^3%s ^1: %s", player, "ALL", name, message)
}else{
formatex(colored,191,"^1(%L) ^4 ADMIN ^1: %s", player, "ALL", message)
}
}
case 2:formatex(colored,191,"^1(%L) ^4 ADMIN ^3%s ^1: %s", player, "ALL", name, message)
default :formatex(colored,191,"^1(%L) ^4 ADMIN ^1: %s", player, "ALL", message)
}
ColorChat(player, id, colored)
}
return PLUGIN_HANDLED
}

public cmdPsay(id, level, cid)
{
if (!cmd_access(id, level, cid, 3))
return PLUGIN_HANDLED

new name[32]
read_argv(1, name, 31)
new priv = cmd_target(id, name, 0)

if (!priv)
return PLUGIN_HANDLED

new length = strlen(name) + 1

get_user_name(priv, name, 31);

new message[192], name2[32], authid[32], authid2[32], userid, userid2

get_user_authid(id, authid, 31)
get_user_name(id, name2, 31)
userid = get_user_userid(id)
read_args(message, 191)

if (message[0] == '"' && message[length] == '"') // HLSW fix
{
message[0] = ' '
message[length] = ' '
length += 2
}

remove_quotes(message[length])
get_user_name(priv, name, 31)
new colored[192]
formatex(colored,191,"^1(^4%s^1) ^4%s ^1: %s", name, name2, message[length])
if (id && id != priv)
{
ColorChat(id, id, colored)
}
ColorChat(priv, id, colored)

console_print(id, "(%s) %s : %s", name, name2, message[length])
get_user_authid(priv, authid2, 31)
userid2 = get_user_userid(priv)

log_amx("Chat: ^"%s<%d><%s><>^" psay ^"%s<%d><%s><>^" ^"%s^"", name2, userid, authid, name, userid2, authid2, message[length])
log_message("^"%s<%d><%s><>^" triggered ^"amx_psay^" against ^"%s<%d><%s><>^" (text ^"%s^")", name2, userid, authid, name, userid2, authid2, message[length])

return PLUGIN_HANDLED
}

public cmdTsay(id, level, cid)
{
if (!cmd_access(id, level, cid, 3))
return PLUGIN_HANDLED

new cmd[16], color[16], color2[16], message[192], name[32], authid[32], userid = 0

read_argv(0, cmd, 15)
new bool:tsay = (tolower(cmd[4]) == 't')

read_args(message, 191)
remove_quotes(message)
parse(message, color, 15)

new found = 0, a = 0
new lang[3], langnum = get_langsnum()

for (new i = 0; i < MAX_CLR; ++i)
{
for (new j = 0; j < langnum; j++)
{
get_lang(j, lang)
format(color2, 15, "%L", lang, g_Colors[i])

if (equali(color, color2))
{
a = i
found = 1
break
}
}
if (found == 1)
break
}

new length = found ? (strlen(color) + 1) : 0

if (++g_msgChannel > 6 || g_msgChannel < 3)
g_msgChannel = 3

new Float:verpos = (tsay ? 0.55 : 0.1) + float(g_msgChannel) / 35.0

get_user_authid(id, authid, 31)
get_user_name(id, name, 31)
userid = get_user_userid(id)
set_hudmessage(g_Values[a][0], g_Values[a][1], g_Values[a][2], tsay ? 0.05 : -1.0, verpos, 0, 6.0, 6.0, 0.5, 0.15, -1)

switch ( get_pcvar_num(amx_show_activity) )
{
case 3, 4:
{
new maxpl = get_maxplayers();
for (new pl = 1; pl <= maxpl; pl++)
{
if (is_user_connected(pl) && !is_user_bot(pl))
{
if (is_user_admin(pl))
{
show_hudmessage(pl, "%s : %s", name, message[length])
client_print(pl, print_notify, "%s : %s", name, message[length])
}
else
{
show_hudmessage(pl, "%s", message[length])
client_print(pl, print_notify, "%s", message[length])
}
}
}
console_print(id, "%s : %s", name, message[length])
}
case 2:
{
show_hudmessage(0, "%s : %s", name, message[length])
client_print(0, print_notify, "%s : %s", name, message[length])
console_print(id, "%s : %s", name, message[length])
}
default:
{
show_hudmessage(0, "%s", message[length])
client_print(0, print_notify, "%s", message[length])
console_print(id, "%s", message[length])
}
}

if(a==1) {
client_cmd(0, "spk ^"vox/warning _period message from administration^"")
}

log_amx("Chat: ^"%s<%d><%s><>^" %s ^"%s^"", name, userid, authid, cmd[4], message[length])
log_message("^"%s<%d><%s><>^" triggered ^"%s^" (text ^"%s^") (color ^"%s^")", name, userid, authid, cmd, message[length], color2)

return PLUGIN_HANDLED
}

ColorChat(id, iSender, fmt[], any:...)
{
new szMsg[192]
szMsg[0] = 0x04
vformat(szMsg[1], charsmax(szMsg)-1, fmt, 4)

if( !iSender )
{
iSender = 1
}

message_begin(id ? MSG_ONE : MSG_ALL, g_msgSayText, _, id)
{
write_byte(iSender)
write_string(szMsg)
}
message_end()
}


Last edited by Radu eXtream on 10 Jan 2019 15:54, edited 1 time in total.

Marcat ca rezolvat.



08 Jan 2019 19:18
Profile multumesc ICQ YIM WWW
Scripter eXtreamCS
Scripter eXtreamCS
User avatar

Joined: 24 Aug 2011 11:24
Posts: 1666
Location: |<()|)
Detinator Steam: Da
CS Status: HLDS Builder
Detinator server CS: liber de contract
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Fond eXtream: 0
ai probleme cu redarea textului din lang

_________________
Stick with the best & regards Adryyy .


x , daNzeT , Arion , Chaos , Exolent , aNNakin , PoSiTiOn Of PoWeR , ExoTiQ , -UnQ- UHD , ViciousVixen , Arkshine , Askhanar , KronoS eXtream , alkaline , CryWolf , Fuffy , tre3fla , Rap^ , Hades Ownage , xPaw .


08 Jan 2019 19:42
Profile multumesc ICQ YIM
Online
Membru, skill +1
Membru, skill +1
User avatar

Joined: 21 Jul 2016 13:58
Posts: 186
Location: Ploiesti
Detinator Steam: Da
CS Status: Activ
Detinator server CS: Cs.Pro-League.Ro
SteamID: STEAM_0:0:47999435
Reputatie: Membru Club eXtreamCS (10 Mar - 10 Apr)
Fond eXtream: 0
| Afiseaza codul
[en]
COL_WHITE = white
COL_RED = red
COL_GREEN = green
COL_BLUE = blue
COL_YELLOW = yellow
COL_MAGENTA = magenta
COL_CYAN = cyan
COL_ORANGE = orange
COL_OCEAN = ocean
COL_MAROON = maroon
PRINT_ALL = (ALL) %s : %s

[de]
COL_WHITE = weiss
COL_RED = rot
COL_GREEN = gruen
COL_BLUE = blau
COL_YELLOW = gelb
COL_MAGENTA = magenta-rot
COL_CYAN = cyan-blau
COL_ORANGE = orange
COL_OCEAN = ozean-blau
COL_MAROON = braun
PRINT_ALL = (ALLES) %s : %s

[sr]
COL_WHITE = bela
COL_RED = crvena
COL_GREEN = zelena
COL_BLUE = plava
COL_YELLOW = zuta
COL_MAGENTA = ljubicasta
COL_CYAN = tirkizna
COL_ORANGE = narandzasta
COL_OCEAN = okean
COL_MAROON = modra
PRINT_ALL = (SVE) %s : %s

[tr]
COL_WHITE = beyaz
COL_RED = kirmizi
COL_GREEN = yesil
COL_BLUE = mavi
COL_YELLOW = sari
COL_MAGENTA = magenta
COL_CYAN = cian
COL_ORANGE = turuncu
COL_OCEAN = deniz
COL_MAROON = kahverengi
PRINT_ALL = (HEPSI) %s : %s

[fr]
COL_WHITE = blanc
COL_RED = rouge
COL_GREEN = vert
COL_BLUE = bleu
COL_YELLOW = jaune
COL_MAGENTA = magenta
COL_CYAN = cyan
COL_ORANGE = orange
COL_OCEAN = marine
COL_MAROON = marron
PRINT_ALL = (TOUS) %s : %s

[sv]
COL_WHITE = vit
COL_RED = r'o'd
COL_GREEN = gr'o'n
COL_BLUE = bla
COL_YELLOW = gul
COL_MAGENTA = magenta
COL_CYAN = cyan
COL_ORANGE = orange
COL_OCEAN = oceanbla
COL_MAROON = brun
PRINT_ALL = (ALLA) %s : %s

[da]
COL_WHITE = hvid
COL_RED = roed
COL_GREEN = groen
COL_BLUE = blaa
COL_YELLOW = gul
COL_MAGENTA = magenta
COL_CYAN = cyan
COL_ORANGE = orange
COL_OCEAN = ocean blaa
COL_MAROON = brun
PRINT_ALL = (ALLE) %s : %s

[pl]
COL_WHITE = bialy
COL_RED = czerwony
COL_GREEN = zielony
COL_BLUE = niebieski
COL_YELLOW = zolty
COL_MAGENTA = ciemnorozowy
COL_CYAN = turkusowy
COL_ORANGE = pomaranczowy
COL_OCEAN = blekitny
COL_MAROON = bordowy
PRINT_ALL = (WSZYSTKO) %s : %s

[bp]
COL_WHITE = branco
COL_RED = vermelho
COL_GREEN = verde
COL_BLUE = azul
COL_YELLOW = amarelo
COL_MAGENTA = magenta
COL_CYAN = ciano
COL_ORANGE = laranja
COL_OCEAN = oceano
COL_MAROON = marrom
PRINT_ALL = (TUDO) %s : %s

[nl]
COL_WHITE = wit
COL_RED = rood
COL_GREEN = groen
COL_BLUE = blauw
COL_YELLOW = geel
COL_MAGENTA = magenta
COL_CYAN = appelblauwzeegroen
COL_ORANGE = oranje
COL_OCEAN = oceaan
COL_MAROON = bruin
PRINT_ALL = (Allemaal) %s : %s

[es]
COL_WHITE = blanco
COL_RED = rojo
COL_GREEN = verde
COL_BLUE = azul
COL_YELLOW = amarillo
COL_MAGENTA = magenta
COL_CYAN = cian
COL_ORANGE = naranja
COL_OCEAN = azul marino
COL_MAROON = marron
PRINT_ALL = (TODOS) %s : %s

[cz]
COL_WHITE = bila
COL_RED = cervena
COL_GREEN = zelena
COL_BLUE = modra
COL_YELLOW = zluta
COL_MAGENTA = fuchsiova
COL_CYAN = modrozelena
COL_ORANGE = oranzova
COL_OCEAN = mpdra
COL_MAROON = kastanova
PRINT_ALL = (ALL) %s : %s

[fi]
COL_WHITE = valkoinen
COL_RED = punainen
COL_GREEN = vihrea
COL_BLUE = sininen
COL_YELLOW = keltainen
COL_MAGENTA = mangaani
COL_CYAN = kyaani
COL_ORANGE = oranssi
COL_OCEAN = merensininen
COL_MAROON = viininpunainen
PRINT_ALL = (KAIKKI) %s : %s

[ls]
COL_WHITE = \/\/hi73
COL_RED = r3d
COL_GREEN = gr33n
COL_BLUE = b|u3
COL_YELLOW = y3||0w
COL_MAGENTA = m4g3nt4
COL_CYAN = <y4n
COL_ORANGE = 0r4ng3
COL_OCEAN = 0c34n
COL_MAROON = m4r00n
PRINT_ALL = (@||) %s : %s

[bg]
COL_WHITE = Bql
COL_RED = 4erven
COL_GREEN = zelen
COL_BLUE = sin
COL_YELLOW = jalt
COL_MAGENTA = magenta
COL_CYAN = cyan
COL_ORANGE = orangev
COL_OCEAN = okeanski
COL_MAROON = maroon
PRINT_ALL = (ALL) %s : %s

[ro]
COL_WHITE = alb
COL_RED = rosu
COL_GREEN = verde
COL_BLUE = albastru
COL_YELLOW = galben
COL_MAGENTA = purpuriu
COL_CYAN = cian
COL_ORANGE = oranj
COL_OCEAN = ocean
COL_MAROON = maro
PRINT_ALL = (TOTI) %s : %s

[hu]
COL_WHITE = feher
COL_RED = piros
COL_GREEN = zold
COL_BLUE = kek
COL_YELLOW = csarga
COL_MAGENTA = magenta
COL_CYAN = cyan
COL_ORANGE = nsarga
COL_OCEAN = ocean
COL_MAROON = maroon
PRINT_ALL = (MIND) %s : %s

[lt]
COL_WHITE = balta
COL_RED = raudona
COL_GREEN = zalia
COL_BLUE = melyna
COL_YELLOW = geltona
COL_MAGENTA = rausvas
COL_CYAN = zydras
COL_ORANGE = oranzine
COL_OCEAN = melsva
COL_MAROON = bordine
PRINT_ALL = (VISIEM) %s : %s

[sk]
COL_WHITE = biela
COL_RED = cervena
COL_GREEN = zelena
COL_BLUE = modra
COL_YELLOW = zlta
COL_MAGENTA = fialova
COL_CYAN = modrozelena
COL_ORANGE = orandzova
COL_OCEAN = modra
COL_MAROON = gastanova
PRINT_ALL = (ALL) %s : %s

[mk]
COL_WHITE = bela
COL_RED = crvena
COL_GREEN = zelena
COL_BLUE = plava
COL_YELLOW = zolta
COL_MAGENTA = ljubicesta
COL_CYAN = tirkizna
COL_ORANGE = portokalova
COL_OCEAN = okean
COL_MAROON = modra
PRINT_ALL = (KON SITE) %s : %s


08 Jan 2019 19:59
Profile multumesc ICQ YIM WWW
Scripter eXtreamCS
Scripter eXtreamCS
User avatar

Joined: 24 Aug 2011 11:24
Posts: 1666
Location: |<()|)
Detinator Steam: Da
CS Status: HLDS Builder
Detinator server CS: liber de contract
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Fond eXtream: 0
adaugă ALL = (ALL) %s : %s

_________________
Stick with the best & regards Adryyy .


x , daNzeT , Arion , Chaos , Exolent , aNNakin , PoSiTiOn Of PoWeR , ExoTiQ , -UnQ- UHD , ViciousVixen , Arkshine , Askhanar , KronoS eXtream , alkaline , CryWolf , Fuffy , tre3fla , Rap^ , Hades Ownage , xPaw .


08 Jan 2019 20:55
Profile multumesc ICQ YIM
Online
Membru, skill +1
Membru, skill +1
User avatar

Joined: 21 Jul 2016 13:58
Posts: 186
Location: Ploiesti
Detinator Steam: Da
CS Status: Activ
Detinator server CS: Cs.Pro-League.Ro
SteamID: STEAM_0:0:47999435
Reputatie: Membru Club eXtreamCS (10 Mar - 10 Apr)
Fond eXtream: 0
Lafel imi da ...


08 Jan 2019 22:19
Profile multumesc ICQ YIM WWW
Scripter eXtreamCS
Scripter eXtreamCS
User avatar

Joined: 24 Aug 2011 11:24
Posts: 1666
Location: |<()|)
Detinator Steam: Da
CS Status: HLDS Builder
Detinator server CS: liber de contract
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Fond eXtream: 0
ai pus peste tot? ai dat restart?
mă rog | Afiseaza codul
/* AMX Mod X
* Admin Chat Plugin
*
* by the AMX Mod X Development Team
* originally developed by OLO
*
* This file is part of AMX Mod X.
*
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, the author gives permission to
* link the code of this program with the Half-Life Game Engine ("HL
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
* L.L.C ("Valve"). You must obey the GNU General Public License in all
* respects for all of the code used other than the HL Engine and MODs
* from Valve. If you modify this file, you may extend this exception
* to your version of the file, but you are not obligated to do so. If
* you do not wish to do so, delete this exception statement from your
* version.
*/

#include <amxmodx>
#include <amxmisc>

new g_msgChannel

#define MAX_CLR 10

new g_Colors[MAX_CLR][] = {"COL_WHITE", "COL_RED", "COL_GREEN", "COL_BLUE", "COL_YELLOW", "COL_MAGENTA", "COL_CYAN", "COL_ORANGE", "COL_OCEAN", "COL_MAROON"}
new g_Values[MAX_CLR][] = {{255, 255, 255}, {255, 0, 0}, {0, 255, 0}, {0, 0, 255}, {255, 255, 0}, {255, 0, 255}, {0, 255, 255}, {227, 96, 8}, {45, 89, 116}, {103, 44, 38}}
new Float:g_Pos[4][] = {{0.0, 0.0}, {0.05, 0.55}, {-1.0, 0.2}, {-1.0, 0.7}}

new amx_show_activity, amx_namegreen;

new g_msgSayText

public plugin_init()
{
register_plugin("Admin Chat", AMXX_VERSION_STR, "AMXX Dev Team")
register_dictionary("adminchatgreen.txt")
register_dictionary("common.txt")
register_clcmd("say", "cmdSayChat", ADMIN_CHAT, "@[@|@|@][w|r|g|b|y|m|c]<text> - displays hud message")
register_clcmd("say_team", "cmdSayAdmin", 0, "@<text> - displays message to admins")
register_concmd("amx_say", "cmdSay", ADMIN_CHAT, "<message> - sends message to all players")
register_concmd("amx_chat", "cmdChat", ADMIN_CHAT, "<message> - sends message to admins")
register_concmd("amx_psay", "cmdPsay", ADMIN_CHAT, "<name or #userid> <message> - sends private message")
register_concmd("amx_tsay", "cmdTsay", ADMIN_CHAT, "<color> <message> - sends left side hud message to all players")
register_concmd("amx_csay", "cmdTsay", ADMIN_CHAT, "<color> <message> - sends center hud message to all players")

amx_show_activity = get_cvar_pointer("amx_show_activity");

if (amx_show_activity == 0)
{
amx_show_activity = register_cvar("amx_show_activity", "2");
}

amx_namegreen = register_cvar("amx_namegreen", "0");
g_msgSayText = get_user_msgid("SayText");
}

public cmdSayChat(id)
{
if (!access(id, ADMIN_CHAT))
{
return PLUGIN_CONTINUE
}

new said[6], i = 0
read_argv(1, said, 5)

while (said[i] == '@')
{
i++
}

new message[192], name[32]
read_args(message, 191)
get_user_name(id, name, 31)
remove_quotes(message)
if (!i || i > 3)
{
if(!(get_pcvar_num(amx_namegreen)) ) return PLUGIN_CONTINUE
new players[32], inum, player
get_players(players, inum)
if(is_user_alive(id))
format(message, 191, "^4%s ^3: ^1%s", name, message)
else
format(message, 191, "^1*DEAD* ^4%s ^3: ^1%s", name, message)
for(new j = 0; j < inum; ++j) {
player = players[j]
ColorChat(player, id, message)
}
return PLUGIN_HANDLED_MAIN
}

new a = 0
switch (said[i])
{
case 'r': a = 1
case 'g': a = 2
case 'b': a = 3
case 'y': a = 4
case 'm': a = 5
case 'c': a = 6
case 'o': a = 7
}

new n, s = i
if (a)
{
n++
s++
}
while (said[s] && isspace(said[s]))
{
n++
s++
}


new authid[32], userid

get_user_authid(id, authid, 31)
userid = get_user_userid(id)

log_amx("Chat: ^"%s<%d><%s><>^" tsay ^"%s^"", name, userid, authid, message[i + n])
log_message("^"%s<%d><%s><>^" triggered ^"amx_tsay^" (text ^"%s^") (color ^"%L^")", name, userid, authid, message[i + n], "en", g_Colors[a])

if (++g_msgChannel > 6 || g_msgChannel < 3)
{
g_msgChannel = 3
}

new Float:verpos = g_Pos[i][1] + float(g_msgChannel) / 35.0

set_hudmessage(g_Values[a][0], g_Values[a][1], g_Values[a][2], g_Pos[i][0], verpos, 0, 6.0, 6.0, 0.5, 0.15, -1)

switch ( get_pcvar_num(amx_show_activity) )
{
case 3, 4:
{
new maxpl = get_maxplayers();
for (new pl = 1; pl <= maxpl; pl++)
{
if (is_user_connected(pl) && !is_user_bot(pl))
{
if (is_user_admin(pl))
{
show_hudmessage(pl, "%s : %s", name, message[i + n])
client_print(pl, print_notify, "%s : %s", name, message[i + n])
}
else
{
show_hudmessage(pl, "%s", message[i + n])
client_print(pl, print_notify, "%s", message[i + n])
}
}
}
}
case 2:
{
show_hudmessage(0, "%s : %s", name, message[i + n])
client_print(0, print_notify, "%s : %s", name, message[i + n])
}
default:
{
show_hudmessage(0, "%s", message[i + n])
client_print(0, print_notify, "%s", message[i + n])
}
}
if(a==1) {
client_cmd(0, "spk ^"vox/warning _comma message from administration^"")
}

return PLUGIN_HANDLED
}

public cmdSayAdmin(id)
{
new said[2]
read_argv(1, said, 1)

if (said[0] != '@')
return PLUGIN_CONTINUE

new message[192], name[32], authid[32], userid
new players[32], inum, player

read_args(message, 191)
remove_quotes(message)
get_user_authid(id, authid, 31)
get_user_name(id, name, 31)
userid = get_user_userid(id)

log_amx("Chat: ^"%s<%d><%s><>^" chat ^"%s^"", name, userid, authid, message[1])
log_message("^"%s<%d><%s><>^" triggered ^"amx_chat^" (text ^"%s^")", name, userid, authid, message[1])

if (is_user_admin(id))
format(message, 191, "^4(%L) ^3%s ^4: ^1%s", id, "ADMIN", name, message[1])
else
format(message, 191, "^4(%L) ^3%s ^4: ^1%s", id, "PLAYER", name, message[1])

get_players(players, inum)

for (new i = 0; i < inum; ++i)
{
player = players[i]
if (get_user_flags(player) & ADMIN_CHAT || player == id)
{
ColorChat(player, id, message)
}
}
return PLUGIN_HANDLED
}

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

new message[192], name[32], players[32], inum, authid[32], userid, player

read_args(message, 191)
remove_quotes(message)
get_user_authid(id, authid, 31)
get_user_name(id, name, 31)
userid = get_user_userid(id)
get_players(players, inum)

log_amx("Chat: ^"%s<%d><%s><>^" chat ^"%s^"", name, userid, authid, message)
log_message("^"%s<%d><%s><>^" triggered ^"amx_chat^" (text ^"%s^")", name, userid, authid, message)

format(message, 191, "^4(ADMINS) ^3%s ^4: ^1%s", name, message)
console_print(id, "%s", message)

for (new i = 0; i < inum; ++i)
{
player = players[i]
if (access(players[i], ADMIN_CHAT))
{
ColorChat(player, id, message)
}
}
return PLUGIN_HANDLED
}

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

new message[192], name[32], authid[32], userid

read_args(message, 191)
remove_quotes(message)
get_user_authid(id, authid, 31)
get_user_name(id, name, 31)
userid = get_user_userid(id)

console_print(id, "%L", id, "PRINT_ALL", name, message)

log_amx("Chat: ^"%s<%d><%s><>^" say ^"%s^"", name, userid, authid, message)
log_message("^"%s<%d><%s><>^" triggered ^"amx_say^" (text ^"%s^")", name, userid, authid, message)

new colored[192]


new players[32], inum, player
get_players(players, inum)

for (new i = 0; i < inum; i++)
{
player = players[i]
switch(get_pcvar_num(amx_show_activity))
{
case 3, 4:
{
if(is_user_admin(player)){
formatex(colored,191,"^1(ALL) ^4 ADMIN ^3%s ^1: %s", name, message)
}else{
formatex(colored,191,"^1(ALL) ^4 ADMIN ^1: %s", message)
}
}
case 2:formatex(colored,191,"^1(ALL) ^4 ADMIN ^3%s ^1: %s", name, message)
default :formatex(colored,191,"^1(ALL) ^4 ADMIN ^1: %s", message)
}
ColorChat(player, id, colored)
}
return PLUGIN_HANDLED
}

public cmdPsay(id, level, cid)
{
if (!cmd_access(id, level, cid, 3))
return PLUGIN_HANDLED

new name[32]
read_argv(1, name, 31)
new priv = cmd_target(id, name, 0)

if (!priv)
return PLUGIN_HANDLED

new length = strlen(name) + 1

get_user_name(priv, name, 31);

new message[192], name2[32], authid[32], authid2[32], userid, userid2

get_user_authid(id, authid, 31)
get_user_name(id, name2, 31)
userid = get_user_userid(id)
read_args(message, 191)

if (message[0] == '"' && message[length] == '"') // HLSW fix
{
message[0] = ' '
message[length] = ' '
length += 2
}

remove_quotes(message[length])
get_user_name(priv, name, 31)
new colored[192]
formatex(colored,191,"^1(^4%s^1) ^4%s ^1: %s", name, name2, message[length])
if (id && id != priv)
{
ColorChat(id, id, colored)
}
ColorChat(priv, id, colored)

console_print(id, "(%s) %s : %s", name, name2, message[length])
get_user_authid(priv, authid2, 31)
userid2 = get_user_userid(priv)

log_amx("Chat: ^"%s<%d><%s><>^" psay ^"%s<%d><%s><>^" ^"%s^"", name2, userid, authid, name, userid2, authid2, message[length])
log_message("^"%s<%d><%s><>^" triggered ^"amx_psay^" against ^"%s<%d><%s><>^" (text ^"%s^")", name2, userid, authid, name, userid2, authid2, message[length])

return PLUGIN_HANDLED
}

public cmdTsay(id, level, cid)
{
if (!cmd_access(id, level, cid, 3))
return PLUGIN_HANDLED

new cmd[16], color[16], color2[16], message[192], name[32], authid[32], userid = 0

read_argv(0, cmd, 15)
new bool:tsay = (tolower(cmd[4]) == 't')

read_args(message, 191)
remove_quotes(message)
parse(message, color, 15)

new found = 0, a = 0
new lang[3], langnum = get_langsnum()

for (new i = 0; i < MAX_CLR; ++i)
{
for (new j = 0; j < langnum; j++)
{
get_lang(j, lang)
format(color2, 15, "%L", lang, g_Colors[i])

if (equali(color, color2))
{
a = i
found = 1
break
}
}
if (found == 1)
break
}

new length = found ? (strlen(color) + 1) : 0

if (++g_msgChannel > 6 || g_msgChannel < 3)
g_msgChannel = 3

new Float:verpos = (tsay ? 0.55 : 0.1) + float(g_msgChannel) / 35.0

get_user_authid(id, authid, 31)
get_user_name(id, name, 31)
userid = get_user_userid(id)
set_hudmessage(g_Values[a][0], g_Values[a][1], g_Values[a][2], tsay ? 0.05 : -1.0, verpos, 0, 6.0, 6.0, 0.5, 0.15, -1)

switch ( get_pcvar_num(amx_show_activity) )
{
case 3, 4:
{
new maxpl = get_maxplayers();
for (new pl = 1; pl <= maxpl; pl++)
{
if (is_user_connected(pl) && !is_user_bot(pl))
{
if (is_user_admin(pl))
{
show_hudmessage(pl, "%s : %s", name, message[length])
client_print(pl, print_notify, "%s : %s", name, message[length])
}
else
{
show_hudmessage(pl, "%s", message[length])
client_print(pl, print_notify, "%s", message[length])
}
}
}
console_print(id, "%s : %s", name, message[length])
}
case 2:
{
show_hudmessage(0, "%s : %s", name, message[length])
client_print(0, print_notify, "%s : %s", name, message[length])
console_print(id, "%s : %s", name, message[length])
}
default:
{
show_hudmessage(0, "%s", message[length])
client_print(0, print_notify, "%s", message[length])
console_print(id, "%s", message[length])
}
}

if(a==1) {
client_cmd(0, "spk ^"vox/warning _period message from administration^"")
}

log_amx("Chat: ^"%s<%d><%s><>^" %s ^"%s^"", name, userid, authid, cmd[4], message[length])
log_message("^"%s<%d><%s><>^" triggered ^"%s^" (text ^"%s^") (color ^"%s^")", name, userid, authid, cmd, message[length], color2)

return PLUGIN_HANDLED
}

ColorChat(id, iSender, fmt[], any:...)
{
new szMsg[192]
szMsg[0] = 0x04
vformat(szMsg[1], charsmax(szMsg)-1, fmt, 4)

if( !iSender )
{
iSender = 1
}

message_begin(id ? MSG_ONE : MSG_ALL, g_msgSayText, _, id)
{
write_byte(iSender)
write_string(szMsg)
}
message_end()
}

_________________
Stick with the best & regards Adryyy .


x , daNzeT , Arion , Chaos , Exolent , aNNakin , PoSiTiOn Of PoWeR , ExoTiQ , -UnQ- UHD , ViciousVixen , Arkshine , Askhanar , KronoS eXtream , alkaline , CryWolf , Fuffy , tre3fla , Rap^ , Hades Ownage , xPaw .


08 Jan 2019 22:41
Profile multumesc ICQ YIM
Online
Membru, skill +1
Membru, skill +1
User avatar

Joined: 21 Jul 2016 13:58
Posts: 186
Location: Ploiesti
Detinator Steam: Da
CS Status: Activ
Detinator server CS: Cs.Pro-League.Ro
SteamID: STEAM_0:0:47999435
Reputatie: Membru Club eXtreamCS (10 Mar - 10 Apr)
Fond eXtream: 0
Imi apare bine acu, doar ca este aceiasi eroare in consola


Image

Image


09 Jan 2019 11:40
Profile multumesc ICQ YIM WWW
Scripter eXtreamCS
Scripter eXtreamCS
User avatar

Joined: 24 Aug 2011 11:24
Posts: 1666
Location: |<()|)
Detinator Steam: Da
CS Status: HLDS Builder
Detinator server CS: liber de contract
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Fond eXtream: 0
acolo spune că nu ai PRINT_ALL , adaugă-l în lang -_-

_________________
Stick with the best & regards Adryyy .


x , daNzeT , Arion , Chaos , Exolent , aNNakin , PoSiTiOn Of PoWeR , ExoTiQ , -UnQ- UHD , ViciousVixen , Arkshine , Askhanar , KronoS eXtream , alkaline , CryWolf , Fuffy , tre3fla , Rap^ , Hades Ownage , xPaw .


09 Jan 2019 18:21
Profile multumesc ICQ YIM
Online
Membru, skill +1
Membru, skill +1
User avatar

Joined: 21 Jul 2016 13:58
Posts: 186
Location: Ploiesti
Detinator Steam: Da
CS Status: Activ
Detinator server CS: Cs.Pro-League.Ro
SteamID: STEAM_0:0:47999435
Reputatie: Membru Club eXtreamCS (10 Mar - 10 Apr)
Fond eXtream: 0
Dacă știam probabil nu mai postam, dacă vrei sa ma ajuți te rog sa îmi spui cum ce și cum..


09 Jan 2019 18:49
Profile multumesc ICQ YIM WWW
Scripter eXtreamCS
Scripter eXtreamCS
User avatar

Joined: 24 Aug 2011 11:24
Posts: 1666
Location: |<()|)
Detinator Steam: Da
CS Status: HLDS Builder
Detinator server CS: liber de contract
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Fond eXtream: 0
îți spune că nu a găsit traducere pentru PRINT_ALL, ce vrei să fac eu?ori adaugi în lag traducerea respectivă ori folosești urm cod
| Afiseaza codul
Code:
/* AMX Mod X
*   Admin Chat Plugin
*
* by the AMX Mod X Development Team
*  originally developed by OLO
*
* This file is part of AMX Mod X.
*
*
*  This program is free software; you can redistribute it and/or modify it
*  under the terms of the GNU General Public License as published by the
*  Free Software Foundation; either version 2 of the License, or (at
*  your option) any later version.
*
*  This program is distributed in the hope that it will be useful, but
*  WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
*  General Public License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with this program; if not, write to the Free Software Foundation,
*  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*  In addition, as a special exception, the author gives permission to
*  link the code of this program with the Half-Life Game Engine ("HL
*  Engine") and Modified Game Libraries ("MODs") developed by Valve,
*  L.L.C ("Valve"). You must obey the GNU General Public License in all
*  respects for all of the code used other than the HL Engine and MODs
*  from Valve. If you modify this file, you may extend this exception
*  to your version of the file, but you are not obligated to do so. If
*  you do not wish to do so, delete this exception statement from your
*  version.
*/

#include <amxmodx>
#include <amxmisc>

new g_msgChannel

#define MAX_CLR 10

new g_Colors[MAX_CLR][] = {"COL_WHITE", "COL_RED", "COL_GREEN", "COL_BLUE", "COL_YELLOW", "COL_MAGENTA", "COL_CYAN", "COL_ORANGE", "COL_OCEAN", "COL_MAROON"}
new g_Values[MAX_CLR][] = {{255, 255, 255}, {255, 0, 0}, {0, 255, 0}, {0, 0, 255}, {255, 255, 0}, {255, 0, 255}, {0, 255, 255}, {227, 96, 8}, {45, 89, 116}, {103, 44, 38}}
new Float:g_Pos[4][] = {{0.0, 0.0}, {0.05, 0.55}, {-1.0, 0.2}, {-1.0, 0.7}}

new amx_show_activity, amx_namegreen;

new g_msgSayText

public plugin_init()
{
   register_plugin("Admin Chat", AMXX_VERSION_STR, "AMXX Dev Team")
   register_dictionary("adminchatgreen.txt")
   register_dictionary("common.txt")
   register_clcmd("say", "cmdSayChat", ADMIN_CHAT, "@[@|@|@][w|r|g|b|y|m|c]<text> - displays hud message")
   register_clcmd("say_team", "cmdSayAdmin", 0, "@<text> - displays message to admins")
   register_concmd("amx_say", "cmdSay", ADMIN_CHAT, "<message> - sends message to all players")
   register_concmd("amx_chat", "cmdChat", ADMIN_CHAT, "<message> - sends message to admins")
   register_concmd("amx_psay", "cmdPsay", ADMIN_CHAT, "<name or #userid> <message> - sends private message")
   register_concmd("amx_tsay", "cmdTsay", ADMIN_CHAT, "<color> <message> - sends left side hud message to all players")
   register_concmd("amx_csay", "cmdTsay", ADMIN_CHAT, "<color> <message> - sends center hud message to all players")
   
   amx_show_activity = get_cvar_pointer("amx_show_activity");
   
   if (amx_show_activity == 0)
   {
      amx_show_activity = register_cvar("amx_show_activity", "2");
   }
   
   amx_namegreen = register_cvar("amx_namegreen", "0");
   g_msgSayText = get_user_msgid("SayText");
}

public cmdSayChat(id)
{
   if (!access(id, ADMIN_CHAT))
   {
      return PLUGIN_CONTINUE
   }
   
   new said[6], i = 0
   read_argv(1, said, 5)
   
   while (said[i] == '@')
   {
      i++
   }

   new message[192], name[32]
   read_args(message, 191)
   get_user_name(id, name, 31)
   remove_quotes(message)
   if (!i || i > 3)
   {
      if(!(get_pcvar_num(amx_namegreen)) ) return PLUGIN_CONTINUE
      new players[32], inum, player
      get_players(players, inum)
      if(is_user_alive(id))
         format(message, 191, "^4%s ^3:  ^1%s", name, message)
      else
         format(message, 191, "^1*DEAD* ^4%s ^3:  ^1%s", name, message)
      for(new j = 0; j < inum; ++j) {
         player = players[j]
         ColorChat(player, id, message)
      }
      return PLUGIN_HANDLED_MAIN
   }

   new a = 0
   switch (said[i])
   {
      case 'r': a = 1
      case 'g': a = 2
      case 'b': a = 3
      case 'y': a = 4
      case 'm': a = 5
      case 'c': a = 6
      case 'o': a = 7
   }
   
   new n, s = i
   if (a)
   {
      n++
      s++
   }
   while (said[s] && isspace(said[s]))
   {
      n++
      s++
   }
   

   new authid[32], userid
   
   get_user_authid(id, authid, 31)
   userid = get_user_userid(id)
   
   log_amx("Chat: ^"%s<%d><%s><>^" tsay ^"%s^"", name, userid, authid, message[i + n])
   log_message("^"%s<%d><%s><>^" triggered ^"amx_tsay^" (text ^"%s^") (color ^"%L^")", name, userid, authid, message[i + n], "en", g_Colors[a])
   
   if (++g_msgChannel > 6 || g_msgChannel < 3)
   {
      g_msgChannel = 3
   }
   
   new Float:verpos = g_Pos[i][1] + float(g_msgChannel) / 35.0
   
   set_hudmessage(g_Values[a][0], g_Values[a][1], g_Values[a][2], g_Pos[i][0], verpos, 0, 6.0, 6.0, 0.5, 0.15, -1)

   switch ( get_pcvar_num(amx_show_activity) )
   {
      case 3, 4:
      {
         new maxpl = get_maxplayers();
         for (new pl = 1; pl <= maxpl; pl++)
         {
            if (is_user_connected(pl) && !is_user_bot(pl))
            {
               if (is_user_admin(pl))
               {
                  show_hudmessage(pl, "%s :   %s", name, message[i + n])
                  client_print(pl, print_notify, "%s :   %s", name, message[i + n])
               }
               else
               {
                  show_hudmessage(pl, "%s", message[i + n])
                  client_print(pl, print_notify, "%s", message[i + n])
               }
            }
         }
      }
      case 2:
      {
         show_hudmessage(0, "%s :   %s", name, message[i + n])
         client_print(0, print_notify, "%s :   %s", name, message[i + n])
      }
      default:
      {
         show_hudmessage(0, "%s", message[i + n])
         client_print(0, print_notify, "%s", message[i + n])
      }
   }
   if(a==1) {
      client_cmd(0, "spk ^"vox/warning _comma message from administration^"")
   }

   return PLUGIN_HANDLED
}

public cmdSayAdmin(id)
{
   new said[2]
   read_argv(1, said, 1)
   
   if (said[0] != '@')
      return PLUGIN_CONTINUE
   
   new message[192], name[32], authid[32], userid
   new players[32], inum, player
   
   read_args(message, 191)
   remove_quotes(message)
   get_user_authid(id, authid, 31)
   get_user_name(id, name, 31)
   userid = get_user_userid(id)
   
   log_amx("Chat: ^"%s<%d><%s><>^" chat ^"%s^"", name, userid, authid, message[1])
   log_message("^"%s<%d><%s><>^" triggered ^"amx_chat^" (text ^"%s^")", name, userid, authid, message[1])
   
   if (is_user_admin(id))
      format(message, 191, "^4(%L) ^3%s ^4:  ^1%s", id, "ADMIN", name, message[1])
   else
      format(message, 191, "^4(%L) ^3%s ^4:  ^1%s", id, "PLAYER", name, message[1])

   get_players(players, inum)
   
   for (new i = 0; i < inum; ++i)
   {
      player = players[i]
      if (get_user_flags(player) & ADMIN_CHAT || player == id)
      {
         ColorChat(player, id, message)
      }
   }   
   return PLUGIN_HANDLED
}

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

   new message[192], name[32], players[32], inum, authid[32], userid, player
   
   read_args(message, 191)
   remove_quotes(message)
   get_user_authid(id, authid, 31)
   get_user_name(id, name, 31)
   userid = get_user_userid(id)
   get_players(players, inum)
   
   log_amx("Chat: ^"%s<%d><%s><>^" chat ^"%s^"", name, userid, authid, message)
   log_message("^"%s<%d><%s><>^" triggered ^"amx_chat^" (text ^"%s^")", name, userid, authid, message)
   
   format(message, 191, "^4(ADMINS) ^3%s ^4:  ^1%s", name, message)
   console_print(id, "%s", message)
   
   for (new i = 0; i < inum; ++i)
   {
      player = players[i]
      if (access(players[i], ADMIN_CHAT))
      {
         ColorChat(player, id, message)
      }
   }
   return PLUGIN_HANDLED
}

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

   new message[192], name[32], authid[32], userid
   
   read_args(message, 191)
   remove_quotes(message)
   get_user_authid(id, authid, 31)
   get_user_name(id, name, 31)
   userid = get_user_userid(id)

   console_print(id, "(ALL) %s : %s",name, message)

   log_amx("Chat: ^"%s<%d><%s><>^" say ^"%s^"", name, userid, authid, message)
   log_message("^"%s<%d><%s><>^" triggered ^"amx_say^" (text ^"%s^")", name, userid, authid, message)

   new colored[192]
   

   new players[32], inum, player
   get_players(players, inum)

   for (new i = 0; i < inum; i++)
   {
      player = players[i]
      switch(get_pcvar_num(amx_show_activity))
      {
         case 3, 4:
         {
            if(is_user_admin(player)){
               formatex(colored,191,"^1(ALL) ^4 ADMIN ^3%s ^1:  %s",  name, message)
            }else{
               formatex(colored,191,"^1(ALL) ^4 ADMIN ^1:  %s",  message)
            }
         }
         case 2:formatex(colored,191,"^1(ALL) ^4 ADMIN ^3%s ^1:  %s", name, message)
         default :formatex(colored,191,"^1(ALL) ^4 ADMIN ^1:  %s", message)
      }
      ColorChat(player, id, colored)
   }
   return PLUGIN_HANDLED
}

public cmdPsay(id, level, cid)
{
   if (!cmd_access(id, level, cid, 3))
      return PLUGIN_HANDLED
   
   new name[32]
   read_argv(1, name, 31)
   new priv = cmd_target(id, name, 0)

   if (!priv)
      return PLUGIN_HANDLED
   
   new length = strlen(name) + 1

   get_user_name(priv, name, 31);
   
   new message[192], name2[32], authid[32], authid2[32], userid, userid2
   
   get_user_authid(id, authid, 31)
   get_user_name(id, name2, 31)
   userid = get_user_userid(id)
   read_args(message, 191)
   
   if (message[0] == '"' && message[length] == '"') // HLSW fix
   {
      message[0] = ' '
      message[length] = ' '
      length += 2
   }
   
   remove_quotes(message[length])
   get_user_name(priv, name, 31)
   new colored[192]
   formatex(colored,191,"^1(^4%s^1) ^4%s ^1:  %s", name, name2, message[length])
   if (id && id != priv)
   {
      ColorChat(id, id, colored)
   }
   ColorChat(priv, id, colored)

   console_print(id, "(%s) %s :   %s", name, name2, message[length])
   get_user_authid(priv, authid2, 31)
   userid2 = get_user_userid(priv)
   
   log_amx("Chat: ^"%s<%d><%s><>^" psay ^"%s<%d><%s><>^" ^"%s^"", name2, userid, authid, name, userid2, authid2, message[length])
   log_message("^"%s<%d><%s><>^" triggered ^"amx_psay^" against ^"%s<%d><%s><>^" (text ^"%s^")", name2, userid, authid, name, userid2, authid2, message[length])
   
   return PLUGIN_HANDLED
}

public cmdTsay(id, level, cid)
{
   if (!cmd_access(id, level, cid, 3))
      return PLUGIN_HANDLED
   
   new cmd[16], color[16], color2[16], message[192], name[32], authid[32], userid = 0
   
   read_argv(0, cmd, 15)
   new bool:tsay = (tolower(cmd[4]) == 't')
   
   read_args(message, 191)
   remove_quotes(message)
   parse(message, color, 15)
   
   new found = 0, a = 0
   new lang[3], langnum = get_langsnum()

   for (new i = 0; i < MAX_CLR; ++i)
   {
      for (new j = 0; j < langnum; j++)
      {
         get_lang(j, lang)
         format(color2, 15, "%L", lang, g_Colors[i])
         
         if (equali(color, color2))
         {
            a = i
            found = 1
            break
         }
      }
      if (found == 1)
         break
   }
   
   new length = found ? (strlen(color) + 1) : 0
   
   if (++g_msgChannel > 6 || g_msgChannel < 3)
      g_msgChannel = 3

   new Float:verpos = (tsay ? 0.55 : 0.1) + float(g_msgChannel) / 35.0
   
   get_user_authid(id, authid, 31)
   get_user_name(id, name, 31)
   userid = get_user_userid(id)
   set_hudmessage(g_Values[a][0], g_Values[a][1], g_Values[a][2], tsay ? 0.05 : -1.0, verpos, 0, 6.0, 6.0, 0.5, 0.15, -1)

   switch ( get_pcvar_num(amx_show_activity) )
   {
      case 3, 4:
      {
         new maxpl = get_maxplayers();
         for (new pl = 1; pl <= maxpl; pl++)
         {
            if (is_user_connected(pl) && !is_user_bot(pl))
            {
               if (is_user_admin(pl))
               {
                  show_hudmessage(pl, "%s :   %s", name, message[length])
                  client_print(pl, print_notify, "%s :   %s", name, message[length])
               }
               else
               {
                  show_hudmessage(pl, "%s", message[length])
                  client_print(pl, print_notify, "%s", message[length])
               }
            }
         }
         console_print(id, "%s :  %s", name, message[length])
      }
      case 2:
      {
         show_hudmessage(0, "%s :   %s", name, message[length])
         client_print(0, print_notify, "%s :   %s", name, message[length])
         console_print(id, "%s :  %s", name, message[length])
      }
      default:
      {
         show_hudmessage(0, "%s", message[length])
         client_print(0, print_notify, "%s", message[length])
         console_print(id, "%s", message[length])
      }
   }

   if(a==1) {
      client_cmd(0, "spk ^"vox/warning _period message from administration^"")
   }

   log_amx("Chat: ^"%s<%d><%s><>^" %s ^"%s^"", name, userid, authid, cmd[4], message[length])
   log_message("^"%s<%d><%s><>^" triggered ^"%s^" (text ^"%s^") (color ^"%s^")", name, userid, authid, cmd, message[length], color2)

   return PLUGIN_HANDLED
}

ColorChat(id, iSender, fmt[], any:...)
{
   new szMsg[192]
   szMsg[0] = 0x04
   vformat(szMsg[1], charsmax(szMsg)-1, fmt, 4)

   if( !iSender )
   {
      iSender = 1
   }

   message_begin(id ? MSG_ONE : MSG_ALL, g_msgSayText, _, id)
   {
      write_byte(iSender)
      write_string(szMsg)
   }
   message_end()
}

_________________
Stick with the best & regards Adryyy .


x , daNzeT , Arion , Chaos , Exolent , aNNakin , PoSiTiOn Of PoWeR , ExoTiQ , -UnQ- UHD , ViciousVixen , Arkshine , Askhanar , KronoS eXtream , alkaline , CryWolf , Fuffy , tre3fla , Rap^ , Hades Ownage , xPaw .


09 Jan 2019 19:36
Profile multumesc ICQ YIM
Online
Membru, skill +1
Membru, skill +1
User avatar

Joined: 21 Jul 2016 13:58
Posts: 186
Location: Ploiesti
Detinator Steam: Da
CS Status: Activ
Detinator server CS: Cs.Pro-League.Ro
SteamID: STEAM_0:0:47999435
Reputatie: Membru Club eXtreamCS (10 Mar - 10 Apr)
Fond eXtream: 0
Mersi mult !!!


10 Jan 2019 14:07
Profile multumesc ICQ YIM WWW
Display posts from previous:  Sort by  
Reply to topic   [ 11 posts ] 

Who is online

Users browsing this forum: L1oN98, magister, Majestic-12 [Bot] and 34 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  

În cazul în care aveți probleme cu contul trimiteți un email sau mesaj la servicii_extream[arond]yahoo[punct]com

Powered by phpBB® Forum Software © phpBB Group