A nie da rade edytować plugin od usługi w ten sposób, aby po zakupie wpisywał on daną osobę do admins_simple.ini, próbowałem zrobić coś takiego, ale nie do końca chce to działać:
#pragma semicolon 1 #include <sourcemod> #include <shopsms> #define MAX_STEAMAUTH_LENGTH 20 #define SERVICE_ID "vip_mm" char g_szFlags[MAX_FLAGS + 1]; public Plugin myinfo = { name = "Shop SMS: Service: VIP", author = "SeeK", description = "ShopSMS's extension that allow players to purchase VIP.", version = VERSION, url = "http://www.sklep-sms.pl/" }; public void OnPluginStart() { ShopRegisterService(SERVICE_ID); } public void ShopServiceLoaded(const char[] name, const char[] flags) { strcopy(g_szFlags, sizeof(g_szFlags), flags); } public void ShopServicePurchased(int client) { decl String:szSteamId2[32]; GetClientAuthId(client, AuthId_Steam2, szSteamId2, sizeof(szSteamId2)); new String:szFile[256]; BuildPath(Path_SM, szFile, sizeof(szFile), "configs/admins_simple.ini"); new Handle:hFile = OpenFile(szFile, "at"); WriteFileLine(hFile, "\"%s\" @VIP", szSteamId2); CloseHandle(hFile); return Plugin_Handled; } public int ShopServiceAddingToList(int id) { // Client cannot purchase a product if already has this set of flags if (GetUserFlagBits(id) & ReadFlagString(g_szFlags) == ReadFlagString(g_szFlags)) { return ITEMDRAW_DISABLED; } return ITEMDRAW_DEFAULT; }