Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/10/18 in all areas

  1. Version 1.0.0

    2085 downloads

    Vehicle Manager is a easy to use device to manage your vehicle easily. Control your doors, lights, Auto-seat belts, engine, and much more with one click. Usage: Press B to open/close the Manager. Click any button you want to control the vehicle.
    3 points
  2. My man fifty grand releasing another resource ayy
    1 point
  3. Thank you for your answers. @cmdflow Your script helped a lot to find the right clothes.
    1 point
  4. Not a big issue, just thought I'd let you know when you're creating something like blips, if you're not changing the value you don't have to put in the same as the default value, not sure but scale could be 1 by default. Just thought I'd mention it cause it can cut down on lines if you end up with some pretty big files. The below would work the same but if you already know this just ignore this, thought I'd let you know just in case. let userBlip = mp.blips.new(60, policeBlipVector, { name: "PoliceHQ", scale: 1, color: 3, drawDistance: 100, shortRange: true, }); //Create a Blip on a Policestation
    1 point
  5. Here is an example code of my server. You just have to require this file in your index.js (server file package) When you run in checkpoint of police station in mission row, you will get clothing of a male police officer and some weapons: //Sets a blip on the map so you see the location let policeBlipVector = new mp.Vector3(446.99676513671875, -983.9864501953125, 30.689605712890625); //Set a Vector3 let userBlip = mp.blips.new(60, policeBlipVector, { name: "PoliceHQ", scale: 1, color: 3, alpha: 255, drawDistance: 100, shortRange: true, rotation: 0, dimension: 0, }); //Create a Blip on a Policestation // creates a checkpoint to run in let copCheckpoint = mp.checkpoints.new(1, new mp.Vector3(458.07373046875, -990.92236328125, 29), 2, { direction: new mp.Vector3(0.2, 0,2, 0.2), color: [ 255, 255, 255, 50 ], visible: true, dimension: 0 }); // Handler if you enter checkpoint (you will add ammo if you run in multiple time as the code does not check if already entered the checkpoint) mp.events.add("playerEnterCheckpoint", (player, checkpoint) => { if(checkpoint === copCheckpoint) { if(player.data.copLevel > 0) { // This var checks if you have coplevel greater then 0 which comes out of database on player login // Remove all weapons player.removeAllWeapons(); // assault rifle player.giveWeapon(0xFAD1F1C9, 200); // pistol player.giveWeapon(0xBFE256D4, 50); // assault tonfa player.giveWeapon(0x678B81B1, 200); // assault tazer player.giveWeapon(0x3656C8C1, 100); // Set Uniform player.setClothes(3,0,0,2); player.setClothes(8,58,0,2); player.setClothes(6,25,0,2); player.setClothes(4,35,0,2); player.setClothes(11,55,0,2); } else { player.notify("You are not a police officer"); } } });
    1 point
  6. For palette always use "2".
    1 point
  7. https://wiki.rage.mp/index.php?title=Player::setClothes It's hard to find the specific values, our developers struggled slightly with it. Best thing to do is just to try different combinations.
    1 point
  8. If you are starting on this type of scripting without a conceptual understanding of programming (scripting/coding) then you will definitely struggle. The lack of documentation (specifically in regard to the Javascript stuff) and the lack of development support will require you to do a lot of digging and testing, yourself. Start a free trial with Lynda.com or Pluralsight.com (just examples) and learn the basics of programming/coding in the language you wish to learn and in it's primary use case. It will assist you greatly and the documentation available will be far easier to understand. Spamming the forums and copying/pasting code is not an efficient way to learn at all.
    1 point
  9. function isAdmin(player) { return Math.floor(Math.random() * (5 - 1)) + 1 === 4 } let commands = { "cmd": (player, param1, param2) => { if (isAdmin(player)) // code here... } } mp.events.add({ "playerCommand" => (player, args) { let [cmd, ...params] = args.split(' ') if (!commands[cmd] || typeof commands[cmd] !== 'function') return false params.unshift(player) commands[cmd].apply(this, params) } )
    1 point
×
×
  • Create New...