Jump to content

setElementRotation


mint3d

Recommended Posts

Set the script as server in your meta and replace your code with this:

  
    function rotation(thePlayer, cmd,value) 
        if not value then end 
        if value and tonumber(value) >= 0 and tonumber(value) <= 360 then 
            outputChatBox("Rotation set to "..value..".",thePlayer) 
             setElementRotation(thePlayer,0,0,tonumber(value),"default",true) 
        elseif value and tonumber(value) == -1 then 
            outputChatBox("Failed to set rotation.",thePlayer) 
        else 
            outputChatBox("Maximum rotation is between 0 and 360.",thePlayer) 
        end 
    end 
    addCommandHandler("rotation", rotation)  
  

Link to comment

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