Advertisement
Guest User

Untitled

a guest
Apr 17th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.39 KB | None | 0 0
  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include <amxmodx>
  4. #include <amxmisc>
  5. #include <engine>
  6. #include <hamsandwich>
  7.  
  8. #define PLUGIN "New Plug-In"
  9. #define VERSION "1.0"
  10. #define AUTHOR "nacknic"
  11.  
  12. new g_countrounds,
  13.     g_id,
  14.     HamHook:g_hamplayerduck;
  15. public plugin_init()
  16. {
  17.     register_plugin(PLUGIN, VERSION, AUTHOR);
  18.     register_event("HLTV", "freezetime", "a", "1=0", "2=0");
  19.     register_logevent("roundstart", 2, "1=Round_Start");
  20.     register_logevent("roundend", 2, "1=Round_End");
  21.     DisableHamForward(g_hamplayerduck = RegisterHam(Ham_Player_Duck, "player", "duckFunc"));
  22.    
  23. }
  24.  
  25. public client_putinserver(id) g_id = id;   
  26.  
  27. public freezetime()
  28. {
  29.     EnableHamForward(g_hamplayerduck);
  30.     new ftime; ftime = get_cvar_num("mp_freezetime");
  31.     client_print(0, print_chat, "freezetime on, please wait: %d", ftime);  
  32. }
  33.  
  34. public roundstart()
  35. {
  36.     DisableHamForward(g_hamplayerduck);
  37.     client_print(0, print_chat, "freezetime off, the round start right now, (Round Num: %d)", g_countrounds);
  38.     g_countrounds++;
  39. }
  40.  
  41. public roundend()
  42. {
  43.     client_print(0, print_chat, "round end, please wait for the next one");
  44. }
  45.  
  46. public duckFunc()
  47. {
  48.     new b; b =  entity_get_int(g_id, EV_INT_button);
  49.     if(b & IN_DUCK)
  50.     {
  51.         entity_set_int(g_id, EV_INT_button, b & ~IN_DUCK);
  52.         new nick[32]; get_user_name(g_id, nick, charsmax(nick));
  53.         client_print(0, print_chat, "duck not allowed in freezetime", nick);
  54.     }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement