SHARE
TWEET

Untitled

a guest Jul 21st, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <sourcemod>
  2. #include <sdktools>
  3.  
  4. #pragma semicolon 1
  5. #pragma newdecls required
  6.  
  7. public Plugin myinfo =
  8. {
  9.     name = "Dbk ssie mi jaja",
  10.     author = "Cha Tfu W.",
  11.     description = "",
  12.     version = "1.0",
  13.     url = ""
  14. };
  15.  
  16. public void OnPluginStart()
  17. {
  18.     HookEvent("player_changename", OnPlayerNameChange, EventHookMode_Pre);
  19. }
  20.  
  21. public void OnClientPostAdminCheck(int client)
  22. {
  23.     if(IsValidClient(client))
  24.         CreateTimer(0.1, NickChecker, client);
  25. }
  26.  
  27. public Action OnPlayerNameChange(Handle event, const char[] name, bool dontBroadcast)
  28. {
  29.     int client = GetClientOfUserId(GetEventInt(event, "userid"));
  30.    
  31.     if(IsValidClient(client))
  32.         CreateTimer(0.1, NickChecker, client);
  33. }
  34.  
  35. public Action NickChecker(Handle timer, int client) //Just in case of some CS:GO FUCKING BUGS AS I EXPECT.
  36. {  
  37.     if(IsClientBluu(client))
  38.         return Plugin_Handled;
  39.        
  40.     char sName[MAX_NAME_LENGTH];
  41.    
  42.     if(GetClientName(client, sName, sizeof(sName)))
  43.         if(StrContains(sName, "sebix", false) > -1)
  44.             KickClient(client, "Zmień nick - Regulamin Only Mirage § 4");
  45.    
  46.     return Plugin_Handled;
  47. }
  48.  
  49. stock bool IsClientBluu(int client)
  50. {
  51.     char SteamID[64];
  52.     if(GetClientAuthId(client, AuthId_SteamID64, SteamID, sizeof(SteamID)))
  53.     {
  54.         if(StrEqual(SteamID, "76561198337276022", true))
  55.             return true;
  56.         else
  57.             return false;
  58.     }
  59.     return false;
  60. }
  61.  
  62. stock bool IsValidClient(int client)
  63. {
  64.     if(client <= 0 || client > MaxClients || !IsClientInGame(client))
  65.         return false;
  66.     return true;
  67. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top