Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GENERAL:
- functions;
- schedule(int milliseconds, string script, [arg1, arg2...]) - Create an obj, execute_string when time is up
- string_split(string str, string split, int slice) - Returns split string slice
- itemToID(string name) - Returns the item ID with that name
- findClientByName(string name) - Returns the client ID
- findClientByID(int user_id) - Returns the client ID
- findBrickByName(string name) - Returns the earliest brick ID with name
- findBrickByID(int brick_id) - Returns the brick ID
- isPlayer(id player) - Returns boolean
- isBrick(id brick) - Returns boolean
- isAlive(id player | brick) - Returns boolean
- isSpawnpoint(id brick) - Returns boolean
- kick(id player, string message) - Kicks said player
- newBrick(int x, int y, int z, int xsize, int ysize, int zsize, int color) - Returns brick ID
- dec_to_hex(int dec) - Returns string hexadecimal value
- hex_to_dec(string hex) - Returns int decimal value
- color_to_3d(int color) - Returns a color with flipped R and B values
- string_to_real(string real) - Returns a real number
- new_command(string name, string script) - Creates a chat function
- define(string name) - Creates a script
- execute(string name) - Executes a script
- events;
- onGameConnection(string name, string ip) - Called on connection attempt
- PLAYER:
- globalvars;
- playerCount - Returns the number of players online
- player[i] - Returns player i
- vars;
- player.user_id - Returns the onsite ID of the user (for APIs)
- player.name - Returns the username of the user
- player.ip - Returns the IP address of the user
- player.tool[i] - Returns the item ID in slot i
- player.toolNum - Returns the number of items the player has
- player.team - Returns the team ID
- player.score - Returns the player's score
- functions;
- playerTranslate(id player, int x, int y, int z) - Move player, send new coords
- playerRotate(id player, int x, int y, int z) - Rotate player, send new rotation
- playerScale(id player, int x, int y, int z) - Resize player, send new scale
- playerUnArm(id player) - Disarms the player
- playerArm(id player, id item) - Makes player hold said item (name)
- playerAddItem(id player, id item) - Adds item to player's inventory
- playerKill(id player) - Kills said player
- playerRespawn(id player) - Respawns said player
- playerAddDamage(id player, int damage) - Removes health from player
- playerSetHealth(id player, int health) - Sets health of said player
- playerSetMaxHealth(id player, int health) - Sets the max health of said player
- playerSetColor(id player, string part, int color) - Sets the color of a player's body part
- playerSetSticker(id player, string part, int sticker, int direction) - Sets the sticker of a player's body part
- playerSetScore(id player, int score) - Sets the player's score
- playerSetSpeed(id player, int speed) - Sets player's speed
- playerSetJumpheight(id player, int height) - Sets player's jump height
- playerSetFOV(id player, int fov) - Sets player's FOV
- playerSetCameraDistance(id player, int distance) - Sets player's camera distance
- playerSetCameraPosition(id player, int x, int y, int z) - Sets the player's camera position
- playerSetCameraRotation(id player, int x, int y, int z) - Sets the player's camera rotation
- playerSetCameraObject(id player, id orbit) - Sets the player's camera orbit
- playerSetCameraType(id player, string type) - Sets the player's camera type ("fixed", "orbit", "free", "first")
- playerGetPosition(id player) - Returns "x y z" string
- playerGetRotation(id player) - Returns "x y z" string
- playerGetScale(id player) - Returns "x y z" string
- playerGetArm(id player) - Returns the item id the current player is holding
- playerGetHealth(id player) - Returns the player's health
- playerGetMaxHealth(id player) - Returns the player's max health
- playerGetColor(id player, string part) - Returns body color
- playerGetSticker(id player, string part, int direction) - Returns the sticker of a player's body part
- playerGetScore(id player) - Returns the player's score
- playerGetSpeed(id player) - Returns player's speed
- playerGetJumpheight(id player) - Returns jumpheight
- playerGetLookingAt(id player) - Returns id of focus object
- playerGetLookingAtPos(id player) - Returns the position of focus
- playerGetFOV(id player) - Returns FOV
- playerGetCameraType(id player) - Returns camera type
- playerGetKeyboardPressed(id player, string key) - Returns boolean
- events;
- onPlayerDamage(id player, id enemy, int damage)
- onPlayerDeath(id player, id enemy)
- onPlayerFindSpawn(id player)
- onPlayerSpawn(id player)
- BRICK:
- globalvars;
- brickCount - Returns the number of bricks
- brick[i] - Returns brick i
- spawnBrickCount - Returns the number of spawnbricks
- spawnBrick[i] - Returns spawnbrick i
- vars;
- brick.brick_id - Returns brick ID
- brick.name - Returns brick name
- brick.color - Returns brick color
- functions;
- loadBRK(string filename) - Loads file, returns boolean
- brickTranslate(id brick, int x, int y, int z) - Moves brick, send new coords
- brickRotate(id brick, int x, int y, int z) - Rotates brick, send new rotation
- brickScale(id brick, int x, iwnt y, int z) - Sets brick scale
- brickKill(id brick) - Unlocks brick, "activates physics"
- brickDestroy(id brick) - Removes brick
- brickSetColor(id brick, int color) - Sets brick color
- brickSetLightColor(id brick, int color) - Sets brick light color
- brickSetLightRange(id brick, int range) - Sets brick light range
- brickGetPosition(id brick) - Returns "x y z" string
- brickGetRotation(id brick) - Returns "x y z" string
- brickGetScale(id brick) - Returns "x y z" string
- brickGetShape(id brick) - Returns shapename
- brickGetSticker(id brick, int direction) - Returns sticker
- brickGetLightColor(id brick) - Returns light color
- brickGetLightRange(id brick) - Returns light range
- TEAM:
- vars;
- team.name - Returns team name
- team.color - Returns team color
- team.numMembers - Returns team member count
- team.member[i] - Returns player
- functions;
- teamGetScore(id team) - Returns team score
- events;
- onTeamPick(id player)
- GUI:
- functions;
- messageClient(id player, string message) - Sends a message to said player
- messageAll(string message) - Sends a message to every player
- messageTeam(id team, string message) - Sends a message to every player in said team
- messageExclude(id player, string message) - Sends a message to every player excluding said player
- topPrint(id player, string message, int seconds) - Sets the top print of said player
- topPrintAll(string message, int seconds) - Sets the top print of every player
- centerPrint(id player, string message, int seconds) - Sets the center print of said player
- centerPrintAll(string message, int seconds) - Sets the center print of every player
- bottomPrint(id player, string message, int seconds) - Sets the bottom print of said player
- bottomPrintAll(string message, int seconds) - Sets the bottom print of every player
- buttonBoxClient(id player, string message, string button0, [string button1...]) - Sends a button to the player
- buttonBox(string message, string button0, [string button1...]) - Sends a button to every player
- environmentSetAmbient(int color) - Sets the color of the ambient
- environmentSetSky(int color) - Sets the color of the sky
- environmentSetSkybox(int sticker, int size) - Sets a skybox
- environmentSetBaseplateColor(int color) - Sets the color of the baseplate
- environmentSetBaseplateSize(int size) - Sets the size of the baseplate
- ----------On Player Touch----------
- s = define("onPlayerTouch");
- s.script = '
- var brick,client;
- brick = arg[0];
- client = arg[1];
- if(brick.Name == "TOUCH") {
- Your command here ;)
- }
- ';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement