Jump to content

Kick Command Not Working


Alex10

Recommended Posts

ok so i made a kick cmd

  
addCommandHandler('kick', thekickfunction) 
  

it doesnt work but if i made it like this

  
addCommandHandler('kickp', thekickfunction) 
or 
addCommandHandler('kickplayer', thekickfunction) 
  

with the same function it works why?

and if there is a built in kick command can i remove it??

i tried removeCommandHandler('kick')

PS:no resources was running exept one i made by myself

thanks in advance

Link to comment

spend some more time learning.

  
function kick(player,reason) 
   lcoal Plyr = getPlayerFromName(player 
   if Plyr then 
       kickPlayer(Plyr,source,tostring(reason)) 
       outputChatBox("you kicked player \'"..player.."\'",source,255,0,0) 
   else 
       outputChatBox("no such player",source) 
   end 
end 
  
addCommandHandler('kick', kick) 
  

also be sure your acl is set up right.

Edited by Guest
Link to comment
  • Discord Moderators

addCommandHandler on "kick" is blocked unless the calling player has access to command.kick in acl.xml

Assign people access to it or remove it from acl.xml

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...