Jump to content

[Question]


GrubaS

Recommended Posts

I dont want make a new post so i'll write here.

I want block command kill in race gamemode ;)

its possible? (this function dont working)

addEventHandler ( "onPlayerCommand", root, 
function (cmd) 
    if ( cmd == "kill" ) then 
        outputChatBox("u can't use kill command") 
    cancelEvent () 
    end 
end 
) 

Link to comment

Approach this logically, connect/disconnect/reconnect/quit etc. are commands in the client itself (ie. they work even when not connnected to any server), they are not in the server itself or client scripts so you can't affect them in any way. Logout is server command so you can affect that one however you want.

I dont want make a new post so i'll write here.

I want block command kill in race gamemode ;)

its possible? (this function dont working)

addEventHandler ( "onPlayerCommand", root, 
function (cmd) 
    if ( cmd == "kill" ) then 
        outputChatBox("u can't use kill command") 
    cancelEvent () 
    end 
end 
) 

It might be clientside command and you're cancelling it on the server.

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