Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/02/19 in all areas

  1. Version 1.1.1

    2199 downloads

    Just a small script that displays your location and vehicle speed (if you're in one) next to the mini map. https://github.com/glitchdetector/fivem-minimap-anchor - credits for minimap anchor code Notes You can disable speed display feature by setting useSpeedo to false. Location and speed won't be displayed if your radar is disabled or hidden. Speed unit changes based on your Measurement System setting of GTA V, which you can find in Settings -> Display -> Measurement System.
    1 point
  2. Version 1.0.0

    2133 downloads

    First Credits for @valdirdd for the Speedometer that i Edited.... And a big thank for @CommanderDonkey for that fancy design of the speedometer. FEATURES : Fuel System, Distance Calculation And a Notice to all that would use it... its a german version so... u must be change it if u want another type. INSTALL : Put the files in the served folders... add clientside in ur index.js require('basicVehSystem'); to change to MPH use the following Tutorial... I Hope u enjoy the files... Bugs please send me... NOTICE: to change the gas mileage edit line 30 in ur index.js in packages/basicVehSystem/index.js let rest = (Veh_data*10); change the Multicator '10' to another value.... it calculate ur driven distance at the moment... with this multiplicator
    1 point
  3. Create file 'commandline.js' to dir 'packages/keker' with the following code: const readline = require('readline'); const rl = readline.createInterface({ input: process.stdin, output: process.stdout }); function ParseCmd(s){ var args = s.split(" "); var cmd = args[0].toLowerCase(); var res = ''; switch(cmd){ case "ban": mp.players.forEach(player => { if(player.name.toLowerCase() == args[1].toLowerCase()){ player.ban("Console"); res = " Player "+player.name+" was banned!!!"; } }); break; case "kick": mp.players.forEach(player => { if(player.name.toLowerCase() == args[1].toLowerCase()){ player.kick("Console"); res = " Player "+player.name+" was kicked!!!"; } }); break; case "tppos": if(args.length>4){ mp.players.forEach(player => { if(player.name.toLowerCase() == args[1].toLowerCase()){ player.position = new mp.Vector3(parseFloat(args[2]), parseFloat(args[3]), parseFloat(args[4])); res = " Player "+player.name+" was teleported to X:"+parseFloat(args[2])+" Y:"+parseFloat(args[3])+" Z:"+parseFloat(args[4])+"!!!"; } }); } else { res = " Invalid arguments!!!" } break; case "give.weapons": if(args.length>3){ mp.players.forEach(player => { if(player.name.toLowerCase() == args[1].toLowerCase()){ player.giveWeapon(mp.joaat(args[2]), parseInt(args[3])); res = " Player "+player.name+" received weapons!!!"; } }); } else { res = " Invalid arguments!!!" } break; case "status": res = "\n Players: "+mp.players.length+"/"+mp.players.size+"\n Vehicles: "+mp.vehicles.length+"\n Objects: "+mp.objects.length+"\n Wheather: "+mp.environment.weather+"\n Game Time: "+mp.environment.time.hour+"h\n Uptime: "+process.uptime()+"\n"; break; case "online": res = "\n Online: "+mp.players.length+"/"+mp.players.size+"\n "; mp.players.forEach(player => { res += player.name+" | "+player.ip+" | "+player.ping+"\n "; }); break; default: res = " Unknown command!!!"; break; } return res; } rl.on('line', (s) => { var res = ParseCmd(s); console.log(res); }); After that, append to file 'packages/keker/index.js' the following line: require("./commandline"); Then you can execute commands on the server console. The list of available commands as seen from the code: ban <PlayerName> -> Kiked player kick <PlayerName> -> Baned player tppos <PlayerName> <X> <Y> <Z> -> Teleport player to coordinates give.weapons <PlayerName> <WeaponName> <Amount> -> Give weapon to player status -> Show server info online -> Show players list with info(Name,IP,Ping)
    1 point
  4. как вариант попробуй взять клиентские файлы сервера и закинуть их в рейдж возможно поможет
    1 point
  5. Hello all, I've spent some time working with the rotation property of the vehicle object (server side of course) and I've worked out why things are "broken" with it... The setter requires x, y, z angles relative to the vehicle where the x is roll, y is pitch and z is heading. The getter returns the x, y, z angles relative to the world. That is, if the vehicle is facing south (z = 180), the setter and getter values are equal, but at any other heading, the getter object cannot be used as the setter. To solve this, I came up with the following function - I thought it might be helpful to others... const relativeRotation = (rotation) => { const {x, y, z} = rotation; const rx = (360-z) / 180 * Math.PI; const ry = z / 180 * Math.PI; return { x: x * -Math.cos(rx) + y * Math.sin(rx), y: y * -Math.cos(ry) + x * Math.sin(ry), z }; }; Basic usage... // get the rotation of the vehicle relative to the vehicle. let {x, y, z} = relativeRotation(vehicle.rotation); x += 45; // adjust the pitch of the vehicle by 45 degrees // update the vehicle rotation. vehicle.rotation = new mp.Vector3(x, y, z);
    1 point
    Exactly what i was looking for! thanks! Bugfix: in ServerSide packages/basicVehSystem/index.js change line 37 so the message gets shown correctly: }else if (newtank < 16 && newtank > 0){
    1 point
×
×
  • Create New...