Raised This Month: $ Target: $400
 0% 

[HELP] Adminchat.amxx


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
E.bo
Member
Join Date: Aug 2014
Old 02-18-2015 , 04:15   [HELP] Adminchat.amxx
Reply With Quote #1

Can someone tell me how to change the flag of tsay from " i " to " w " , i tried to change from cmdacces.ini but nothing changed again tsay flag was with flag " i "

Tsay code in adminchat.sma tell me where i can change flag :

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, g_msgChannel)

if (get_cvar_num("amx_show_activity") == 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])
} else {
show_hudmessage(0, "%s", message[length])
client_print(0, print_notify, "%s", message[length])
console_print(id, "%s", message[length])
}

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
}
E.bo is offline
Shiina.Mashiro
Senior Member
Join Date: Sep 2014
Location: Vietnam
Old 02-18-2015 , 04:27   Re: [HELP] Adminchat.amxx
Reply With Quote #2

because flag "w" don't exist.
__________________
Shiina.Mashiro is offline
E.bo
Member
Join Date: Aug 2014
Old 02-18-2015 , 04:36   Re: [HELP] Adminchat.amxx
Reply With Quote #3

Quote:
Originally Posted by Shiina.Mashiro View Post
because flag "w" don't exist.
flag w exist when ucp is enable in server . I have enabled ucp in server but still nothing happend , i must change flag in code but i cant find , and if i cant change to flag "w" no prolem , i want just to change in another flag like " l " or " w "

Last edited by E.bo; 02-18-2015 at 04:39.
E.bo is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-18-2015 , 08:43   Re: [HELP] Adminchat.amxx
Reply With Quote #4

Changing the flag in cmdaccess.ini is the appropriate method for changing the flag for the command since that is where the flag is determined to begin with. Just change the flag value in there. You can use any of the valid flags listed in users.ini except for 'u' and 'z'. You could technically use 'u' but I wouldn't recommend it.
__________________

Last edited by fysiks; 02-18-2015 at 08:43.
fysiks is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:51.


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