hlmod.hu
https://hlmod.hu/

Csak kés
https://hlmod.hu/viewtopic.php?f=29&t=24669
Oldal: 1 / 1

Szerző:  theglorious [ 2016.04.21. 20:23 ]
Hozzászólás témája:  Csak kés

Hali, olyan plugint keresek ami azt teszi, hogy letiltja a vásárlást és csak kést kapnak az emberek kör elején.

Ui: ez használható valamire? https://forums.alliedmods.net/showthread.php?p=170215
Csak azért kérdezem, mert 2005-ös

Szerző:  mforce [ 2016.04.21. 20:30 ]
Hozzászólás témája:  Re: Csak kés

  1. #include <amxmodx>
  2. #include <fakemeta>
  3.  
  4. new const PLUGIN[] = "Buy blocker & Only knife";
  5. new const VERSION[] = "1.1";
  6. new const AUTHOR[] = "mforce";
  7.  
  8.  
  9. const m_iHideHUD = 361;
  10. const m_iClientHideHUD = 362;
  11. const HUD_HIDE_MONEY = 1<<5;
  12. const m_iMapZone = 235;
  13.  
  14. public plugin_init() {
  15.     register_plugin(PLUGIN, VERSION, AUTHOR);
  16.  
  17.     register_message(get_user_msgid("StatusIcon"), "Message_StatusIcon");
  18.     register_event("ResetHUD", "Event_ResetHUD", "b")
  19.     register_event("HideWeapon", "Event_HideWeapon", "b")
  20.     set_msg_block(get_user_msgid("Money"), BLOCK_SET)
  21.     register_event("CurWeapon", "Knife", "be", "2!29");
  22. }
  23.  
  24. public Knife(id) {
  25.     engclient_cmd(id, "weapon_knife");
  26. }
  27.  
  28. public Event_ResetHUD(id) {
  29.     set_pdata_int(id, m_iClientHideHUD, 0)
  30.     set_pdata_int(id, m_iHideHUD, HUD_HIDE_MONEY)
  31. }
  32.  
  33. public Event_HideWeapon(id) {
  34.     new iFlags = read_data(1)
  35.     if(~iFlags & HUD_HIDE_MONEY) {
  36.         set_pdata_int(id, m_iClientHideHUD, 0)
  37.         set_pdata_int(id, m_iHideHUD, iFlags|HUD_HIDE_MONEY)
  38.     }
  39. }
  40.  
  41. public Message_StatusIcon(iMsgId, iMsgDest, id) {
  42.     static szIcon[8];
  43.     get_msg_arg_string(2, szIcon, charsmax(szIcon));
  44.     if(equal(szIcon, "buyzone")) {
  45.         if(get_msg_arg_int(1)) {
  46.             set_pdata_int(id, m_iMapZone, get_pdata_int(id, m_iMapZone) & ~(1<<0));
  47.             return PLUGIN_HANDLED;
  48.         }
  49.     }
  50.     return PLUGIN_CONTINUE;
  51. }

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