Advertisement
mforce

buyzone block

Jan 24th, 2016
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.82 KB | None | 0 0
  1. #include <amxmodx>
  2.  
  3. public plugin_init() {
  4.     register_plugin("buyzone block", "1.0", "unknown");
  5.  
  6.     register_message(get_user_msgid("Money"), "MessageMoney");
  7.     register_message(get_user_msgid("HideWeapon"), "MessageHideWeapon");
  8.     register_message(get_user_msgid("StatusIcon"), "Message_StatusIcon");
  9. }
  10.  
  11. public MessageMoney(msgid, dest, id) {
  12.     set_pdata_int(id, 115, 0);
  13.     set_msg_arg_int(1, ARG_LONG, 0);
  14. }
  15.  
  16. public MessageHideWeapon(msgid, dest, id) {
  17.     set_msg_arg_int(1, ARG_BYTE, get_msg_arg_int(1) | (1<<5));
  18. }
  19.  
  20. public Message_StatusIcon(iMsgId, iMsgDest, id) {
  21.     static szIcon[8];
  22.     get_msg_arg_string(2, szIcon, charsmax(szIcon));
  23.     if(equal(szIcon, "buyzone")) {
  24.         if(get_msg_arg_int(1)) {
  25.             set_pdata_int(id, 235, get_pdata_int(id, 235) & ~(1<<0));
  26.             return PLUGIN_HANDLED;
  27.         }
  28.     }
  29.     return PLUGIN_CONTINUE;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement