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

Ingame Name : |DGT|Puma

DGT Clan Server 24/7 Owner/Scripter

MultiGameMode in progress :

n-560x95_FFFFFF_FFFFFF_0283C4_000000.png

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

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Yeah, that's an easier way ;).

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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 :)

cod4-09.png
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.

cod4-09.png

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