Advertisement
Guest User

Untitled

a guest
Nov 21st, 2019
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. #include <cstrike>
  2. #include <sourcemod>
  3. #include <SteamWorks>
  4.  
  5. #pragma newdecls required
  6. #pragma semicolon 1
  7.  
  8.  
  9. public void OnPluginStart()
  10. {
  11. HookEvent("player_spawn", Event_TagTable);
  12. }
  13.  
  14. public Action Event_TagTable(Handle hEvent, const char[] chName, bool bDontBroadcast)
  15. {
  16. int client = GetClientOfUserId(GetEventInt(hEvent, "userid"));
  17.  
  18. if (k_EUserHasLicenseResultDoesNotHaveLicense == SteamWorks_HasLicenseForApp(client, 624820))
  19. {
  20. CS_SetClientClanTag(client, "[NonPrime]");
  21. }
  22. else if (IsValidClient(client))
  23. {
  24. CS_SetClientClanTag(client, "[Gracz]");
  25. }
  26. if (GetAdminFlag(GetUserAdmin(client), Admin_Custom1))
  27. {
  28. CS_SetClientClanTag(client, "[VIP]");
  29. }
  30. if (GetAdminFlag(GetUserAdmin(client), Admin_Custom6))
  31. {
  32. CS_SetClientClanTag(client, "[Opiekun]");
  33. }
  34. if (GetAdminFlag(GetUserAdmin(client), Admin_Root))
  35. {
  36. CS_SetClientClanTag(client, "[Właściciel]");
  37. }
  38. }
  39.  
  40. bool IsValidClient(int client)
  41. {
  42. if (client <= 0 || client > MaxClients) {
  43. return false;
  44. }
  45.  
  46. if (!IsClientInGame(client)) {
  47. return false;
  48. }
  49.  
  50. if (IsFakeClient(client)) {
  51. return false;
  52. }
  53.  
  54. return true;
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement