Jump to content

Need help with /nick and votemanager, Freeroam


BennyBunny

Recommended Posts

Posted

Hi!

I wanna make /nick off in my server is there a way for make this off?

And how can i make the votemanger off when my sever start?

The last one is atm i work with the freeroam script from mta 1.0.5.

Is there a way for get the "new" one for mta 1.1 with the new color system...

So that i can change everything again for my server and start it on mta 1.1 :)

Posted
function hide(player) 
 setPlayerNametagShowing ( player, false )  
end 
function show(player) 
  setPlayerNametagShowing ( player, true )  
end 
addCommandHandler("nickoff",hide) 
addCommandHandler("nickon",show) 

for stop votemanager delete this line " " form mtaserver.conf

Posted
function hideNShow(player) 
    if isPlayerNametagShowing(player) then 
        setPlayerNametagShowing ( player, false ) 
    else 
        setPlayerNametagShowing ( player, true ) 
    end 
end 
addCommandHandler("togglenick",hideNShow) 

Posted

Or just:

addCommandHandler("togglenick", 
function(player) 
     setPlayerNametagShowing( player, not isPlayerNametagShowing( player ) ) 
end) 

Posted

I Think he wants to disable the /nick command in the server. Heres the code i've made:

function noNickChange() -- Creates the function 
        outputChatBox("Sorry, but nick changes are not alowed in this server.", source, 0, 255, 0) -- Outputs in the chat box the message 
        cancelEvent() -- cancel the nick change 
    end 
addEventHandler("onPlayerChangeNick", getRootElement(), noNickChange) -- call the function when the player changes his name 

This blocks the /nick command :)

Posted

This blocks any change in nick, so he can't even change his nick from settings (as long as he's in the server).

Posted
This blocks any change in nick, so he can't even change his nick from settings (as long as he's in the server).
I Did what i could. According to the wiki:
"Cancelling this event depends on how it is called, if it is called by the scripting event then it is NOT cancelable if it is called from the /nick command it IS cancel able. If this event is cancelled and can be cancelled then the name will not change."

But i don't understand this, im not a native english speaker.

Posted

I'm not sure, I'm positive that cancelling this event cancels changing your nick however the method is, /nick command, changing it from settings or using setPlayerName.

I have tested it before.

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