Existing user? Sign in
Sign up
Games
Servers
Useful
User
Pass
2FA
[rezolvat]Cerere reparare #2
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Plugins - Help / Support
Author
Message
961
Codrin Bradea
[Mentally Stable]
Status: Offline
(since 30-03-2015 15:58)
Joined: 01 Sep 2014
Posts: 63
,
Topics: 30
Location:
Oradea
Reputation:
-84.9
Votes
: 6
Posted: 08-03-2015, 11:37:00
| Translate post to:
... (
Click for more languages
)
Salut as vrea sa-mi reparati va rog acest plugin TAG.
@Edutz // @Happy=]]
Spoiler:
#include <amxmodx>
#include <amxmisc>
#include <nvault>
#include <colorchat>
#include <cstrike>
#define PLUGIN "Custom Player Tags"
#define AUTHOR "thony"
#define VERSION "4.0"
#define ADMIN_ACCESS ADMIN_RCON
new g_TagDisabled[33];
new nVault;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("amx_tag", "tag_player", ADMIN_ACCESS, "< partial player name > < tag > - Adds a tag to a player")
register_clcmd("amx_untag", "untag_player", ADMIN_ACCESS)
register_clcmd("amx_tagflag", "tag_flags", ADMIN_ACCESS, "< flags > < tag > - Adds a tag to the specified flags")
register_clcmd("amx_tagflag", "untag_flags", ADMIN_ACCESS)
register_clcmd("amx_untagall", "untag_all", ADMIN_ACCESS)
register_clcmd("amx_viewflag", "viewflags", ADMIN_ACCESS, "< partial player name > - Gets that player flags")
register_clcmd("say", "cmd_say")
register_clcmd("say_team", "cmd_say")
register_clcmd("toggleflag", "toggleflag", .info = " - Enables / Disables your flag")
nVault = nvault_open("CustomPlayerTags")
}
public toggleflag(id) {
if(get_user_flags(id) & ADMIN_BAN || get_user_flags(id) & ADMIN_KICK) {
if(g_TagDisabled[id]) {
g_TagDisabled[id] = false;
console_print(id, "[JB.---.RO] Tagul tau este OFF.")
}
else {
g_TagDisabled[id] = true;
console_print(id, "[JB.---.RO] Tagul tau este ON.")
}
}
}
public cmd_say(id) {
if(g_TagDisabled[id]) return PLUGIN_CONTINUE;
static szType[8], szMsg[234], szTag[34], szAuthID[34]
read_argv(0, szType, charsmax(szType))
read_argv(1, szMsg, charsmax(szMsg))
get_user_authid(id, szAuthID, charsmax(szAuthID))
if(szMsg[0] == '@' || szMsg[0] == '/' || szMsg[0] == '!' || equal(szMsg, ""))
return PLUGIN_HANDLED_MAIN;
static data
data = nvault_get(nVault, szAuthID, szTag, charsmax(szTag))
if(data) {
if(szType[3])
say_team(id, szMsg, szTag)
else
say(id, szMsg, szTag)
return PLUGIN_HANDLED_MAIN;
}
else {
static flags, szflags[36]
flags = get_user_flags(id);
get_flags(flags, szflags, charsmax(szflags))
data = nvault_get(nVault, szflags, szTag, charsmax(szTag))
if(data) {
if(szType[3])
say_team(id, szMsg, szTag)
else
say(id, szMsg, szTag)
return PLUGIN_HANDLED_MAIN;
}
}
return PLUGIN_CONTINUE;
}
say_team(id, const message[], const tag[]) {
new CsTeams:team = cs_get_user_team(id);
new alive = is_user_alive(id);
new name[36], teamstring[11]
get_user_name(id, name, charsmax(name))
switch(team) {
case CS_TEAM_CT: teamstring = "CTs"
case CS_TEAM_T: teamstring = "Terrorists"
default: teamstring = "Spectators"
}
new players[32], num;
get_players(players, num)
for ( new i; i < num; i++) {
if(cs_get_user_team(players[i]) == team
|| cs_get_user_team(players[i]) == CS_TEAM_UNASSIGNED && team == CS_TEAM_SPECTATOR
|| cs_get_user_team(players[i]) == CS_TEAM_SPECTATOR && team == CS_TEAM_UNASSIGNED)
{
if(is_user_alive(players[i]) && alive)
client_print_color(players[i], DontChange, "^1(%s) ^4[%s]^3 %s^1 : %s", teamstring, tag, name, message)
else if(!is_user_alive(players[i]) && !alive)
client_print_color(players[i], DontChange, "^1*DEAD* (%s) ^4[%s]^3 %s^1 : %s", teamstring, tag, name, message)
}
}
}
say(id, const message[], const tag[]) {
new alive = is_user_alive(id);
new name[36]
get_user_name(id, name, charsmax(name))
new players[32], num;
get_players(players, num)
for ( new i; i < num; i++) {
if(is_user_alive(players[i]) && alive)
client_print_color(players[i], DontChange, "^4[%s]^3 %s^1 : %s", tag, name, message)
else if(!is_user_alive(players[i]) && !alive)
client_print_color(players[i], DontChange, "^1*DEAD* ^4[%s]^3 %s^1 : %s", tag, name, message)
}
}
public tag_player(id, level, cid) {
if(!cmd_access(id, level, cid, 2)) return PLUGIN_HANDLED;
new name[32]
read_argv(1, name, charsmax(name))
new player = cmd_target(id, name, CMDTARGET_ALLOW_SELF)
if(!player) return PLUGIN_HANDLED;
new tag[32]
read_argv(2, tag, charsmax(tag))
new authid[32]
get_user_authid(player, authid, charsmax(authid))
nvault_set(nVault, authid, tag)
console_print(id, "[JB.----.RO] I-ai pus tag playerului.")
return PLUGIN_HANDLED;
}
public untag_player(id, level, cid) {
if(!cmd_access(id, level, cid, 2)) return PLUGIN_HANDLED;
new name[32]
read_argv(1, name, charsmax(name))
new player = cmd_target(id, name, CMDTARGET_ALLOW_SELF)
if(!player) return PLUGIN_HANDLED;
new tag[32]
read_argv(2, tag, charsmax(tag))
new authid[32]
get_user_authid(player, authid, charsmax(authid))
new success = nvault_get(nVault, authid)
if(success) {
console_print(id, "[JB.---.RO] Tagul acelui player a fost sters!.")
nvault_remove(nVault, authid)
}
else
console_print(id, "[JB.---.RO] Acest player nu are flag.")
return PLUGIN_HANDLED;
}
public tag_flags(id, level, cid) {
if(!cmd_access(id, level, cid, 2)) return PLUGIN_HANDLED;
new szflags[32]
read_argv(1, szflags, charsmax(szflags))
// i know this part seems stupid... but it's just to organize flags
new flags = read_flags(szflags)
get_flags(flags, szflags, charsmax(szflags))
new tag[32]
read_argv(2, tag, charsmax(tag))
nvault_set(nVault, szflags, tag)
console_print(id, "[CPT] Tag added to players with flags: %s", szflags)
return PLUGIN_HANDLED;
}
public untag_flags(id, level, cid) {
if(!cmd_access(id, level, cid, 2)) return PLUGIN_HANDLED;
new szflags[32]
read_argv(1, szflags, charsmax(szflags))
// i know this part seems stupid... but it's just to organize flags
new flags = read_flags(szflags)
get_flags(flags, szflags, charsmax(szflags))
new success = nvault_get(nVault, szflags)
if(success) {
console_print(id, "[JB.---.RO] Tagul acelui player a fost sters!.")
nvault_remove(nVault, szflags)
}
else
console_print(id, "[JB.---.RO] Acest player nu are flag.")
return PLUGIN_HANDLED;
}
public untag_all(id, level, cid) {
if(!cmd_access(id, level, cid, 1)) return PLUGIN_HANDLED;
client_print(id, print_console, "[JB.---.RO]Toate tagurile au fost sterse!.")
nvault_prune(nVault , 0 , get_systime());
return PLUGIN_HANDLED;
}
public viewflags(id, level, cid) {
if(!cmd_access(id, level, cid, 1)) return PLUGIN_HANDLED;
new name[32]
read_argv(1, name, charsmax(name))
new player = cmd_target(id, name, CMDTARGET_ALLOW_SELF)
if(!player) return PLUGIN_HANDLED;
static flags, szflags[36], namef[36]
flags = get_user_flags(player);
get_flags(flags, szflags, charsmax(szflags))
get_user_name(player, namef, charsmax(namef))
console_print(id, "%s has the following flags: %s", namef, szflags)
return PLUGIN_HANDLED;
}
Last edited by
Codrin Bradea
on 08-03-2015, 12:42:24; edited 1 time in total
0
0
Back to top
destroi112
[DEV]
Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042
,
Topics: 119
Location:
---------
Reputation:
515.9
Votes
: 118
Posted: 08-03-2015, 12:30:25
| Translate post to:
... (
Click for more languages
)
Sterge reclama cum trebuie te rog.Ti-l repar eu.
Retired from Amxmodx
0
0
Back to top
Codrin Bradea
[Mentally Stable]
Status: Offline
(since 30-03-2015 15:58)
Joined: 01 Sep 2014
Posts: 63
,
Topics: 30
Location:
Oradea
Reputation:
-84.9
Votes
: 6
Posted: 08-03-2015, 12:42:41
| Translate post to:
... (
Click for more languages
)
Gata.
0
0
Back to top
destroi112
[DEV]
Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042
,
Topics: 119
Location:
---------
Reputation:
515.9
Votes
: 118
Posted: 08-03-2015, 13:23:29
| Translate post to:
... (
Click for more languages
)
Gata poftim am scos inc-ul ala e nefolositor si am pus un stock pentru a colora numele si mesajul etc..
Spoiler:
#include <amxmodx>
#include <amxmisc>
#include <nvault>
#include <cstrike>
#define PLUGIN "Custom Player Tags"
#define AUTHOR "thony"
#define VERSION "4.0"
#define ADMIN_ACCESS ADMIN_RCON
new g_TagDisabled[33];
new nVault;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("amx_tag", "tag_player", ADMIN_ACCESS, "< partial player name > < tag > - Adds a tag to a player")
register_clcmd("amx_untag", "untag_player", ADMIN_ACCESS)
register_clcmd("amx_tagflag", "tag_flags", ADMIN_ACCESS, "< flags > < tag > - Adds a tag to the specified flags")
register_clcmd("amx_tagflag", "untag_flags", ADMIN_ACCESS)
register_clcmd("amx_untagall", "untag_all", ADMIN_ACCESS)
register_clcmd("amx_viewflag", "viewflags", ADMIN_ACCESS, "< partial player name > - Gets that player flags")
register_clcmd("say", "cmd_say")
register_clcmd("say_team", "cmd_say")
register_clcmd("toggleflag", "toggleflag", .info = " - Enables / Disables your flag")
nVault = nvault_open("CustomPlayerTags")
}
public toggleflag(id) {
if(get_user_flags(id) & ADMIN_BAN || get_user_flags(id) & ADMIN_KICK) {
if(g_TagDisabled[id]) {
g_TagDisabled[id] = false;
console_print(id, "[FARA.RECLAME] Tagul tau este OFF.")
}
else {
g_TagDisabled[id] = true;
console_print(id, "[FARA.RECLAME] Tagul tau este ON.")
}
}
}
public cmd_say(id) {
if(g_TagDisabled[id]) return PLUGIN_CONTINUE;
static szType[8], szMsg[234], szTag[34], szAuthID[34]
read_argv(0, szType, charsmax(szType))
read_argv(1, szMsg, charsmax(szMsg))
get_user_authid(id, szAuthID, charsmax(szAuthID))
if(szMsg[0] == '@' || szMsg[0] == '/' || szMsg[0] == '!' || equal(szMsg, ""))
return PLUGIN_HANDLED_MAIN;
static data
data = nvault_get(nVault, szAuthID, szTag, charsmax(szTag))
if(data) {
if(szType[3])
say_team(id, szMsg, szTag)
else
say(id, szMsg, szTag)
return PLUGIN_HANDLED_MAIN;
}
else {
static flags, szflags[36]
flags = get_user_flags(id);
get_flags(flags, szflags, charsmax(szflags))
data = nvault_get(nVault, szflags, szTag, charsmax(szTag))
if(data) {
if(szType[3])
say_team(id, szMsg, szTag)
else
say(id, szMsg, szTag)
return PLUGIN_HANDLED_MAIN;
}
}
return PLUGIN_CONTINUE;
}
say_team(id, const message[], const tag[]) {
new CsTeams:team = cs_get_user_team(id);
new alive = is_user_alive(id);
new name[36], teamstring[11]
get_user_name(id, name, charsmax(name))
switch(team) {
case CS_TEAM_CT: teamstring = "CTs"
case CS_TEAM_T: teamstring = "Terrorists"
default: teamstring = "Spectators"
}
new players[32], num;
get_players(players, num)
for ( new i; i < num; i++) {
if(cs_get_user_team(players[i]) == team
|| cs_get_user_team(players[i]) == CS_TEAM_UNASSIGNED && team == CS_TEAM_SPECTATOR
|| cs_get_user_team(players[i]) == CS_TEAM_SPECTATOR && team == CS_TEAM_UNASSIGNED)
{
if(is_user_alive(players[i]) && alive)
ChatColor(players[i],"!team(%s) !g[%s]!team %s !g : %s", teamstring, tag, name, message)
else if(!is_user_alive(players[i]) && !alive)
ChatColor(players[i],"!y*MORT*!team(%s) !g[%s]!team %s !g : %s", teamstring, tag, name, message)
}
}
}
say(id, const message[], const tag[]) {
new alive = is_user_alive(id);
new name[36]
get_user_name(id, name, charsmax(name))
new players[32], num;
get_players(players, num)
for ( new i; i < num; i++) {
if(is_user_alive(players[i]) && alive)
ChatColor(players[i],"!g[%s]!team %s !g: %s",tag, name, message)
else if(!is_user_alive(players[i]) && !alive)
ChatColor(players[i],"!y*MORT*!g[%s]!team %s !g: %s",tag, name, message)
}
}
public tag_player(id, level, cid) {
if(!cmd_access(id, level, cid, 2)) return PLUGIN_HANDLED;
new name[32]
read_argv(1, name, charsmax(name))
new player = cmd_target(id, name, CMDTARGET_ALLOW_SELF)
if(!player) return PLUGIN_HANDLED;
new tag[32]
read_argv(2, tag, charsmax(tag))
new authid[32]
get_user_authid(player, authid, charsmax(authid))
nvault_set(nVault, authid, tag)
console_print(id, "[FARA.RECLAME] I-ai pus tag playerului.")
return PLUGIN_HANDLED;
}
public untag_player(id, level, cid) {
if(!cmd_access(id, level, cid, 2)) return PLUGIN_HANDLED;
new name[32]
read_argv(1, name, charsmax(name))
new player = cmd_target(id, name, CMDTARGET_ALLOW_SELF)
if(!player) return PLUGIN_HANDLED;
new tag[32]
read_argv(2, tag, charsmax(tag))
new authid[32]
get_user_authid(player, authid, charsmax(authid))
new success = nvault_get(nVault, authid)
if(success) {
console_print(id, "[FARA.RECLAME] Tagul acelui player a fost sters!.")
nvault_remove(nVault, authid)
}
else
console_print(id, "[FARA.RECLAME] Acest player nu are flag.")
return PLUGIN_HANDLED;
}
public tag_flags(id, level, cid) {
if(!cmd_access(id, level, cid, 2)) return PLUGIN_HANDLED;
new szflags[32]
read_argv(1, szflags, charsmax(szflags))
// i know this part seems stupid... but it's just to organize flags
new flags = read_flags(szflags)
get_flags(flags, szflags, charsmax(szflags))
new tag[32]
read_argv(2, tag, charsmax(tag))
nvault_set(nVault, szflags, tag)
console_print(id, "[CPT] Tag added to players with flags: %s", szflags)
return PLUGIN_HANDLED;
}
public untag_flags(id, level, cid) {
if(!cmd_access(id, level, cid, 2)) return PLUGIN_HANDLED;
new szflags[32]
read_argv(1, szflags, charsmax(szflags))
// i know this part seems stupid... but it's just to organize flags
new flags = read_flags(szflags)
get_flags(flags, szflags, charsmax(szflags))
new success = nvault_get(nVault, szflags)
if(success) {
console_print(id, "[FARA.RECLAME] Tagul acelui player a fost sters!.")
nvault_remove(nVault, szflags)
}
else
console_print(id, "[FARA.RECLAME] Acest player nu are flag.")
return PLUGIN_HANDLED;
}
public untag_all(id, level, cid) {
if(!cmd_access(id, level, cid, 1)) return PLUGIN_HANDLED;
client_print(id, print_console, "[FARA.RECLAME] Toate tagurile au fost sterse!.")
nvault_prune(nVault , 0 , get_systime());
return PLUGIN_HANDLED;
}
public viewflags(id, level, cid) {
if(!cmd_access(id, level, cid, 1)) return PLUGIN_HANDLED;
new name[32]
read_argv(1, name, charsmax(name))
new player = cmd_target(id, name, CMDTARGET_ALLOW_SELF)
if(!player) return PLUGIN_HANDLED;
static flags, szflags[36], namef[36]
flags = get_user_flags(player);
get_flags(flags, szflags, charsmax(szflags))
get_user_name(player, namef, charsmax(namef))
console_print(id, "%s has the following flags: %s", namef, szflags)
return PLUGIN_HANDLED;
}
//stock
stock ChatColor(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)
replace_all(msg, 190, "!g", "^4")
replace_all(msg, 190, "!y", "^1")
replace_all(msg, 190, "!team", "^3")
if (id) players[0] = id; else get_players(players, count, "ch")
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}
PS:Nu mai deschide casuta vocala a unor persoane .O sa raspunda cineva pana la urma.
Retired from Amxmodx
1
0
Back to top
Codrin Bradea
[Mentally Stable]
Status: Offline
(since 30-03-2015 15:58)
Joined: 01 Sep 2014
Posts: 63
,
Topics: 30
Location:
Oradea
Reputation:
-84.9
Votes
: 6
Posted: 08-03-2015, 13:49:54
| Translate post to:
... (
Click for more languages
)
Multumesc.
0
0
Back to top
Topic locked
Topic is closed, you cannot post any messages in it anymore
Locked by
-P!C@-
, 08 March 2015 16:27
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Plugins - Help / Support
The time now is 30-07-2025, 13:19:07
Copyright info
Based on phpBB
ro
/
com
B
Login
I forgot my password
World of Warcraft
Login for more...
Download WoW 7.3.5
Misc
eSports
Achievements
Buy reputation with votes
Reputation trades
Forum rules
Ban list
Members list
User guide (FAQ)
World of Warcraft
View details