Advertisement
Guest User

Untitled

a guest
Dec 6th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <csx>
  3. #include <colorchat>
  4.  
  5. /*
  6. * TimeProjector displays the remaining time and the next map on the top right corner of the client
  7. * display as a hudmessage.
  8. *
  9. * History:
  10. *
  11. * v0.1: - first release
  12. */
  13.  
  14. new gcvarForum;
  15.  
  16. public plugin_init()
  17. {
  18. register_plugin("plg :P","0.1","emblaze")
  19. set_task(180.0, "showTimer",0,"",0,"b")
  20. gcvarForum=register_cvar("amx_forum", "adres forum")
  21. return PLUGIN_CONTINUE
  22. }
  23.  
  24. public showTimer(id){
  25. new nazwa[32]
  26. get_cvar_string("hostname",nazwa,31)
  27. ColorChat(id,GREEN, "**^x01 Witamy na: ^x03%s",nazwa);
  28. new forum[32]
  29. get_pcvar_string(gcvarForum,forum, 31)
  30. ColorChat(id,GREEN, "**^x01 Forum serwera: ^x03%s",forum)
  31. new nextmap[32]
  32. get_cvar_string("amx_nextmap",nextmap,31)
  33. ColorChat(id,GREEN, "**^x01 Nastepna mapa: ^x03%s", nextmap)
  34. if (get_cvar_float("mp_timelimit"))
  35. {
  36. new a = get_timeleft()
  37.  
  38. if (get_cvar_num("amx_time_voice"))
  39. {
  40. }
  41. ColorChat(id,GREEN, "**^x01 Czas do konca mapy: ^x03%d^x04:^x03%02d", (a / 60), (a % 60))
  42.  
  43. }
  44. //Delay for order
  45. set_task(0.1, "showRank", 1);
  46. }
  47. public showRank(id){
  48. new izStats[8], izBody[8]
  49. new iRankPos, iRankMax
  50.  
  51. new Players[32], playerCount;
  52. get_players(Players, playerCount);
  53. new id2;
  54. for (new i=0; i<playerCount; i++){
  55. id2 = Players[i];
  56. iRankPos = get_user_stats(id2, izStats, izBody)
  57. iRankMax = get_statsnum()
  58.  
  59. ColorChat(id2, GREEN, "**^x01 Twoj rank wynosi:^x04 %d^x01/^x04%d", iRankPos, iRankMax)
  60. }
  61.  
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement