Guest User

Untitled

a guest
Aug 11th, 2018
729
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. #include amxmodx
  2. #include amxmisc
  3.  
  4. #define VIP_FLAGS "bit"
  5.  
  6. const s = 7; // Aici setati ora la care sa porneasca
  7. const e = 12; // Aici setati ora la care sa se termine
  8.  
  9. public client_putinserver(id) {
  10. if(!is_user_bot(id) || !is_user_hltv(id))
  11. check(id);
  12. return PLUGIN_CONTINUE;
  13. }
  14.  
  15. public check(id) {
  16. if(!is_user_connected(id))
  17. return;
  18.  
  19. new h;
  20. new flags = read_flags(VIP_FLAGS);
  21.  
  22. time(h, _, _);
  23.  
  24. if(h >= s && h <= e)
  25. {
  26. if(!(get_user_flags(id) & flags))
  27. set_user_flags(id, flags);
  28. }
  29.  
  30. else if(h < s || h >= e)
  31. set_user_flags(id, read_flags("z"));
  32.  
  33. set_hudmessage(0, 127, 255, 0.02, 0.2, 1, _, 59.0, _, _, -1);
  34. ShowSyncHudMsg(0, CreateHudSyncObj(), "Event VIP FREE: %s", (h >= s && h <= e) ? "ON" : "OFF");
  35.  
  36. set_task(60.0, "check", id);
  37. }
Add Comment
Please, Sign In to add comment