Advertisement
Guest User

Untitled

a guest
Dec 20th, 2014
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.46 KB | None | 0 0
  1. #include <sourcemod>
  2. #include <smlib>
  3. #include <store>
  4.  
  5. new Handle:g_hTimer[MAXPLAYERS+1] = { INVALID_HANDLE, ... };
  6.  
  7. public OnClientPutInServer(client)
  8. {
  9. CreateTimer(2.0, Timer_CreateTimerAffichage, client);
  10. }
  11.  
  12. public OnClientDisconnect(client)
  13. {
  14. FlashHudTimer(client);
  15. }
  16.  
  17. public Action:Timer_CreateTimerAffichage(Handle:timer, any:client)
  18. {
  19. g_hTimer[client] = CreateTimer(1.0, Timer_Affichage, client, TIMER_REPEAT);
  20. }
  21.  
  22. public Action:Timer_Affichage(Handle:timer, any:client)
  23. {
  24. Store_GetCredits(Store_GetClientAccountID(client), OnGetCreditsComplete_Affichage, client);
  25. }
  26.  
  27. public OnGetCreditsComplete_Affichage(credits, any:client)
  28. {
  29. decl String:sText[999];
  30. sText[0] = '\0';
  31. new String:SteamID[128];
  32. GetClientAuthString(client, SteamID, sizeof(SteamID));
  33. if(VIP(client))
  34. {
  35. Format(sText, sizeof(sText), "%s╠√ìㄕ : Activé", sText);
  36. }else
  37. {
  38. Format(sText, sizeof(sText), "%s╠√ìㄕ : Desactivé", sText);
  39. }
  40. Format(sText, sizeof(sText), "%s\n", sText);
  41. if(Admin(client))
  42. {
  43. Format(sText, sizeof(sText), "%s╠Admin : Activé", sText);
  44. }
  45. else
  46. {
  47. Format(sText, sizeof(sText), "%s╠Admin : Desactivé", sText);
  48. }
  49. Format(sText, sizeof(sText), "%s\n", sText);
  50. Format(sText, sizeof(sText), "%s╠SteamID : %s", sText, SteamID);
  51. Format(sText, sizeof(sText), "%s\n", sText);
  52. Format(sText, sizeof(sText), "%s╠IP Serveur : 194.105.153.111:27015", sText);
  53. Format(sText, sizeof(sText), "%s\n", sText);
  54. Format(sText, sizeof(sText), "%s╠Vous avez %i crédit%s", sText, credits, (credits > 1 ? "s":""));
  55. Format(sText, sizeof(sText), "%s\n", sText);
  56. Format(sText, sizeof(sText), "%s╠Site : justgameclan.verygames.net/forum", sText);
  57. Format(sText, sizeof(sText), "%s\n", sText);
  58. Format(sText, sizeof(sText), "%s╚=================================╝", sText);
  59. Format(sText, sizeof(sText), "%s\n", sText);
  60. Client_PrintKeyHintText(client, "╔=============Just-Game=============╗\n%s", sText);
  61. }
  62.  
  63. stock FlashHudTimer(client)
  64. {
  65. if(g_hTimer[client] != INVALID_HANDLE)
  66. {
  67. KillTimer(g_hTimer[client])
  68. g_hTimer[client] = INVALID_HANDLE;
  69. }
  70. }
  71.  
  72. public VIP(client)
  73. {
  74. if (GetUserFlagBits(client) & ADMFLAG_CUSTOM1 || GetUserFlagBits(client) & ADMFLAG_CUSTOM2 || GetUserFlagBits(client) & ADMFLAG_ROOT) return true;
  75. else return false;
  76. }
  77.  
  78. public Admin(client)
  79. {
  80. if (GetUserFlagBits(client) & ADMFLAG_GENERIC || GetUserFlagBits(client) & ADMFLAG_ROOT) return true;
  81. else return false;
  82. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement