Ryan1010 Posted August 14, 2009 Share Posted August 14, 2009 I made a script like this; function mutePlayer ( theplayer ) setPlayerMuted ( theplayer, true ) outputChatBox ( "You Have Been Muted" , theplayer , 000, 255, 000) end addCommandHandler ( "mute", mutePlayer ) function unmutePlayer ( theplayer ) setPlayerMuted ( theplayer, false ) outputChatBox ( "You Have Been UnMuted" , theplayer , 255, 000, 000 ) end addCommandHandler ( "unmute", unmutePlayer ) When I type the commands like: /mute Player .. then I will get muted and not the Player. What am I doing wrong? Link to comment
robhol Posted August 14, 2009 Share Posted August 14, 2009 Take a look at this... http://robhol.net/guide/basics/?p=7 You might wanna read the rest too. Link to comment
Dark Dragon Posted August 14, 2009 Share Posted August 14, 2009 function mutePlayer(player,command,name) local playerToMute = getPlayerFromName(name) setPlayerMuted(playerToMute,true) outputChatBox ("You Have Been Muted",playerToMute,000,255,000) end addCommandHandler("mute",mutePlayer) function unmutePlayer(player,command,name) local playerToUnmute = getPlayerFromName(name) setPlayerMuted (playerToUnmute, false) outputChatBox("You Have Been UnMuted",playerToUnmute,255,000,000) end addCommandHandler("unmute",unmutePlayer) next time have a closer look what arguments you're actually getting. 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