Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/21/20 in Files

  1. Version 1.0.0

    243 downloads

    Requires RAGE Multiplayer 1.1.0 and above. This resource adds the ability to create classic GTA style pickups we all love. Installing Put the files you downloaded in their respective places Add require('fake-pickups') to client_packages/index.js All done Serverside API Global mp object extension: // Properties /* Returns the amount of existing pickups. */ mp.fakePickups.length; // Functions /* Creates a pickup. * model - Model name or hash, such as prop_armour_pickup. * position - Position of the pickup, recommended: mp.Vector3 instance * pickupRange - Collection range of the pickup. * respawnTime - Respawn time of the pickup after collection, values less than 1 will disable respawning of the pickup. * dimension - Dimension of the pickup. */ mp.fakePickups.new(model, position, pickupRange, respawnTime, dimension = 0); /* Returns the pickup instance with specified ID. */ mp.fakePickups.at(id); /* Returns whether a pickup with specified ID exists. */ mp.fakePickups.exists(id); /* Returns an array of existing pickups. */ mp.fakePickups.toArray(); FakePickup class: // Properties /* ID of the pickup, read only. */ instance.id; /* Model hash of the pickup, read only. */ instance.model; /* Position of the pickup, read only. */ instance.position; /* Collection range of the pickup, read only. */ instance.pickupRange; /* Respawn time of the pickup, can be changed. */ instance.respawnTime; /* Light data of the pickup, read only. */ instance.lightData; /* Whether the pickup is collected, read only. */ instance.isCollected; /* Dimension of the pickup, can be changed. */ instance.dimension; // Functions /* Allows you to set light data of the pickup, argument names should be obvious. If you want to remove the pickup's light, use resetLightData instead of this function with weird values. */ instance.setLightData(red, green, blue, range, intensity, shadow); /* Resets light data of the pickup. */ instance.resetLightData(); /* Respawns the pickup. (if collected) */ instance.respawn(); /* Destroys the pickup. */ instance.destroy(); Events: /* fakePickupSpawn is called when a pickup's prop is created. (Basically when it's created and respawned) */ mp.events.add("fakePickupSpawn", (pickup) => { // code here }); /* playerCollectFakePickup is called when a player collects a pickup. This event is cancelable. (Check example script) */ mp.events.add("playerCollectFakePickup", (player, pickup, cancel) => { // code here }); Example Script // setLightData calls are optional and you don't have to use them, just makes the pickups stand out at night time. const moneyPickup = mp.fakePickups.new("ex_prop_exec_cashpile", new mp.Vector3(1571.681, 3163.909, 40.331), 1.0, 5000); moneyPickup.setLightData(114, 204, 114, 2.0, 2.5, 15.0); const healthPickup = mp.fakePickups.new("prop_ld_health_pack", new mp.Vector3(1568.648, 3166.397, 40.331), 1.0, 5000); healthPickup.setLightData(53, 154, 71, 2.0, 2.5, 15.0); const armorPickup = mp.fakePickups.new("prop_armour_pickup", new mp.Vector3(1567.359, 3169.639, 40.331), 1.0, 5000); armorPickup.setLightData(93, 182, 229, 2.0, 2.5, 15.0); const weaponPickup = mp.fakePickups.new("w_mg_combatmg", new mp.Vector3(1569.465, 3172.773, 40.331), 1.0, 5000); weaponPickup.setLightData(255, 133, 85, 2.0, 2.5, 15.0); // You're better off using custom properties with your pickup instance, this code is for testing purposes. mp.events.add("playerCollectFakePickup", (player, pickup, cancel) => { if (pickup === moneyPickup) { player.outputChatBox("You picked up some money."); } else if (pickup === healthPickup) { if (player.health >= 75) { player.outputChatBox("You're just fine, no need to waste a health pack."); // Doing cancel.cancel = true; prevents the pickup from being marked as collected. cancel.cancel = true; return; } player.health = 100; player.outputChatBox("Health refilled."); } else if (pickup === armorPickup) { if (player.armour > 0) { player.outputChatBox("You already have armor."); // Doing cancel.cancel = true; prevents the pickup from being marked as collected. cancel.cancel = true; return; } player.armour = 100; player.outputChatBox("You picked up some armor."); } else if (pickup === weaponPickup) { player.giveWeapon(mp.joaat("weapon_combatmg"), 9999); player.outputChatBox("You picked up Combat MG."); } }); mp.events.add("fakePickupSpawn", (pickup) => { switch (pickup.model) { case mp.joaat("ex_prop_exec_cashpile"): mp.players.broadcast("The money pickup has respawned."); break; case mp.joaat("prop_ld_health_pack"): mp.players.broadcast("The health pickup has respawned."); break; case mp.joaat("prop_armour_pickup"): mp.players.broadcast("The body armor pickup has respawned."); break; case mp.joaat("w_mg_combatmg"): mp.players.broadcast("The Combat MG pickup has respawned."); break; } }); Source code is available on GitHub in case you don't want to download: https://github.com/root-cause/ragemp-fake-pickups
    4 points
  2. Version 0.3.0

    468 downloads

    League [work in progress] 0.3.0-alpha unstable version The classic tdm gamemode, with opensource code in the github repository. Available systems: 1. Configurable (The most settings you are allowed to edit in ./packages/league/assets/config.json) 2. Saving statistics (And yes, you dont need to install any additional libraries, just ctrl+c, ctrl+v folders) 3. Multi-language (You can easily add a new language just by creating a new json file in lang directory) 4. Groups (user, moderator, admin, root) 5. Notify system based on CEF (notifystack) 6. Voting for maps 7. Support json maps (See an example in assets/maps.json) 8. Some information huds (nametags, voting, team selecting, round info) 9. Chat information (kick, mute) 10. Gamemenu (F2) 11. Deathlog (Killlist) when round is running 12. Control huds Available commands: 1. /rs [map_id_or_code] or /roundstart [map_id_or_code] - Start a new round (In the future will be admin command) Now has admin/root access 2. /re or /roundend - Ends the round (In the future will be admin command) Now has admin/root access 3. /votemap [map_id_or_code] - nominate a map to the start 4. /cl [lang] or /changelang [lang] - change the language 5. group commands: /g rcon [password] - grant super privileges /g login [password] - login as admin or moderator /g addadm [id] [password] - (root only) add a new admin by id /g addmod [id] [password] - (root and admin) add a new moderator by id /g pwd [password] - change a password for login /g user [id] - set a user group for player by id 6. /kick [idOrName] [reason] - (root and admin and moderator only) Kick player by reason 7. /mute [idOrName] [minutes] [reason] - (root and admin and moderator only) Mute player by reason 8. /unmute [idOrName] - (root and admin and moderator only) Unmute player 9. /ct [id|nickname] [att|def|spec] - Change a team by player id/nickname, alias /changeteam 10. /add [id|nickname] - Add a player to the round 11. /remove [id|nickname] - Remove a player from the round 12. /pause - Pause a round when the round is running 13. /unpause - Unpause a round when the round is running Some screenshots: Ver. 0.3.0 download league 0.3.0 from github Gamemode discord for any questions.
    1 point
×
×
  • Create New...