Dinossauro Posted September 24, 2012 Share Posted September 24, 2012 I made a script that works well. When any manager (only administrators can use the same) writes / dm, enters a different dimension and a message appears: Did another dimension, and make / sairdm to return to the current size and appears: You left dimension. function ( getElementDimension ( source ) == 0 ) setElementDimension ( source, 1 ) setElementDimension ( source, 1 ) outputChatBox( Você entrou na Dimensão ); end end addCommandHandler ( "dm", ElementDimension ) function ( getElementDimension ( source ) == 0 ) setElementDimension ( source, 0 ) setElementDimension ( source, 0 ) outputChatBox( Você saiu da Dimensão ); end end addCommandHandler ( "sairdm", ElementDimension ) But it is giving error. Help me, please! Link to comment
Mossy Posted September 24, 2012 Share Posted September 24, 2012 Can you edit it to put them in LUA tags? And how come there aren't any quotation marks in your message in the outputChatBox? Link to comment
Castillo Posted September 24, 2012 Share Posted September 24, 2012 function ElementDimension ( thePlayer, commandName ) if ( commandName == "dm" ) then setElementDimension ( thePlayer, 1 ) outputChatBox ( "Você entrou na Dimensão", thePlayer ) elseif ( commandName == "sairdm" ) then setElementDimension ( thePlayer, 0 ) outputChatBox ( "Você saiu da Dimensão", thePlayer ) end end addCommandHandler ( "dm", ElementDimension ) addCommandHandler ( "sairdm", ElementDimension ) 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