hlmod.hu
https://hlmod.hu/

Fegyver letiltása adott mapokon!
https://hlmod.hu/viewtopic.php?f=9&t=23650
Oldal: 1 / 1

Szerző:  kengurumancs [ 2016.01.24. 10:08 ]
Hozzászólás témája:  Fegyver letiltása adott mapokon!

Sziasztok!
Újra telepítettem Sniper szerverem és fogalmam sincs, hogy lehet azt megcsinálni hogy ne lehessen vásárolni xy mapokon, ha nem csak kés+awp/scout legyen az embernél.. :)
Valakinek ötlelete?

Szerző:  mforce [ 2016.01.24. 10:43 ]
Hozzászólás témája:  Re: Fegyver letiltása adott mapokon!

Mapkonfigba egy plugin:

  1. #include <amxmodx>
  2. #include <fakemeta>
  3.  
  4. #define PLUGIN "Buyzone block"
  5. #define VERSION "1.0"
  6. #define AUTHOR "unknown"
  7.  
  8.  
  9. public plugin_init() {
  10.     register_plugin(PLUGIN, VERSION, AUTHOR);
  11.     register_message(get_user_msgid("Money"), "MessageMoney");
  12.     register_message(get_user_msgid("HideWeapon"), "MessageHideWeapon");
  13.     register_message(get_user_msgid("StatusIcon"), "Message_StatusIcon");
  14. }
  15.  
  16. public MessageMoney(msgid, dest, id) {
  17.     set_pdata_int(id, 115, 0);
  18.     set_msg_arg_int(1, ARG_LONG, 0);
  19. }
  20.  
  21. public MessageHideWeapon(msgid, dest, id) {
  22.     set_msg_arg_int(1, ARG_BYTE, get_msg_arg_int(1) | (1<<5));
  23. }
  24.  
  25. public Message_StatusIcon(iMsgId, iMsgDest, id) {
  26.     static szIcon[8];
  27.     get_msg_arg_string(2, szIcon, charsmax(szIcon));
  28.     if(equal(szIcon, "buyzone")) {
  29.         if(get_msg_arg_int(1)) {
  30.             set_pdata_int(id, 235, get_pdata_int(id, 235) & ~(1<<0));
  31.             return PLUGIN_HANDLED;
  32.         }
  33.     }
  34.     return PLUGIN_CONTINUE;
  35. }

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