AKL DOCUMENTATION
  • 👋Introduction
  • GUSTI RESOURCES
    • ⛏️gusti-minerjob
      • Setup
      • Update
    • 🚙gusti-membershipvehicle
    • 🍗gusti-butcherjob
    • 📣gusti-iosnotify
      • Setup
      • Usage
    • 🌐gusti-status server web
      • Setup
    • ⏳gusti-loadscreen
      • Setup
      • Building
    • 💎gusti-vipmenu
      • Setup
    • 🛠️gusti-welderloot
      • Common Issues
      • Setup
    • 🏃‍♂️gusti-boostsprint
      • Setup
    • 🚀gusti-boostfps
    • 📹gusti-cctv
      • Setup
    • 📅gusti-datetime
      • Setup
    • ☢️gusti-radzone
      • Setup
    • 🔫gusti-hidereticle
    • 🚗gusti-givevehicle
      • Setup
      • Usage
    • 💥gusti-duarmemek
      • Setup
      • Usage
  • 🛡️gusti-vipsystem
    • Setup
    • Usage
  • CODE SNIPPETS
    • Fix Animasi
    • Fix Spam Punch
    • Boost Fps
    • Disable Ambient
    • Send Webhook Messages
    • Spawns GTA V Online Train On Fivem
    • Removing / Adding Limit Map
    • Blacklist Name
    • Item Probability
    • Anti Duplicate Vehicle
    • How To Unbind Keys
Powered by GitBook
On this page
  1. CODE SNIPPETS

Blacklist Name

How to blacklist a name in Gta V FiveM. The purpose of this code is to make it easier for you to blacklist stubborn players/citizens (Cheaters) on your server.

local blacklistednames= {"", "script"}
local x = {}

AddEventHandler("playerConnecting", function(playerName, setKickReason)
   playerName = (string.gsub(string.gsub(string.gsub(playerName,  "-", ""), ",", ""), " ", ""):lower())
        for k, v in pairs(blacklistednames) do
          local g, f = playerName:find(string.lower(v))
          if g or f  then
            table.insert (x, v)
            local blresult = table.concat(x, " ")
              setKickReason('You have been kicked because you are a stupid cheater!')
              CancelEvent()
              for key in pairs (x) do
                x [key] = nil
          end
       end
    end
end)
PreviousRemoving / Adding Limit MapNextItem Probability

Last updated 2 years ago