This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`use strict`; | |
const registeredCommands = new Map(); | |
global.commandHandlers = {}; | |
//////////////////////////////// | |
commandHandlers.add = function (command, callback) { | |
if (typeof command != `string` || typeof callback != `function`) | |
return false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const dayName = { | |
Mon: `Monday`, | |
Tue: `Tuesday`, | |
Wed: `Wednesday`, | |
Thu: `Thursday`, | |
Fri: `Friday`, | |
Sat: `Saturday`, | |
Sun: `Sunday`, | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const colors = { | |
success: new RGB(0, 255, 0), | |
error: new RGB(255, 255, 0) | |
}; | |
const commandHandle = (player, commandText) => { | |
if (commandText[0] != `/`) | |
return; | |
const commandWithoutSlash = commandText.substring(1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let shape1, shape2; | |
let blip1, blip2; | |
shape1 = mp.colshapes.newCircle(-431, 1159, 4); | |
blip1 = mp.blips.new(0, new mp.Vector3(-431, 1159, 326)) | |
//////////////// | |
mp.events.add("playerEnterColshape", | |
function(_, shape) { |