Kod:
#include <amxmodx>
new const ses[] = { "aleykumselam.wav" }
new const TAG[] = "[Aquasis Gaming]: "
public plugin_init() register_clcmd("say","HookSay");
public plugin_precache() precache_sound(ses)
public HookSay(id) {
new szSaid[128]; read_args(szSaid,charsmax(szSaid))
remove_quotes(szSaid)
formatex(szSaid,charsmax(szSaid),"%s ",szSaid)
if((szSaid[0] == 's' && szSaid[1] == 'a' && szSaid[2] == ' ') ||
(szSaid[0] == 's' && szSaid[1] == '.' && szSaid[2] == 'a') ||
(szSaid[0] == 's' && szSaid[1] == 'e' && szSaid[2] == 'l' && szSaid[3] == 'a' && szSaid[4] == 'm')) {
set_task(1.0,"yonlendir",id)
}
return PLUGIN_CONTINUE;
}
public yonlendir(id) emit_sound(id, CHAN_AUTO, ses, VOL_NORM, ATTN_NORM , 0, PITCH_NORM) ,Renkli_Yazi(id, "^3%s ^4Aleykum Selam.",TAG);
stock Renkli_Yazi(const id, const input[], any:...)
{
new Count = 1, Players[MAX_CLIENTS];
static Message[191];
vformat(Message, 190, input, 3);
/* ^1 | ^x01 --> Default - Yellow - Sarı */
/* ^4 | ^x04 --> Green - Yeşil */
/* ^3 | ^x03 --> Team Color - Takım Rengi */
/* Team Color ==> T Takımında Kırmızı - CT Takımında Mavi - SPECTATOR Takımında Beyaz */
replace_all(Message, 190, "^1", "^x01");
replace_all(Message, 190, "^4", "^x04");
replace_all(Message, 190, "^3", "^x03");
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(Message);
message_end();
}
}
}
}