I hereby claim:
- I am wowjeeez on github.
- I am wowjesus (https://keybase.io/wowjesus) on keybase.
- I have a public key ASCGUdupHxIa1XezrHl6alUjZ3vckNh_7jGdgcl4gmkO-wo
To claim this, I am signing this object:
| import { beforeEach, describe, expect, it, jest } from "@jest/globals"; | |
| import EventEmitter from "node:events"; | |
| import { ServerEventEngine } from "./event.engine"; | |
| import { block, SourceExtraData } from "@msfx/runtime"; | |
| describe("server event engine test", () => { | |
| const serverEmitter = new EventEmitter(); | |
| const clientEmitter = new EventEmitter(); | |
| beforeEach(() => { | |
| global.onNet = (eventName: string, handler: Function) => |
| {} |
| local toggled = false | |
| function notify(string) | |
| SetNotificationTextEntry("STRING") | |
| AddTextComponentString(string) | |
| DrawNotification(true, false) | |
| end | |
| RegisterCommand("focus", function(_, args) | |
| local curr = args[1] == "1" and true or false | |
| toggled = curr |
I hereby claim:
To claim this, I am signing this object:
| function coordsToPerc(X, Y) { | |
| const x = X * 100 | |
| const y = Y * 100 | |
| const style = `style="position:fixed; top:${this.location.y}%; left:${this.location.x}%"` | |
| return {X: x, Y: y, CSS: style} | |
| } |
| function getPointOnLine(vec1, vec2, point) --the point on the line [point is always smaller then the distance between the 2 coords] (to get the coords on the center, just divide the distance with 2) | |
| distance = #(vec1 - vec2) --distance | |
| vec3 = vec1 + (point/distance) * (vec2 - vec1) | |
| return vec3 | |
| end | |
| --p: one-dimensional numner |
| PLEASE NOTE: I've recently discovered that there are more train variations, and some can be different from here | |
| CONFIG: 0 | |
| freight | |
| freightcar | |
| CONFIG: 1 | |
| freight | |
| freightcar | |
| CONFIG: 2 | |
| freight |
| Citizen.CreateThread(function() | |
| local isDead = false | |
| local hasBeenDead = false | |
| local diedAt | |
| while true do | |
| Wait(0) | |
| local player = PlayerId() |