Hi!
Valaki tudna nekem ebben segíteni, hogy ez a plugint így betenné a shopba? Includeos a shop, inct lejjeb leírtam SMA:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <cstrike> #include <fun> #include <cstrike> #include "furien.inc" #include "furien_shop.inc" #define PLUGIN "Furien Extra: M249 Veteran" #define VERSION "1.0" #define AUTHOR "Bence98007" public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) furien_register_item("M249", 0, "M249", 7000, "furien_vasarlas") } public furien_vasarlas(id) { new iTeam = furien_get_user_team(id) if (iTeam == -1) { return ShopCloseMenu } new iItemCost = 7000 if (iItemCost <= 0 || cs_get_user_team(id) != CS_TEAM_CT ) { return ShopTeamNotAvail } if (furien_try_buy(id, iItemCost)) { give_item(id, "weapon_m249") return ShopBought } return ShopNotEnoughMoney }
Shop incje:
#if defined _furien_shop #endinput #endif #define _furien_shop #pragma reqlib furien_shop #include <cstrike> enum _:ShopReturns { ShopBought, ShopTeamNotAvail, ShopAlreadyHaveOne, ShopCantCarryAnymore, ShopNotEnoughMoney, ShopCannotBuyThis, ShopShowMenuAgain, ShopCloseMenu } native furien_register_item(szFurienName[32], iFurienCost=0, szAntiName[32], iAntiCost=0, szCallBack[32] = "furien_buy_item", iExtra = 0); stock furien_try_buy(id, iCost) { new iNewMoney = cs_get_user_money(id) - iCost; if( iNewMoney < 0 ) { return 0; } cs_set_user_money(id, iNewMoney, 1); return 1; }
Hiba nélkül lefutott, de nem tom hogy működne, és nem akarom berakni még úgy, hogy nem tom h műxik-e!
Köszi előre is a segítséget!
|