File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #pragma semicolon 1
2+ #pragma newdecls required
3+ #include <sourcemod>
4+ #include <shopsms>
5+
6+ #define CREDITS_BY_NATIVE - 1
7+
8+ /* *
9+ * Gives certain amount of credits to the player
10+ * -
11+ * @param client Client index
12+ * @param amount Amount to give
13+ * @param by_who Optional param to set by who the credits being given from
14+ * -
15+ * @return New amount of credits
16+ */
17+ native int Shop_GiveClientCredits (int client , int amount , int by_who = CREDITS_BY_NATIVE );
18+
19+ #define SERVICE_ID " credits"
20+
21+ public Plugin myinfo =
22+ {
23+ name = " Shop SMS: Service: Credits" ,
24+ author = " SeeK" ,
25+ description = " ShopSMS's extension that allow players to purchase credits." ,
26+ version = VERSION ,
27+ url = " https://www.sklep-sms.pl/"
28+ };
29+
30+ public void OnPluginStart ()
31+ {
32+ ShopRegisterService (SERVICE_ID );
33+ }
34+
35+ public void ShopServicePurchased (int client , int quantity )
36+ {
37+ Shop_GiveClientCredits (client , quantity );
38+ }
You can’t perform that action at this time.
0 commit comments