NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

///----------------------------------------
/// The author is Ian Cammarata
/// Editors are Yek'-ta and PurposeLess
/// Optimized and Powered by PurposeLess
///----------------------------------------

#include <amxmodx>
#include <reapi_reunion>

native csd_checkuserac(id);

new alv_sndr, alv_str2[26], alv_str4[101];
new msg[200], saytext;
const TaskId = 144;

public plugin_precache()
{
saytext = get_user_msgid("SayText");
}

public plugin_init()
{
register_plugin("SteamCHAT", "1.2", "ZArchiver");

register_message(saytext, "message_saytext")
}

public message_saytext(msgid, msgdest, receiver)
{
new str2[26]
get_msg_arg_string(2, str2, charsmax(str2))

static const Cstrike_Chat[] = "#Cstrike_Chat";

if(equal(str2, Cstrike_Chat, 13))
{
new str3[22], len;
get_msg_arg_string(3, str3, charsmax(str3))
len = strlen(str3);

if(!len)
{
new str4[101]
get_msg_arg_string(4, str4, charsmax(str4))

if(str4[0] == '/' || str4[0] == '.' || str4[0] == '!')
{
return PLUGIN_HANDLED;
}

new sndr = get_msg_arg_int(1)

static const Cstrike_Chat_All[] = "#Cstrike_Chat_All";

new bool:is_team_msg = !bool:equal(str2, Cstrike_Chat_All, 17)

new sndr_team = get_user_team(sndr)
new bool:is_sndr_spec = !bool:(0 < sndr_team < 3)

new bool:same_as_last = bool:(alv_sndr == sndr && equal(alv_str2, str2) && equal(alv_str4, str4))

if(!same_as_last)
{
if(!(is_team_msg && (is_sndr_spec || is_team_msg)))
{
new flags[5], team[10]
flags = is_user_alive(sndr) ? "bc":"ac";

if(is_team_msg)
{
len = strlen(flags);
add(flags[len], charsmax(flags) - len, "e")
if(sndr_team == 1) team = "TERRORIST"
else team = "CT"
}

new players[32], num
static Uid
get_players(players, num, flags, team)
if(get_user_flags(sndr) & ADMIN_RESERVATION)
buildmsg(sndr, is_sndr_spec, is_team_msg, sndr_team, str4)
else buildmsg(sndr, is_sndr_spec, is_team_msg, sndr_team, str4)

for(new i=0; i < num; i++)
{
Uid = players[i];
if(is_user_alive(Uid) && get_user_flags(Uid) & ADMIN_RESERVATION|| !is_user_alive(Uid)){
client_print_color(Uid, sndr, msg);
//message_begin(MSG_ONE, saytext, _, Uid)
//write_byte(sndr)
//write_string(msg)
//message_end()
}
}

}

alv_sndr = sndr
alv_str2 = str2
alv_str4 = str4

if(task_exists(TaskId)) remove_task(TaskId)
set_task(0.1, "task_clear_antiloop_vars", TaskId)

}

if(!same_as_last) buildmsg(sndr, is_sndr_spec, is_team_msg, sndr_team, str4)

set_msg_arg_string(2, msg)
set_msg_arg_string(4, "")

}
}
return PLUGIN_CONTINUE
}

public buildmsg(sndr, is_sndr_spec, is_team_msg, sndr_team, str4[ ])
{
new sndr_name[33]
get_user_name(sndr, sndr_name, charsmax(sndr_name))

new prefix[30] = "^x01"

new flags = get_user_flags(sndr);

if(flags > 0 && !(flags & ADMIN_USER))
{
if(flags & ADMIN_IMMUNITY)
{
if(is_user_steam(sndr))
{
prefix = csd_checkuserac(sndr) ? "^x04[Steam+ Yonetici] ^x01":"^x04[Steam Yonetici] ^x01";
}
else
{
prefix = "^x04[Yonetici] ^x01"
}
}
else if(flags & ADMIN_KICK)
{
if(is_user_steam(sndr))
{
prefix = csd_checkuserac(sndr) ? "^x04[Steam+ Admin] ^x01":"^x04[Steam Admin] ^x01";
}
else
{
prefix = "^x04[Admin] ^x01"
}
}
else if(flags & ADMIN_RESERVATION)
{
if(is_user_steam(sndr))
{
prefix = csd_checkuserac(sndr) ? "^x04[Steam+ Slot] ^x01":"^x04[Steam Slot] ^x01";
}
else
{
prefix = "^x04[Slot] ^x01"
}
}
else if(flags & ADMIN_CVAR)
{
if(is_user_steam(sndr))
{
prefix = csd_checkuserac(sndr) ? "^x04[Steam+ Sorumlu] ^x01":"^x04[Steam Sorumlu] ^x01";
}
else
{
prefix = "^x04[Server Sorumlusu] ^x01"
}
}
}
else {
if(is_user_steam(sndr))
{
prefix = csd_checkuserac(sndr) ? "^x04[Steam+] ^x01":"^x04[Steam] ^x01";
}
}

new len = strlen(prefix);

if(is_sndr_spec) add(prefix[len], charsmax(prefix) - len, "¤")
else if(!is_user_alive(sndr)) add(prefix[len], charsmax(prefix) - len, "×")


if(is_team_msg)
{
if(is_sndr_spec) add(prefix[len], charsmax(prefix) - len, "(SPEC)")
else if(sndr_team == 1) add(prefix[len], charsmax(prefix) - len, "(TE)")
else if(sndr_team == 2) add(prefix[len], charsmax(prefix) - len, "(CT)")
}

if(flags > 0 && !(flags & ADMIN_USER))
{
format(msg, 199, "%s^x03%s : ^x04%s",
len > 1 ? prefix : "",
sndr_name, str4)

}
else{
format(msg, 199, "%s^x03%s : ^x01%s",
len > 1 ? prefix : "",
sndr_name, str4)
}
return PLUGIN_HANDLED
}

public task_clear_antiloop_vars()
{
alv_sndr = 0
alv_str2 = ""
alv_str4 = ""
return PLUGIN_HANDLED
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\ rtf1\ ansi\ deff0{\ fonttbl{\ f0\ fnil Tahoma;}}n\ viewkind4\ uc1\ pard\ lang1055\ f0\ fs16 n\ par }
*/
     
 
what is notes.io
 

Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 14 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.