SHARE
TWEET

Untitled

a guest Feb 27th, 2020 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include amxmodx
  2. #include cstrike
  3. #include fun
  4. #include hamsandwich
  5. #include colorchat
  6.  
  7. #define p. "VIP"
  8. #define v. "n/n"
  9. #define a. "Jică Măcelaru'"
  10.  
  11. #define VIP_FLAG ADMIN_LEVEL_H
  12.  
  13. #define SCOREATTRIB_VIP (1 << 2)
  14.    
  15. public plugin_init()
  16. {
  17.     register_plugin p., v., a.;
  18.  
  19.     register_clcmd "say /resetvip", "resetDeaths";
  20.  
  21.     register_message get_user_msgid("ScoreAttrib"), "MessageScoreAttrib";
  22.    
  23.     RegisterHam Ham_Spawn, "player", "Spawn", 1;
  24.     RegisterHam Ham_TakeDamage, "player", "doubleDMG";
  25. }
  26.  
  27. public resetDeaths(Index)
  28. {
  29.     if(!is_user_connected(Index) || !(get_user_flags(Index) & VIP_FLAG))
  30.         return 1;
  31.  
  32.     new Deaths = cs_get_user_deaths( Index );
  33.        
  34.     if((Deaths == 0))
  35.         return 1;
  36.        
  37.     cs_set_user_deaths(Index, 0);
  38.    
  39.     ColorChat Index, GREEN,  "[ResetDeaths] Tocmai ti-ai resetat decesurile!";
  40.    
  41.     return 1;
  42. }
  43.  
  44. public MessageScoreAttrib(iMsgID, iDest, iReceiver)
  45. {
  46.     new id = get_msg_arg_int(1);
  47.  
  48.     if(is_user_connected(id) && (get_user_flags(id) & VIP_FLAG))
  49.         set_msg_arg_int(2, ARG_BYTE, SCOREATTRIB_VIP);
  50. }
  51.  
  52. public Spawn(Index)
  53. {
  54.     if(!is_user_alive(Index) || !(get_user_flags(Index) & VIP_FLAG))
  55.         return 1;
  56.  
  57.     set_user_health Index, 120;
  58.     set_user_armor Index, 120;
  59.     set_user_rendering Index, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 50;
  60.    
  61.     return 1;
  62. }
  63.  
  64. public doubleDMG(iVictim, iInflictor, iAttacker, Float:fDamage, iDamageBits)
  65. {  
  66.     if(get_user_flags(iAttacker) & VIP_FLAG)
  67.     {
  68.         SetHamParamFloat(4, fDamage * 2);
  69.         return HAM_HANDLED;
  70.     }
  71.    
  72.     return HAM_IGNORED;
  73. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top