Advertisement
Guest User

Untitled

a guest
Dec 20th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. #pragma semicolon 1
  2.  
  3. #define DEBUG
  4.  
  5. #include <sourcemod>
  6. #include <sdktools>
  7. #include <cstrike>
  8.  
  9. #pragma newdecls required
  10.  
  11. public Plugin myinfo =
  12. {
  13. name = "[DSH] Tagi graczy i vipów",
  14. author = "deszableble",
  15. description = "Plugin dodaje na serwer tagi dla użytkowników.",
  16. version = "1.0",
  17. url = "/id/deszableble"
  18. };
  19.  
  20. public void OnPluginStart()
  21. {
  22. HookEvent("player_spawn", Event_PlayerSpawn);
  23. }
  24.  
  25. public Action Event_PlayerSpawn(Event event, const char[] name, bool dontBroadcast)
  26. {
  27. int client = GetClientOfUserId(event.GetInt("userid"));
  28. SetPlayerClanTag(client);
  29. }
  30.  
  31. public Action SetPlayerClanTag(int client)
  32. {
  33. if(IsPlayerVip(client))
  34. {
  35. CS_SetClientClanTag(client, "« VIP »");
  36. }
  37. else
  38. {
  39. CS_SetClientClanTag(client, "• Gracz •");
  40. }
  41. }
  42.  
  43. stock bool IsValidClient(int client)
  44. {
  45. if(client <= 0 ) return false;
  46. if(client > MaxClients) return false;
  47. if(!IsClientConnected(client)) return false;
  48. if(IsFakeClient(client)) return false;
  49. return IsClientInGame(client);
  50. }
  51.  
  52. stock bool IsPlayerVip(int client)
  53. {
  54. if (GetUserFlagBits(client) & ADMFLAG_CUSTOM3)
  55. return true;
  56. return false;
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement