|
Author
|
Message
|
|
Veteran Member
Join Date: Aug 2014
Location: Your mom house -Portugal
|

12-05-2014
, 23:26
Re: Prefix+GreenText
|
#1
|
Quote:
Originally Posted by OnePL
Why complicates your life?
PHP Code:
#include <amxmodx>
#include <vip>
new szPrefix[] = "[VIP]"; // VIP Prefix
public plugin_init() {
register_plugin("VIP Prefix", "1.0", "OnePL");
register_message(76, "PrefixSay");
}
public PrefixSay(msgId, msgDest, msgEnt) {
new id = get_msg_arg_int(1);
if(!is_user_connected(id) || !is_user_vip(id)) return 0;
new szTmp[196], szTmp2[196];
get_msg_arg_string(2, szTmp, 195);
formatex(szPrefix, 31, "^x04%s", szPrefix);
/*^x01 - normal color
^x03 - team color
^x04 - green color*/
if(!equal(szTmp, "#Cstrike_Chat_All")) {
add(szTmp2, 195, szPrefix);
add(szTmp2, 195, " ");
add(szTmp2, 195, szTmp);
} else {
add(szTmp2, 195, szPrefix);
add(szTmp2, 195, "^x03 %s1^x01 : %s2");
}
set_msg_arg_string(2, szTmp2);
return 0;
}
|
The [VIP] tag doesnt shows.
And i want it to have this:
PHP Code:
new newChannels[8][] =
{
"(Equipa-Azul) [VIP] %s1: %s2",
"(Equipa-Vermelha) [VIP] %s1: %s2",
"*Morto* (Equipa-Azul) [VIP] %s1: %s2",
"*Morto* (Equipa-Vermelha) [VIP] %s1: %s2",
"(Espectador) [VIP] %s1: %s2",
"[VIP] %s1: %s2",
"*Morto* [VIP] %s1: %s2",
"*Espectador* [VIP] %s1: %s2"
}
// = green
// = yellow
// = team color
|
|
|
|