Jump to content

HELP| Player Kick


scolen

Recommended Posts

8 hours ago, scolen said:

If any player uses any animation, how can he be kicked from the server?

function checkPlayerDoingAnim()
   local block,anim = getPedAnimation(localPlayer)
   if block and anim then
      triggerServerEvent("kickPlayer",localPlayer, "Don't use animations")
   end
end
local animChecker = setTimer(checkPlayerDoingAnim, 350,0)

-client
 

addEvent("kickPlayer",true)
addEventHandler("kickPlayer",resourceRoot,
    function(reason)
        if client then
         kickPlayer(client, reason)
      end
    end)

-server

Edited by Shady1
Link to comment
12 hours ago, Shady1 said:
function checkPlayerDoingAnim()
   local block,anim = getPedAnimation(localPlayer)
   if block and anim then
      triggerServerEvent("kickPlayer",localPlayer, "Don't use animations")
   end
end
local animChecker = setTimer(checkPlayerDoingAnim, 350,0)

-client
 

addEvent("kickPlayer",true)
addEventHandler("kickPlayer",resourceRoot,
    function(reason)
        if client then
         kickPlayer(client, reason)
      end
    end)

-server

bro not working 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...