Jump to content

Default chat commands?


Stylez

Recommended Posts

Posted (edited)

Hmm, thanks. But is there more commands like this?

BTW.. what about roleplay servers.. i dont think that is appropriate way to do it.

Edited by Guest
Posted

Ah, I See that will use this simple function and the command will not work any more :

addEventHandler("onPlayerCommand",root, 
    function ( CMD ) 
        if ( CMD == "me" ) then  
            cancelEvent(); 
                outputConsole("* This Command Are Not Allowed!"); 
            end; 
        end 
    ); 
Posted
You Could disable it By using the
removeCommandHandler 

I don't think so...

This function can only remove command handlers that were added by the resource that it is called in.

The best way is cancelling onPlayerChat.

Posted
Ah, I See that will use this simple function and the command will not work any more :

addEventHandler("onPlayerCommand",root, 
    function ( CMD ) 
        if ( CMD == "me" ) then  
            cancelEvent(); 
                outputConsole("* This Command Are Not Allowed!"); 
            end; 
        end 
    ); 

Yeah thats good. But what if i have RP server.. i will not be able to use it.. :/

Posted
Ah, I See that will use this simple function and the command will not work any more :

addEventHandler("onPlayerCommand",root, 
    function ( CMD ) 
        if ( CMD == "me" ) then  
            cancelEvent(); 
                outputConsole("* This Command Are Not Allowed!"); 
            end; 
        end 
    ); 

Yeah thats good. But what if i have RP server.. i will not be able to use it.. :/

why you want cancel the command ? it's not problem !

Posted
Ok then, how to change color of the text for this command? ;o

you mean outputConsole?

Edit#:

if yes , i'm do not know, maybe try this :

outputConsole("#000000* This Command Are Not Allowed!",255,0,0,true) 

Posted

alright.. i have another question i removed all resources from resource folder and i left only my own made spawn resource. And my friend joins server, we can see each others Nicknames and HP. How can i disable that? ;o

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