oyunculara tag
Moderatör: Moderatörler
-
Konu Sahibi - Mesajlar: 155
- Kayıt: Cum Ağu 13, 2021 8:56 pm
- Konum: Azerbeycan
- Server Ip/DNS: 147.185.221.16:26504
oyunculara tag
Bu konuda yardimci ola bilirm. instagram ve ya discord adresini vere bilirsin
Link: | |
Linklerini gizle |
-
Konu Sahibi - Mesajlar: 155
- Kayıt: Cum Ağu 13, 2021 8:56 pm
- Konum: Azerbeycan
- Server Ip/DNS: 147.185.221.16:26504
oyunculara tag
Kod: Tümünü seç
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#define PLUGIN "Tags"
#define VERSION "1.0"
#define AUTHOR "HakimKILLER44"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say", "clcmd_say")
register_clcmd("say_team", "clcmd_say")
}
public clcmd_say(id)
{
if (!is_user_connected(id))
return PLUGIN_HANDLED_MAIN
new typed[192], name[32], prefix[128]
get_user_name(id, name, charsmax(name))
read_args(typed, charsmax(typed))
remove_quotes(typed)
trim(typed)
if (equal(typed, "") || !is_user_connected(id))
return PLUGIN_HANDLED_MAIN
// Buralari duzenleye bilirsin
if (is_user_admin(id))
prefix = "Yonetici"
else
prefix = "Oyuncu"
for (new i = 1; i <= get_maxplayers(); i++)
{
if (!is_user_connected(i))
continue
if (cs_get_user_team(id) == CS_TEAM_CT) // polis rengi
color_print(i, "!g[%s]!n !t%s!n : %s", prefix, name, typed)
else if (cs_get_user_team(id) == CS_TEAM_T) // terror rengi
color_print(i, "!g[%s]!n !y%s!n : %s", prefix, name, typed)
else if (cs_get_user_team(id) == CS_TEAM_SPECTATOR) // izleyici rengi
color_print(i, "!g[%s]!n !d%s!n : %s", prefix, name, typed)
}
return PLUGIN_HANDLED_MAIN
}
// Stock: Color Print
stock color_print(index, const text[], any:...)
{
new const teams[][] = {"", "TERRORIST", "CT", "SPECTATOR"}
new msg[128], main_team, team[100]
vformat(msg, charsmax(msg), text, 3)
if (containi(msg, "!t") != -1)
team = "CT"
else if (containi(msg, "!y") != -1)
team = "TERRORIST"
else if (containi(msg, "!d") != -1)
team = "SPECTATOR"
replace_all(msg, charsmax(msg), "!g", "^x04")
replace_all(msg, charsmax(msg), "!n", "^x01")
replace_all(msg, charsmax(msg), "!t", "^x03")
replace_all(msg, charsmax(msg), "!y", "^x03")
replace_all(msg, charsmax(msg), "!d", "^x03")
if (index == 0)
{
for (new id = 1; id <= get_maxplayers(); id++)
{
if (!is_user_connected(id))
continue
main_team = get_user_team(id)
team_info(id, MSG_ONE, team)
show_color_message(id, MSG_ONE, msg)
team_info(id, MSG_ONE, teams[main_team])
}
}
else
{
main_team = get_user_team(index)
team_info(index, MSG_ONE, team)
show_color_message(index, MSG_ONE, msg)
team_info(index, MSG_ONE, teams[main_team])
}
}
// Stock: Show Color Message
stock show_color_message(id, type, message[])
{
new bool:saytext_used, get_user_msgid_saytext
if (!saytext_used)
{
get_user_msgid_saytext = get_user_msgid("SayText")
saytext_used = true
}
message_begin(type, get_user_msgid_saytext, _, id)
write_byte(id)
write_string(message)
message_end()
}
// Stock: Team Info
stock team_info(id, type, team[])
{
new bool:teaminfo_used, get_user_msgid_teaminfo
if (!teaminfo_used)
{
get_user_msgid_teaminfo = get_user_msgid("TeamInfo")
teaminfo_used = true
}
message_begin(type, get_user_msgid_teaminfo, _, id)
write_byte(id)
write_string(team)
message_end()
}
Link: | |
Linklerini gizle |