-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpb_weap_restr.sma
45 lines (34 loc) · 1011 Bytes
/
pb_weap_restr.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
/* AMX Mod X
* Plugin Restricting Weapons and Equipements for Podbot mm
*
* by KWo
*/
#include <amxmodx>
#include <amxmisc>
new Author[] = "KWo"
new Plugin[] = "Podbot mm Restrictions"
new Version[] = "1.0"
new g_szWeapRestr[27] = "00000000000000000000000000"
new g_szEquipAmmoRestr[10] = "000000000"
new g_szOldWeapRestr[27] = "00000000000000000000000000"
new g_szOldEquipAmmoRestr[10] = "000000000"
public check_restrictions()
{
get_cvar_string("amx_restrweapons", g_szWeapRestr, 26)
get_cvar_string("amx_restrequipammo", g_szEquipAmmoRestr, 9)
if (!equali(g_szWeapRestr, g_szOldWeapRestr))
{
set_cvar_string("pb_restrweapons", g_szWeapRestr)
}
if (!equali(g_szEquipAmmoRestr, g_szOldEquipAmmoRestr))
{
set_cvar_string("pb_restrequipammo", g_szEquipAmmoRestr)
}
format(g_szOldWeapRestr, 26, g_szWeapRestr)
format(g_szOldEquipAmmoRestr, 9, g_szEquipAmmoRestr)
}
public plugin_init()
{
register_plugin(Plugin, Version, Author)
set_task(1.0, "check_restrictions", 789, "", 0, "b")
}