Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/05/20 in all areas

  1. The command&events decorators (@command, @commandable, @event, @eventable) Information Installation Disadvantages Examples Sources Event decorator 1. Information: There is a snippet which helps to registry any commands/events to Rage API with the simple interface by using decorators. Library: rage-decorators [github] [npm-package] If you're using typescript, make sure there two options (experimentalDecorators, emitDecoratorMetadata) are true in your tsconfig.json: { "compilerOptions": { "experimentalDecorators": true, "emitDecoratorMetadata": true }, } 2. Installation: Via npm: $ npm i --save rage-decorators Via yarn: $ yarn add rage-decorators 3. Disadvantages: Disadvantage 1: the snippet requires rage-decorators package 4. Examples: Simple example: My example of command list: 5. Source: Sources is now allowed on github repository and as npm package: https://github.com/READYTOMASSACRE/rage-decorators the source of decorators.ts (server-side only, for supporting events, client-side usage npm package) the source of decorators.js (server-side only, for supporting events, client-side usage npm package) 6. Event decorator: Event decorator is now avaliable in npm package, here an usaging example: import { eventable, event } from 'rage-decorators' @eventable() class Foo { @event("playerJoin") playerJoin(player: PlayerMp): void { console.log(`Player[${player.id}]${player.name} has joined to the server`) } }
    2 points
  2. Version 1.0.0

    932 downloads

    Requires RAGE Multiplayer 1.1.0 and above. Installing Put rappel into your server's client_packages directory, then add require('rappel'); to client_packages/index.js. RAGE Multiplayer's 1.1 will sync the rappelling action so there isn't any need for server-side files. Using Get in a helicopter with FLAG_ALLOWS_RAPPEL (Maverick, Police Maverick and Annihilator) flag as passenger and do /rappel. * Credits to Trevor Productions on YouTube for the preview image.
    1 point
  3. Version 2.0

    1340 downloads

    This script allows developers to run and test their code while in game using their favorite code editor. Preview: https://streamable.com/3fz1ck Features: Executes the code once you save the file Auto destroys the old entities created by hotloader to prevent duplicated entities created and improve rapid developing. Auto destroy old event listeners created by hotloader (`let myEvent = new mp.Event('render', ()=> {})`) , read below. Runs code server-side (hotloader/server/*) Runs code client-side (hotloader/client/*) Note this is not meant to be used in in production. How to use: Drag all the folders into server root (place the packages folder into your server/packages, and the hotloader folder in the server root) in root/hotloader you can do your testing in client.js or server.js or you can create new files in the same directory. You have to save the file to apply the chagnes. Auto entity/event remover is activated only when you declare entities with let/var in the main scope (not in if statements or functions) For events dont use mp.events.add, rather use `let myEvent = new mp.Event('eventName', function)` so hotloader can kill the event listener
    1 point
  4. This function aims to simplify mp.game.gameplay.displayOnscreenKeyboard usage by doing all the work for you and returning a promise. Options title: Title shown on the input box. Default: empty string defaultText: Default value of the input box. Default: empty string maxLength: Obvious enough, maximum length of the input. Default: 32 showMaxLength: If true, will display max length on title. Default: false trimResult: Removes whitespace from the player's input. Default: true rejectIfEmpty: If true, empty input causes promise rejection instead of resolving with an empty string. Default: true timeout: If higher than 0, input box will close & promise will be rejected with the reason "timeout" if the player fails to write something in specified milliseconds. Default: 0 Rejection reasons empty: When the player didn't write anything, needs rejectIfEmpty option to be true. cancelled: When the player closes the input box. keyboard_not_active: No idea on this one, it was in the native description so it's supported. timeout: When the player fails to write something in the specified time, needs timeout option to be set. Download The function and example is on GitHub Gist: https://gist.github.com/root-cause/5137a2b71c922bd24534462595b84a0f Notes - Needs RAGE Multiplayer 1.1 and above since it uses GXT API.
    1 point
  5. Guten Tag Wir suchen einen Scripter der Scripts selber schreiben sowie um schreiben kann. Preis ist verhandelbar. Zum Kontaktieren für Fragen etc Discord: Gizeh#9999 MfG Synthax
    1 point
×
×
  • Create New...