Jump to content
RAGE Multiplayer Community

Search the Community

Showing results for tags 'JS'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • RAGE Multiplayer
    • Announcements
    • Discussion
    • Suggestions
    • RDR2 Multiplayer
  • Scripting
    • Scripting
    • Resources
  • Community
    • Support
    • Servers
    • Media Gallery
  • Non-English
    • Русский - Russian
    • Français - French
    • Deutsch - German
    • Espanol - Spanish
    • Română - Romanian
    • Portuguesa - Portuguese
    • Polski - Polish

Categories

  • Scripts
  • Gamemodes
  • Libraries
  • Plugins
  • Maps
  • Tools

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Facebook


Youtube


Skype


Web


VK

  1. Version 1.0.0

    3 downloads

    A Javascript remake of https://rage.mp/files/file/461-c-player-location-display/ (all credits go to him) Hey! This is my first resource that I am publicly releasing. For you all, I have ported the C# Player Location Display (https://rage.mp/files/file/461-c-player-location-display/) into JS. Install Place `/street` into your server's client_packages directory, then add `require("./street/index.js");` to client_packages/index.js I know the code isn't the best optimized, please feel free to open a pull request on GitHub. GITHUB: https://github.com/realdiegopoptart/ragemp-pld
  2. We are a professional heavy-text roleplay community in need of another server developer that can help us reach our next goals. The community currently holds over 1700 unique discord users and 1500 forum accounts. We are a very active community and the development team is composed of very experienced programmers that work in this field in real life. This is obviously a long-term and paid work. I. REQUIREMENTS Advanced knowledge of at least one of the following: JS, NodeJS + MySQL. II. EXPECTATIONS Ability to meet deadlines. Able to work in a team and share ideas. Past experience in SA:MP or GTA V scripting is a plus. Must know RAGE API and have proven experience in scripting for RAGE, as well as a portfolio to be presented. If you're looking to be part of a professional and huge community as a developer, and you believe you meet your requirements and expectations, please add me on discord oRe#4300 .
  3. We are a professional heavy text based roleplay server in need of a web developer that can help us reach our next goals. Our community is small at the moment but we are a very active community and passionate team, This is obviously a long-term gig and you will be paid per commission. I. REQUIREMENTS Advanced knowledge of at least one of the following: JS PHP II. EXPECTATIONS Ability to meet deadlines. Able to work in a team and share ideas. Past experience in UCP development Must know RAGE API and have proven experience in scripting for RAGE, as well as a portfolio to be presented. If you're looking to be part of a fun community as a developer, and you believe you meet your requirements and expectations, please send me a message on discord hadnan94#4756 Website: https://vibrantrp.com/ Discord: https://discord.gg/dDfrbXUvmB
  4. Hello, I'm working on the UI side of my server. I use Angular 5 and Bootstrap. I'm able to display my Angular application in the game when I display the index.html in the CEF browser: mp.events.add("Login_Show", () => { loginCef = mp.browsers.new("package://myComponent/dist/index.html"); }); My problem comes from the routing. When I want to display another page (e.g. login), I should use the Angular routing: mp.events.add("Login_Show", () => { loginCef = mp.browsers.new("package://myComponent/dist/login"); }); When I use that, I have a 404 because the RageMP http server try to find the folder/index.html (e.g. /login/index.html). So I tried with a .htaccess (according the Angular documentation) to rewrite the index.html rule, but it doesn't work... My question is: How can I manage the routing to be able to display the login page of my Angular application ? Thanks for your help :). C0b0ll
  5. Can someone explain how I can import a resource (NativeUI) to client. My current setup: I have been writing my gamemode using a typescript boiler plate (https://github.com/MarkCavalli/rage-server-start-template) So files in app folder client get compliled to client_packages and same for server into packages However when I try to require a third party script (NativeUI) I get an error TypeError Point is not a constructor I'm importing it into the client via: const NativeUi = require('../libs/nativeui.js') mp.events.add("PlayerJoin", () => { const Menu = NativeUI.Menu; const Point = NativeUI.Point; const UIMenuListItem = NativeUI.UIMenuListItem; const ItemsCollection = NativeUI.ItemsCollection; const ui = new Menu("Test UI", "Test UI Subtitle", new Point(50, 50)); ui.AddItem(new UIMenuListItem( "List Item", "Fugiat pariatur consectetur ex duis magna nostrud et dolor laboris est do pariatur amet sint.", new ItemsCollection(["Item 1", "Item 2", "Item 3"]) )); }) Can anyone help me? I'm completely stuck for ideas on how I can get this to work.
  6. Colshape.position return undefined. Is there any ways to get position of colshape clientside. Colshape.getCoords(true/false) also return undefined
  7. Version 1.0.0

    326 downloads

    Only tested on 1.1 When the player is ready it invokes the natives and sets the pause menu title text. To change the colour or text please read the comments in hud.js It replaces the weapon wheel colour and pause menu accent colour Example These examples used { r: 255, g: 0, b: 0 } Github repo: https://github.com/Dankyss/RageMP-Custom-Hud-Colour-and-Title
  8. Can someone help me with the function for mileage?
  9. Hello! Help me please. Why this error is happening? I'm using it on client-side.
  10. Version 1.0.1

    1602 downloads

    This is a Vehicleseat Menu in JavaScript for Rage:MP Install: Unzip vehicleseatJS.zip in your root server folder. Use: Press "F" or "G" when a Vehicle nearby you. Contact: You can Contact me on Discord for Questions. {Brace}#0571 Have fun!
  11. Hey there, folks! I recently asked myself, how I can retrieve the current FPS of a client, because there is no inbuild function at all. Here's a small snippet for retrieving the current FPS in TypeScript (if you want to use it in JS just compile it with a TS transcompiler or adapt it 😐). /* Copyright 2019 Vincent Heins/TheMysteriousVincent Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ class FPSCalculator { private fps = 0; constructor() { let lastFrameCount = this.getFrameCount(); setInterval(() => { this.fps = this.getFrameCount() - lastFrameCount; lastFrameCount = this.getFrameCount(); }, 1000); } public get(): number { return this.fps; } private getFrameCount(): number { return mp.game.invoke('0xFC8202EFC642E6F2') as number; // '0xFC8202EFC642E6F2' is a method of GTA5 which returns the frame count since the game was started (see http://www.dev-c.com/nativedb/func/info/fc8202efc642e6f2 for ref.) } } export const FPS = new FPSCalculator(); Or, if you prefer a Gist: https://gist.github.com/TheMysteriousVincent/42a4b00b4c34b6dd27423e48bd5c6c52 Or additionally, if you prefer the download section of RageMP: Sincerely, ~Vincent
  12. Idle

    Lucky wheel

    Version 1.1.0

    378 downloads

    Lucky wheel is synced. Coords: 1110.8710, 228.8737, -49.6358 resource on my github: https://github.com/Sokol123456/luckywheel Added support for 0.3.7, check github
  13. Does anybody know how to fix this error? [INFO] Loading NodeJS packages... [ERROR] "node_modules" package loading failed, exception stack: Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import 'C:\RAGEMP\server-files\packages\node_modules\index.mjs' is not supported resolving ES modules imported from C:\RAGEMP\server-files\bin\loader.mjs at finalizeResolution (internal/modules/esm/resolve.js:267:17) at moduleResolve (internal/modules/esm/resolve.js:668:10) at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:779:11) at Loader.resolve (internal/modules/esm/loader.js:85:40) at Loader.getModuleJob (internal/modules/esm/loader.js:229:28) at Loader.import (internal/modules/esm/loader.js:164:28) at importModuleDynamically (internal/modules/esm/translators.js:86:35) at exports.importModuleDynamicallyCallback (internal/process/esm_loader.js:30:14) at loadPackages (file:///C:/RAGEMP/server-files/bin/loader.mjs:2:247) at file:///C:/RAGEMP/server-files/bin/loader.mjs:4:7
  14. CXXY

    remote event error

    Client side: class KeyManager { constructor() { mp.keys.bind(0x11, true, function() { if(mp.players.local.vehicle && mp.players.local.vehicle.getPedInSeat(-1) === mp.players.local.handle) { mp.events.callRemote('BANG_onVehicleShotPrimary', mp.players.local.vehicle.getForwardVector()); } }); } } export default new KeyManager(); Server side: [RemoteEvent ("BANG_onVehicleShotPrimary")] public void BANG_onVehicleShotPrimary (Client player, object[] arguments) { player.SendChatMessage("HALLILUAH"); } Console: at object RuntimeMethodHandle.InvokeMethod(object target, object[] arguments, Signature sig, bool constructor) at object System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(object obj, object[] parameters, object[] arguments) at void GTANetworkInternals.RemoteEventParser.Parse(Client sender, ulong eventNameHash, object[] args) in C:\Users\Adam\Documents\Git\comp-layer2\BootstrapperNC\Handlers\ResourceInfo.cs:line 62 at void GTANetworkInternals.RemoteEventHandler.Parse(Client sender, ulong eventNameHash, object[] arguments) in C:\Users\Adam\Documents\Git\comp-layer2\BootstrapperNC\Handlers\ResourceInfo.cs:line 67 System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —-> System.NullReferenceException: Object reference not set to an instance of an object. at void GC_FunGame.Main.BANG_onVehicleShotPrimary(Client player, object[] arguments)
  15. Is it possible to create a god mode for player (endless HP/No damage) on JS ? And how ?
  16. XCRON

    Easy Whitelist

    Version 1.0.0

    869 downloads

    RAGEMP-EasyWhitelist This is a basic whitelist system for your server. Just place it in the packages folder & it works! Installation Just place the folder "easy-whitelist" in the packages folder. How to add users to the whitelist Go in the packages folder > then "easy-whitelist" > and edit the file account.json There you have to add the SocialClub ID. Restart Server & its done. Github: https://github.com/XCRON-DEV/RAGEMP-EasyWhitelist For questions or help DM me here.
  17. Hi When I spawn or change the model of a vehicle from the clientside, in the console I get the following error. System.NullReferenceException: Object reference not set to an instance of an object. at void GTANetworkInternals.RemoteEventParser.Parse(Player sender, ulong eventNameHash, object[] args) The code works, the vehicle changes model and everything is fine, but the error appears for each model change, so I get the same error every time a user wants to buy a vehicle and choose the vehicle model. The spawn code is: auto.entity = mp.vehicles.new(mp.game.joaat(dataVehicles.Vehicles[0].Model), new mp.Vector3(-42.79771, -1095.676, 26.0117), { alpha: 255, color: [[0, 0, 0], [0, 0, 0]], locked: true, engine: false, dimension: dim }); auto.entity.setRotation(0, 0, 0, 2, true); And the change model code is: auto.entity.model = mp.game.joaat(auto.vehiclesList[value].Model); Any idea to fix the error? Thx
  18. Hello. I'm trying to connect to mysql database and execute a query but it doesn't work. It doesn't even print "Test" in the console. Here's the code: database.js var mysql = require('mysql'); var mysqlConfig = mp.config.mysql; var mysqlc = mysql.createConnection({ host: mysqlConfig.host, user: mysqlConfig.user, password: mysqlConfig.password, database: mysqlConfig.database }); module.exports.createAccount = function(name) { try { console.log(1); var query = "INSERT INTO `accounts` (`name`, `money`) VALUES ?"; var values = [name, 0]; console.log("Connecting to database.."); mysqlc.connect(function(err) { console.log("Test"); if (err) { console.log("MYSQL ERROR: " + err); } else { console.log("Database connection successful!"); mysqlc.query(query, values, (err, result) => { if (err) throw err; console.log(result); }); } }); } catch (err) { console.log(err); }; }; events.js var db = require('./database'); mp.events.add('playerJoin', (player) => { db.createAccount(player.name); }); This is my console output: [N] Starting network... - OK: (IPv4-only) at 127.0.0.1:22005 (node:13956) ExperimentalWarning: The ESM module loader is experimental. Loading packages "test" loaded [P] Plugin bridge.dll loaded! Started HTTP server at 22006 port. 1 Connecting to database..
  19. Hallo, ich bin gerade dabei einen GTA server zu machen habe schon vieles fertig wollte mich aber mal ran machen menüs zu erstellen. Da ich NativeUI eine ganz nette sache finde, habe ich es in erwegung gezogen dies zu verwenden. Habe es hinbekommen listItems, slider zu machen aber ich kriege es nicht hin ein CheckboxItem zu machen also ich kriege es schon hin das das im menu angezeigt wird aber wenn ich darauf klicke passiert nichts weil ich nicht weis wie ich das checkbox item mit code Versehe. ps. Ich nutze Javascript
  20. Good day to you, my friends! I'm looking for a developer, who will bring the project to its logical conclusion. We need to get the progress, but our current team can't end their work in time. It would be great, if you have an experience in this theme. Current platform - Rage Multiplayer, requires Jscript, Node.js, php. Contact: Discord - justlead#7361
  21. I want to make the player look in a certain direction, but I can not do this with the 'gameplay' camera, and I do not need to create a new 'default'. How to be this will only work with the new 'default' camera, if you use the 'gameplay' camera, you can’t set the position for viewing. Help pls mp.events.add("setPlayerCameraInPos", (x, y, z) => { let newCamera = mp.cameras.new("gameplay"); // get the forwarding vector of the direction you aim with the gameplay camera as Vector3 // newCamera.setRot(x, y, z, 2); // Does not work newCamera.pointAtCoord(x, y, z); // Does not work newCamera.setActive(true); mp.game.cam.renderScriptCams(true, false, 0, true, false); });
  22. Wir von ProjectNine Suchen: - Clientside Entwickler mit Erfahrung in Javascript, HTML, CSS - Server Side Entwickler mit Erfahrung in C# - Serverseitig arbeiten wir mit MongoDB Zu unseren Project: Wir sind eine MultiGaming Community die anfänglich mit einen Arma 3 Project ein guten Erfolg verzeichnen konnten, wir hatten eine eigene Map und ganz eigene Modifikationen. Jetzt haben wir uns dazu beschlossen das wir zu GTA RageMP wechseln möchten. Aktuell haben wir schon ein gutes Grundgerüst, wo wir jetzt noch ein paar Feinschliffe bis zur Open Alpha brauchen, derzeit befindet sich unserer Server in der Closed Alpha. Was können wir bieten? - Ein gut funktionierendes & strukturiertes Bitbucket - Eine ganz nette Community mit einen familiären Miteinander - Ein gut funktionierendes & organisiertes Deploy-System ( Jenkins ) - Eine klar organisierte Projektleitung - Viele eigene Systeme wie zb. Leitstellensystem, Banksystem, Jobsystem, uvm. - Eine gute Infrastruktur ( Test- & Live-Umgebung ) Was erwarten wir von dir? - C# oder Javascript Grundkenntnisse - Datenbank Erfahrung (MongoDB) ( Von Vorteil ) - Ein funktionierendes Mikrofon und Teamspeak 3 Mindestalter von 18+ - Freundlichkeit, Teamfähigkeit & Vertrauenswürdigkeit - Vorteilhaft wären ein paar Grundkenntnisse mit GTA5 Voice Plugin ( Lizenz vorhanden ) Haben wir dein Interesse geweckt, wenn ja melde dich im Forum bei einen Head of V-Game Entwicklung oder im Teamspeak. Forum: https://forum.projectnine.de/ Teamspeak: projectnine.de Mit freundlichen Grüßen SPA_Schlaefer (Head of V-Game Entwicklung)
  23. ynhhoJ

    Compass

    Version 1.0.0

    451 downloads

    Just simple compass what you can use. You need to add compass.js path, to index.js on client_packages.
  24. Einfache Befehle mit Javascript Veröffentliche meine selbstgemachten Befehle. (Basic Befehle & Befehle mit Paramtern) Die Befehle /car <Fahrzeugname> /skin <Skinname> /heal <ID> /armor <ID> /kill <ID> /time <00 00 00> /weather <sunny rain xmas halloween snow fog thunder.... /raw <ID> /fix /waffe <Waffenname> <Munition> /tp <X> <Y> <Z> /kick <ID> /ban <ID> /tune neon /plate <Text> /pos /a <Text> /me <Text> /o <Text> /n <Text> /*#########################################################################################################*/ /*#########################################################################################################*/ /*######################################################################################################### REGISTER >> ADMINBEFEHLE >> ALLGEMEINE BEFEHLE >> CHAT BEFEHLE >> SONSTIGE BEFEHLE /*#########################################################################################################*/ /*#########################################################################################################*/ /*#########################################################################################################*/ /* ADMINBEFEHLE */ //FAHRZEUG SPAWNEN############################## mp.events.addCommand("car",(player,vehName)=>{ let pos = player.position; pos.x +=2; if (vehName && vehName.trim().length > 0) { mp.vehicles.new(mp.joaat(vehName),pos,{ color: [[0, 100, 0],[0, 100, 0]], engine: true }); } else player.outputChatBox("Benutze /car <Fahrzeugname>"); }); //SKIN ÄNDERN################################## mp.events.addCommand('skin', (player,skinName) => { if (skinName && skinName.trim().length > 0) player.model = mp.joaat(skinName); else player.outputChatBox(`Benutze /skin <Skinname>`); }); //HEILEN######################################## mp.events.addCommand("heal",(player,target)=>{ let newTarget = mp.players.at(target); if(!target || isNaN(target)) return player.outputChatBox("Benutze /heal <ID>"); if(newTarget === null) return player.outputChatBox("Unbekannter Spieler"); newTarget.outputChatBox(`[ADMIN] ${player.name} hat dich geheilt.`); newTarget.armour = 100; player.notify('~g~Erfolgreich'); return; }); //PANZERUNG###################################### mp.events.addCommand("armor",(player,target)=>{ let newTarget = mp.players.at(target); if(!target || isNaN(target)) return player.outputChatBox("Benutze /armor <ID>"); if(newTarget === null) return player.outputChatBox("Unbekannter Spieler"); newTarget.outputChatBox(`[ADMIN] ${player.name} hat dir Panzerung gegeben.`); newTarget.armour = 100; player.notify('~g~Erfolgreich'); return; }); //KILL########################################### mp.events.addCommand("kill",(player,target)=>{ let newTarget = mp.players.at(target); if(!target || isNaN(target)) return player.outputChatBox("Benutze /kill <ID>"); if(newTarget === null) return player.outputChatBox("Unbekannter Spieler"); newTarget.health = 0; newTarget.outputChatBox(`[ADMIN] ${player.name} hat dich getötet.`); player.notify('~g~Erfolgreich'); return; }); //ZEIT SETZEN##################################### mp.events.addCommand("time",(player,fullText,hour,minute,second)=>{ if(fullText == undefined)return player.outputChatBox("Benutze /time <00 00 00>"); if(hour >= 25 || minute >= 61 || second >= 61)return player.outputChatBox("Stunde: 1-24 | Minute: 1-60 Sekunde: 1-60"); mp.world.time.set(hour,minute,second); }); //WETTER SETZEN################################## mp.events.addCommand("weather",(player,cmd)=>{ let arr = cmd.split(' '); if(arr[0] == 'sunny')return mp.world.weather = 'EXTRASUNNY'; if(arr[0] == 'clear')return mp.world.weather = 'CLEAR'; if(arr[0] == 'clouds')return mp.world.weather = 'CLOUDS'; if(arr[0] == 'smog')return mp.world.weather = 'SMOG'; if(arr[0] == 'rain')return mp.world.weather = 'RAIN'; if(arr[0] == 'thunder')return mp.world.weather = 'THUNDER'; if(arr[0] == 'snow')return mp.world.weather = 'SNOW'; if(arr[0] == 'xmas')return mp.world.weather = 'XMAS'; if(arr[0] == 'halloween')return mp.world.weather = 'HALLOWEEN'; else player.outputChatBox("Benutze /weather <Wettername>"); }); //WAFFEN ENTFERNEN############################### mp.events.addCommand('raw', (player,target) => { let newTarget = mp.players.at(target); if(!target || isNaN(target)) return player.outputChatBox("Benutze /raw <id>"); if(newTarget === null) return player.outputChatBox("Unbekannter Spieler]"); newTarget.outputChatBox(`[ADMIN] ${player.name} Hat dich geheilt`); newTarget.removeAllWeapons(); player.notify('~g~Erfolgreich'); newTarget.outputChatBox(`[ADMIN] ${player.name} hat deine Waffen entfernt!`); }); //FAHRZEUG REPARIEREN############################ mp.events.addCommand('fix', (player) => { if (player.vehicle) player.vehicle.repair(); else player.outputChatBox("Du befindest dich in keinem Fahrzeug!"); }); //WAFFEN########################################### mp.events.addCommand("waffe",(player,fullText,weapon,ammo)=>{ if(fullText == undefined){ player.outputChatBox("Benutze /waffe <Waffen_Hash> <Munition> || 10000"); player.outputChatBox("Beispiel : /waffe weapon_smg 100"); return; } let weaponHash = mp.joaat(weapon); player.giveWeapon(weaponHash,parseInt(ammo)||10000); return; }); //TELEPORT XYZ##################################### mp.events.addCommand('tp', (player, _, x, y ,z) => { if (!isNaN(parseFloat(x)) && !isNaN(parseFloat(y)) && !isNaN(parseFloat(z))) player.position = new mp.Vector3(parseFloat(x),parseFloat(y),parseFloat(z)); else player.outputChatBox(`Benutze /tp <X> <Y> <Z>`); }); //KICK############################################# mp.events.addCommand('kick', (player, target) => { let newTarget = mp.players.at(target); if(!target || isNaN(target)) return player.outputChatBox("Benutze /kick <SpielerID>"); if(newTarget === null) return player.outputChatBox("Unbekannter Spieler"); newTarget.kick(); newTarget.outputChatBox("Du wurdest gekickt"); player.notify('~g~Erfolgreich'); }); //BAN############################################## mp.events.addCommand('ban', (player, target) => { let newTarget = mp.players.at(target); if(!target || isNaN(target)) return player.outputChatBox("Benutze /ban <SpielerID>"); if(newTarget === null) return player.outputChatBox("Unbekannter Spieler.") newTarget.ban('Du wurdest gebannt.'); player.notify('~g~Erfolgreich'); }); //NUMMERNSCHILD SETZEN############################# mp.events.addCommand('plate', (player, _, plate) => { if(player.vehicle) { player.vehicle.numberPlate = plate; } else player.outputChatBox("Du befindest dich in keinem Fahrzeug!"); }); //TUNE############################################# mp.events.addCommand('tune', (player, cmd) => { let arr = cmd.split(' '); if (!player.vehicle)return player.outputChatBox("Du befindest dich in keinem Fahrzeug!"); if (arr[0] == 'neon' && player.vehicle) { player.vehicle.setNeonColor(255, 255, 0); } }); /*#########################################################################################################*/ /*#########################################################################################################*/ /*#########################################################################################################*/ /* ALLGEMEINE BEFEHLE */ //Position############################################### mp.events.addCommand("pos",(player) => { player.outputChatBox(`${player.position}`); return; }); /*#########################################################################################################*/ /*#########################################################################################################*/ /*#########################################################################################################*/ /* CHAT BEFEHLE */ //Adminchat############################################# mp.events.addCommand("a",(player,fullText)=>{ if(fullText == undefined)return player.outputChatBox("Benutze /a <Text>"); mp.players.broadcast(`[ADMIN] ${player.name} >> !{#00d5ff}${fullText}`); }); //Me################################################### mp.events.addCommand("me",(player,fullText)=>{ if(fullText == undefined){ player.outputChatBox("/me <Text>") return; } mp.players.broadcastInRange(player.position,20,`!{#C6A6E0}${player.name} ${fullText}`); }); //OOC-CHAT############################################ mp.events.addCommand("o",(player,fullText)=>{ if(fullText == undefined)return player.outputChatBox("Benutze /o <Text>"); mp.players.broadcast(`[OOC-CHAT] ${player.name} >> ${fullText}`); }); //LIFEINVADER CHAT (LIVE)############################# mp.events.addCommand("n",(player,fullText)=>{ if(fullText == undefined)return player.outputChatBox("Benutze /n <Text>"); mp.players.broadcast(`[LIVE] ${player.name} >> ${fullText}`); }); /*#########################################################################################################*/ /*#########################################################################################################*/ /*#########################################################################################################*/ /* SONSTIGE BEFEHLE */ //Warp (Ka was das dastellen soll Wahscheinlich fesseln) mp.events.addCommand('warp', (player, _, playerID) => { if (playerID && playerID.trim().length > 0) { let sourcePlayer = mp.players.at(parseInt(playerID)); if (sourcePlayer) { let playerPos = sourcePlayer.position; playerPos.x += 1; player.position = playerPos; } else { player.outputChatBox(`<b>Warp:</b> player with such ID not found!`); } } else player.outputChatBox(`<b>Command syntax:</b> /warp [player_id]`); });
×
×
  • Create New...