Jump to content

Kick problem


TheIceman1

Recommended Posts

Why this dont show reason?

Client:

function kickplayer () 
local text = guiGetText ( GUIEditor_Edit[1] ) 
 triggerServerEvent ( "kickplayer", getLocalPlayer(), text ) 
end 
addEventHandler ( "onClientGUIClick", GUIEditor_Button[5], kickplayer ) 

Server:

function kickplay () 
        if ( hasObjectPermissionTo ( source, "function.kickPlayer" ) ) then 
        kickPlayer ( source, source, reason ) 
    end 
end 
addEvent ( "kickplayer", true ) 
addEventHandler ( "kickplayer", root, kickplay ) 

Link to comment
use : getPlayerFromName to get Players name on the server .

Noo,you dont understand what i want :/

Try didn,t get it but this should work .

function kickplay () 
        if ( hasObjectPermissionTo ( source, "function.kickPlayer" ) ) then 
        kickPlayer ( source, source, "reason" ) 
    end 
end 
addEvent ( "kickplayer", true ) 
addEventHandler ( "kickplayer", root, kickplay ) 

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