forked from MoeMod/BTE-AMXX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BTE_GunDropEffect.sma
50 lines (40 loc) · 1017 Bytes
/
BTE_GunDropEffect.sma
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>
#include "bte_api.inc"
#include "metahook.inc"
#include "cdll_dll.h"
#define PLUGIN "BTE GunDropEffect"
#define VERSION "1.0"
#define AUTHOR "BTE TEAM"
new gmsgTextMsg;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Touch, "weaponbox", "HamF_TouchWeapon")
RegisterHam(Ham_Touch, "armoury_entity", "HamF_TouchWeapon")
gmsgTextMsg = get_user_msgid("TextMsg");
}
public HamF_TouchWeapon(this, pOther)
{
if(is_user_alive(pOther))
ClientPrint(pOther, HUD_PRINTCENTER, "#CSO_Weapondrop_Effect_Notice");
}
stock ClientPrint(id, type, message[], str1[] = "", str2[] = "", str3[] = "", str4[] = "")
{
new dest
if (id) dest = MSG_ONE_UNRELIABLE
else dest = MSG_ALL
message_begin(dest, gmsgTextMsg, {0, 0, 0}, id)
write_byte(type)
write_string(message)
if (str1[0])
write_string(str1)
if (str2[0])
write_string(str2)
if (str3[0])
write_string(str3)
if (str4[0])
write_string(str4)
message_end()
}