seroff

Bomb DHUD Timer By Seroff

Aug 13th, 2016
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <dhudmessage>
  3.  
  4. static g_c4timer,g_pTimer;
  5.  
  6. public plugin_init()
  7. {
  8. register_plugin("Bomb DHUD Timer","1.0","Seroff");
  9. g_pTimer = register_cvar("mp_c4timer","35");
  10. }
  11.  
  12. public bomb_planted()
  13. {
  14. g_c4timer=get_pcvar_num(g_pTimer);
  15. gDtask();
  16. set_task(1.0, "gDtask", _, _, _, "a",g_c4timer);
  17. }
  18.  
  19. public gDtask()
  20. {
  21. if(g_c4timer==0) return 0;
  22. set_dhudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01);
  23. show_dhudmessage(0, "Осталось до взрыва: %d сек.", g_c4timer);
  24. --g_c4timer;
  25. return 0;
  26. }
Add Comment
Please, Sign In to add comment