Skip to content

Commit 393b1e9

Browse files
authored
JB pack (#22)
1 parent a92adb7 commit 393b1e9

File tree

3 files changed

+49
-0
lines changed

3 files changed

+49
-0
lines changed

scripting/shopsms_service_bf2_badge.sma

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#include <amxmodx>
22
#include <shopsms>
33

4+
// https://amxx.pl/topic/52743-battlefield-2-v200/
5+
// https://github.com/gammerce/plugin-amxmodx/wiki/Dodanie-us%C5%82ugi-BF2:-Odznaki
6+
47
native bf2_get_maxbadges();
58
native bf2_get_badge_name(badge_id, badge_level, name[], len);
69
native bf2_get_user_badge(index, badge_id);

scripting/shopsms_service_jbpack.sma

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#include <amxmodx>
2+
#include <shopsms>
3+
4+
// https://amxx.pl/topic/127942-jailbreak-pack-shop/
5+
native get_user_jbpack(id);
6+
native set_user_jbpack(id, wartosc);
7+
8+
#pragma semicolon 1
9+
10+
#define PLUGIN "Shop SMS: JB Pack"
11+
#define AUTHOR "SeeK"
12+
13+
new const service_id[MAX_SERVICE_ID + 1] = "jb_pack";
14+
15+
public plugin_natives()
16+
{
17+
set_native_filter("native_filter");
18+
}
19+
20+
public plugin_init()
21+
{
22+
register_plugin(PLUGIN, VERSION, AUTHOR);
23+
}
24+
25+
public plugin_cfg()
26+
{
27+
ss_register_service(service_id);
28+
}
29+
30+
public ss_service_bought(id, amount)
31+
{
32+
set_user_jbpack(id, get_user_jbpack(id) + amount);
33+
}
34+
35+
public native_filter(const native_name[], index, trap)
36+
{
37+
if (trap == 0) {
38+
register_plugin(PLUGIN, VERSION, AUTHOR);
39+
pause_plugin();
40+
return PLUGIN_HANDLED;
41+
}
42+
43+
return PLUGIN_CONTINUE;
44+
}

scripting/shopsms_service_zp_ap.sma

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#include <amxmodx>
22
#include <shopsms>
3+
4+
// https://forums.alliedmods.net/showthread.php?t=72505?t=72505
35
native zp_get_user_ammo_packs(id);
46
native zp_set_user_ammo_packs(id, amount);
57

0 commit comments

Comments
 (0)