2006-08-19 23:02:01 +00:00
|
|
|
/* Message Stocks
|
|
|
|
*
|
|
|
|
* by the AMX Mod X Development Team
|
|
|
|
*
|
|
|
|
* This file is provided as is (no warranties).
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#if defined _message_stocks_included
|
|
|
|
#endinput
|
|
|
|
#endif
|
|
|
|
#define _message_stocks_included
|
|
|
|
|
|
|
|
/* Creates a death message. */
|
|
|
|
stock dod_make_deathmsg(killer, victim, weaponNUM)
|
|
|
|
{
|
|
|
|
message_begin(MSG_ALL, get_user_msgid("DeathMsg"), {0,0,0}, 0);
|
|
|
|
write_byte(killer);
|
|
|
|
write_byte(victim);
|
|
|
|
write_byte(weaponNUM);
|
|
|
|
message_end();
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Kills a user without a message. */
|
|
|
|
stock user_silentkill(index)
|
|
|
|
{
|
2006-09-14 08:00:55 +00:00
|
|
|
static msgid = 0;
|
2006-09-14 08:06:08 +00:00
|
|
|
new msgblock;
|
2006-09-14 08:00:55 +00:00
|
|
|
if (!msgid)
|
|
|
|
{
|
|
|
|
msgid = get_user_msgid("DeathMsg");
|
|
|
|
}
|
|
|
|
msgblock = get_msg_block(msgid);
|
|
|
|
set_msg_block(msgid, BLOCK_ONCE);
|
2006-08-19 23:02:01 +00:00
|
|
|
user_kill(index, 1);
|
2006-09-14 08:00:55 +00:00
|
|
|
set_msg_block(msgid, msgblock);
|
2006-08-19 23:02:01 +00:00
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Creates a death message. */
|
|
|
|
stock make_deathmsg(killer, victim, headshot, weapon[])
|
|
|
|
{
|
|
|
|
message_begin(MSG_ALL, get_user_msgid("DeathMsg"), {0,0,0}, 0);
|
|
|
|
write_byte(killer);
|
|
|
|
write_byte(victim);
|
|
|
|
|
|
|
|
new mod_name[32];
|
|
|
|
get_modname(mod_name, 31);
|
|
|
|
if (equal(mod_name, "cstrike") || equal(mod_name, "czero") || equal(mod_name, "csv15") || equal(mod_name, "cs13"))
|
|
|
|
write_byte(headshot);
|
|
|
|
write_string(weapon);
|
|
|
|
message_end();
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|