Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/13/19 in all areas

  1. https://github.com/root-cause/v-besttorso Just read the README.md on GitHub and have fun...
    2 points
  2. Version 1.0.1

    832 downloads

    Simple kill feed script that displays recent deaths on the server. Installing Put the files you downloaded in their respective places Add require('killfeed') to client_packages/index.js All done Notes Even though this is a kill feed script, you can send other messages to players by passing a string (your message) to pushToKillFeed event. The kill feed is located below the ammo counter HUD element. The kill feed displays 5 items (variable: maxKillFeedItems) and will display an item for 30 seconds. (variable: killFeedItemRemoveTime) Not all death reasons are detected but weaponData.json covers most cases. Default kill feed font might not support all characters.
    1 point
  3. Anbei ein Script um den Spieler zu finden, der in einem bestimmten Umkreis am nächsten zu mir steht: Serverseitig var currentTarget = null; function getNearestPlayer(player, range) { let dist = range; mp.players.forEachInRange(player.position, range, (_player) => { if(player != _player) { let _dist = _player.dist(player.position); if(_dist < dist) { currentTarget = _player; dist = _dist; } } } ); } Benutzen kann man das dann so: mp.events.add("event_to_call", (player) => { getNearestPlayer(player, 5); if(currentTarget) { // Habe einen oder mehrere Spieler im Umkreis von 5 Metern gefunden und currentTarget ist nun der der am nächsten dran ist. } }); Das ganze geht auch mit Fahrzeugen: var currentTarget = null; function getNearestVehicle(player, range) { let dist = range; mp.vehicles.forEachInRange(player.position, range, (_vehicle) => { let _dist = _vehicle.dist(player.position); if(_dist < dist) { currentTarget = _vehicle; dist = _dist; } } ); } mp.events.add("event_to_call", (player) => { getNearestVehicle(player, 2); if(currentTarget) { // ... siehe oben, prüfen wem Fahrzeug gehört, ob abgeschlossen etc. etc. } });
    1 point
  4. mp.world.trafficLights.locked = true; mp.world.trafficLights.state = 0; setLights(); function setLights() { mp.world.trafficLights.state = 39; setTimeout(function(){ mp.world.trafficLights.state = 88; setTimeout(function(){ mp.world.trafficLights.state = 49; setTimeout(function(){ mp.world.trafficLights.state = 88; setTimeout(function(){ mp.world.trafficLights.state = 39; setTimeout(function(){ mp.world.trafficLights.state = 0; setTimeout(function(){ setLights(); }, 25000); // Grünphase West -> Ost }, 2000); // Grün werden West -> Ost }, 4000); // Gelbphase Nord -> Süd }, 15000); // Grünphase Nord -> Süd }, 2000); // Grün werden Nord -> Süd }, 4000); // Gelbphase West -> Ost } Diese Serverseitige Funktion wird beim Serverstart ausgeführt und startet sich danach immer wieder selbst. Die Zeiten (4000, 2000, 15000 und 25000) könnt ihr nach belieben anpassen.
    1 point
  5. Avantgarde Role Play Review Positive - Server is running stable Negative - Bad Translation of the languages - bad distribution of job points (example: Orange farmer 5 Points, Bus driver 1 Point per trip) - server is not really visited - some professions are not possible without money (example: deliveryman, mule trucker not possible without vehicles) - most things only happen in Paleto(the rest, map is empty)
    1 point
  6. Mit diesem kleinen Tutorial könnt Ihr MongoDB als Datenbank verwenden Im Hauptordner des Servers folgendes ausführen: npm install mongoose Alle folgenden Snippets werden Serverseitig verwendet, z.B. im Ordner "packages/mongo" index.js var mongoose = require('mongoose'); mongoose.connect('mongodb://localhost:27017/dbname', {useNewUrlParser: true}); Jetzt benötigen wir noch ein paar Klassen, z.B. im Unterordner "packages/mongo/Classes" accounts.js var mongoose = require('mongoose'); var Schema = mongoose.Schema; var accountsSchema = new Schema({ socialClub: String, registered: { type: Date, default: Date.now }, registerIP: String, lastIP: String, lastConnect: { type: Date, default: Date.now }, isOnline: Boolean, playTime: Number, isAdmin: Boolean, isSupporter: Boolean, isIngameSupporter: Boolean, isDeveloper: Boolean, isWhitelister: Boolean, isCop: Boolean, isMedic: Boolean, isACLS: Boolean, isJustice: Boolean, rankCop: Number, rankMedic: Number, rankACLS: Number, rankJustice: Number, lastDisconnect: { type: Date, default: Date.now }, }); exports.model = accountsSchema; Jetzt binden wir diese Klasse in unsere index.js ein: ... var Schema = mongoose.Schema; var accounts = require('./classes/accounts.js'); exports.accounts = accounts.model; Jetzt wollen wir in einem anderen Modul diese Collection nutzen login.js var mongoose = require('mongoose'); var db = require('../mongo/index.js'); var accounts = mongoose.model('accounts', db.accounts); Ok wir haben nun Zugriff auf die Datenbank und das Schema für die Documents Wir prüfen ob ein Spieler bereits einen Account hat in der login.js, dafür kann "playerReady" oder "playerJoin" verwendet werden, ich prüfe das erst nach dem Download der client_packages: mp.events.add('playerReady', (player) => { accounts.findOne({ 'socialClub': player.socialClub }).then(function (account) { if(account) { // Ja, account gefunden } }); }); Jetzt werden wir den Account aktualisieren: accounts.findOne({ 'socialClub': player.socialClub }).then(function (account) { if(account) { var now = new Date(); accounts.updateOne(account, { $set: { 'lastConnect': now, 'isOnline': true, 'lastIP': player.ip } }); } }); Das geht aber auch noch komfortabler: accounts.findOne({ 'socialClub': player.socialClub }).then(function (account) { if(account) { var now = new Date(); account.lastDisconnect = now; isOnline = true; playTime = account.playTime + (now - account.lastConnect); account.save(); } }); Beim Serverstart alle Accounts auf Offline setzen: accounts.updateMany( { 'isOnline': true }, { $set: { 'isOnline': false } } ); Sollte kein Account vorhanden sein, legen wir einen an: function newAccount(player) { var now = new Date(); var adoc = new accounts({ 'socialClub': player.socialClub, 'registered': now, 'registerIP': player.ip, 'lastIP': player.ip, 'lastConnect': now, 'isOnline': true, 'playTime': 0, 'isAdmin': false, 'isSupporter': false, 'isIngameSupporter': false, 'isDeveloper': false, 'isWhitelister': false, 'isCop': false, 'isMedic': false, 'isACLS': false, 'isJustice': false, 'rankCop': 0, 'rankMedic': 0, 'rankACLS': 0, 'rankJustice': 0 }); adoc.save().then(function(adoc) { mp.events.call("loadCharacter", player); }); } Ich hoffe das dies euch unterstützt, falls ihr mal mit MongoDB arbeiten wollt.
    1 point
  7. How did you solve it?
    0 points
  8. This is a small guide on how to install RAGE Multiplayer correctly. If you have any questions or issues, post a thread in our support section. Step 1 The first thing you have to do is download RAGE Multiplayer. You can do that by clicking here. Save this file anywhere on your computer. Step 2 Open the file. This will open the installer. You will first be met by our license agreement screen, which you have to read through and accept if you want to continue. Step 3 After clicking on the 'I Agree' button, you will now be prompted to enter the location you want to install RAGE Multiplayer in. We recommend that you install RAGE Multiplayer anywhere other than your GTA V directory. By default it will select your OS drive and install it in a separate folder. You can either manually type a location or click on the 'Browse' button if you want to navigate to a different location (1). Once you're done, click on 'Install' (2). Step 4 It will automatically download all required files and install RAGE Multiplayer for you. This will also automatically create a shortcut on your desktop. Once the installation has finished, click on 'Next'. Step 5 The installation has now finished. You can uncheck the box (1) if you do not want RAGE Multiplayer to automatically start after you close the installation. Click on 'Finish' (2) when you're ready to finish the installation. Step 6 Double click the shortcut on your desktop to run RAGE Multiplayer. It will run the updater and update your game if necessary. Step 7 RAGE Multiplayer is now ready to be used. You can click on the 'Settings' button to change your nickname or GTA V directory. Step 8 That's it! You're ready to play RAGE Multiplayer.
    0 points
×
×
  • Create New...