player
This namespace provides methods that allow you to interact with your player.
Last updated
This namespace provides methods that allow you to interact with your player.
Last updated
player.getPosition()
Returns your position as a Vec3
Example:
player.setPosition(position)
Only works in devmap.
position
- The position you want to set
Example:
player.getVelocity()
Returns your velocity as a Vec3.
Example:
player.setVelocity(velocity)
Only works in devmap.
velocity
- The velocity you want to set
Example:
player.getView()
Returns your viewangles as a Vec3 in the following format
pitch
yaw
roll
Example:
player.setView(viewAngles)
viewAngles
- A Vec3 with the angles you wish to set
Set your viewangles to the ones defined by the given Vec3
Example:
player.getDeltas()
Returns your delta angles as a Vec3.
Example:
player.getCrosshairWorldPosition()
Returns the position the player currently aims at.
Example:
player.get2DSpeed()
Returns your current 2D speed.
Example:
player.getCurrentWeaponID()
Returns the weapon ID of your currently equipped weapon.
Example:
player.setCurrentWeaponID(id)
id
The id of the weapon you want to switch to
Switches weapon to the given weapon ID.
Example:
player.getFPS()
Returns your current FPS.
Example:
player.setFPS(fps)
fps
- The new fps to set
Sets your fps to the given value.
Example:
player.lookAtPosition(position)
position
- A position as a Vec3 that you want to look at
Sets your viewangles so that you directly look at the given position
Example:
player.moveTo(position)
position
- A position as a Vec3 that you want to move to.
Will move to the given position.
Example:
player.getName()
Returns your name.
Example:
player.getMainhandWeaponID()
Returns the id of your main weapon.
Example:
player.getRPGWeaponID()
Returns the weapon id of your rpg.
Example:
player.getWeaponDelay()
Returns the delay of your current weapon. The delay indicates how long the weapon is still unusable or in an animation. For example if you shoot the RPG without ADS then it takes time for the RPG to zoom in and eventually fire the rocket. The delay is a number in miliseconds
how much of that animation is left.
Example:
player.isConnectedToServer()
Returns true if you're connected to a remote server.
Example:
player.isOnLocalServer()
Returns true if you're on a local server.
Example:
player.isSpectating()
Returns true if you're spectating.
Example:
player.isUsingRPG()
Returns true if you're currently using a RPG.
Example:
player.willLeaveGroundThisFrame()
Returns true if you will be considered in air this frame. This can either be the result of jumping or walking of a platform etc.
Example:
player.willTouchGroundThisFrame()
Returns true if you will land on ground this frame.
Example:
player.willTouchGroundNextFrame()
Returns true if you will land on ground next frame.
Example:
player.wasInAirLastFrame()
Returns true if you were in air last frame.
Example:
player.didTouchGroundLastFrame()
Returns true if you landed on ground last frame.hi
Example:
player.willBounceThisFrame()
Returns if you will bounce this frame.
Example:
player.willBounceNextFrame()
Returns if you will bounce next frame.
Example:
Sets your position to the given
Sets your velocity to the given