BennyBunny Posted August 6, 2011 Share Posted August 6, 2011 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 Link to comment
bandi94 Posted August 6, 2011 Share Posted August 6, 2011 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 Link to comment
JR10 Posted August 6, 2011 Share Posted August 6, 2011 There is no updates on the freeroam resource so far. Link to comment
Castillo Posted August 6, 2011 Share Posted August 6, 2011 function hideNShow(player) if isPlayerNametagShowing(player) then setPlayerNametagShowing ( player, false ) else setPlayerNametagShowing ( player, true ) end end addCommandHandler("togglenick",hideNShow) Link to comment
JR10 Posted August 6, 2011 Share Posted August 6, 2011 Or just: addCommandHandler("togglenick", function(player) setPlayerNametagShowing( player, not isPlayerNametagShowing( player ) ) end) Link to comment
Castillo Posted August 6, 2011 Share Posted August 6, 2011 Yeah, that's an easier way . Link to comment
Headshot4Fun Posted August 8, 2011 Share Posted August 8, 2011 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 Link to comment
JR10 Posted August 8, 2011 Share Posted August 8, 2011 This blocks any change in nick, so he can't even change his nick from settings (as long as he's in the server). Link to comment
Headshot4Fun Posted August 8, 2011 Share Posted August 8, 2011 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. Link to comment
JR10 Posted August 8, 2011 Share Posted August 8, 2011 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. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now