hlmod.hu
https://hlmod.hu/

Shop INC
https://hlmod.hu/viewtopic.php?f=10&t=6692
Oldal: 1 / 1

Szerző:  Bence98007 [2012.11.25. 16:56 ]
Hozzászólás témája:  Shop INC

Hi!

Valaki tudna nekem ebben segíteni, hogy ez a plugint így betenné a shopba? Includeos a shop, inct lejjeb leírtam
SMA:
SMA Forráskód: [ Mindet kijelol ]
  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include <amxmodx>
  4. #include <cstrike>
  5. #include <fun>
  6. #include <cstrike>
  7.  
  8. #include "furien.inc"
  9. #include "furien_shop.inc"
  10.  
  11. #define PLUGIN "Furien Extra: M249 Veteran"
  12. #define VERSION "1.0"
  13. #define AUTHOR "Bence98007"
  14.  
  15.  
  16. public plugin_init()
  17. {
  18. register_plugin(PLUGIN, VERSION, AUTHOR)
  19. furien_register_item("M249", 0, "M249", 7000, "furien_vasarlas")
  20. }
  21.  
  22. public furien_vasarlas(id)
  23. {
  24. new iTeam = furien_get_user_team(id)
  25. if (iTeam == -1)
  26. {
  27. return ShopCloseMenu
  28. }
  29.  
  30. new iItemCost = 7000
  31. if (iItemCost <= 0 || cs_get_user_team(id) != CS_TEAM_CT )
  32. {
  33. return ShopTeamNotAvail
  34. }
  35.  
  36. if (furien_try_buy(id, iItemCost))
  37. {
  38. give_item(id, "weapon_m249")
  39. return ShopBought
  40. }
  41. return ShopNotEnoughMoney
  42. }
  43.  


Shop incje:
SMA Forráskód: [ Mindet kijelol ]
  1. #if defined _furien_shop
  2. #endinput
  3. #endif
  4. #define _furien_shop
  5.  
  6. #pragma reqlib furien_shop
  7.  
  8. #include <cstrike>
  9.  
  10. enum _:ShopReturns {
  11. ShopBought,
  12. ShopTeamNotAvail,
  13. ShopAlreadyHaveOne,
  14. ShopCantCarryAnymore,
  15. ShopNotEnoughMoney,
  16. ShopCannotBuyThis,
  17. ShopShowMenuAgain,
  18. ShopCloseMenu
  19. }
  20.  
  21. native furien_register_item(szFurienName[32], iFurienCost=0, szAntiName[32], iAntiCost=0, szCallBack[32] = "furien_buy_item", iExtra = 0);
  22.  
  23. stock furien_try_buy(id, iCost)
  24. {
  25. new iNewMoney = cs_get_user_money(id) - iCost;
  26.  
  27. if( iNewMoney < 0 )
  28. {
  29. return 0;
  30. }
  31.  
  32. cs_set_user_money(id, iNewMoney, 1);
  33. return 1;
  34. }


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!

Oldal: 1 / 1 Minden időpont UTC+02:00 időzóna szerinti
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/