Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/22/24 in Files

  1. Version 1.0.1

    56 downloads

    Night Shift is a survival gamemode that takes place in the Clucking Bell Farms. A random player is chosen as the hunter while the others become a chicken trying to survive until the timer runs out. Features Play as a chicken or a disgruntled Clucking Bell employee A round system Security cameras, don't miss the action even if you're late to the party (...or got eliminated) Commands /giveup - in case you're stuck, had enough of the chickens or hunters For Developers Since both client and server code is bundled and minified using esbuild, you'll need the dev dependencies if you want to make code changes. to install dev dependencies: npm install --save-dev to bundle clientside files: npm run bundle-client to bundle serverside files: npm run bundle-server The bundled files will be in the "dist" folder. Timer Bars 2 is used for the "CHICKENS LEFT" and "TIME LEFT" UI elements and is a separate download. Server Config There are a bunch of settings you can control using conf.json: nightshift.min_players - minimum amount of players required to start a round, default: 2 players nightshift.round_seconds - duration of a round, default: 300 seconds (5 minutes) nightshift.wait_seconds - time to wait between rounds, default: 20 seconds nightshift.respawn_seconds - respawn time of a player, default: 7 seconds nightshift.hunter_weapon - weapon hash of the hunter, default: 487013001 (WEAPON_PUMPSHOTGUN) (Weapon Hash Reference) nightshift.hunter_ammo - amount of ammo given to the hunter, default: 40 All these settings expect the values to be numbers. Source code is also available on GitHub: https://github.com/root-cause/ragemp-night-shift
    1 point
  2. Version 1.0.1

    109 downloads

    Arena is a vehicle based deathmatch gamemode that takes place inside the Maze Bank Arena. Features Rounds The arena gets a new look every 10 minutes (configurable) to keep things fresh. With 30 themes and 10 lighting styles, things will always look different! Power Ups Every time a player is killed, there's a 33% chance (configurable) they'll drop a power-up. There are currently 4 types of power-ups: Armored - makes the minitank more durable against rockets Ghost - hides the player's icon Jumping - activates the minitank's jumping ability, greatly improving maneuverability Repair - repairs the minitank Armored, ghost and jumping power-ups stay active until the player dies. Scoreboard There is a scoreboard to see your and the top 10 player's kill/death stats by holding TAB. Commands /giveup - in case you're bugged or just want to respawn For Developers Since both client and server code is bundled and minified using esbuild, you'll need the dev dependencies if you want to make code changes. to install dev dependencies: npm install --save-dev to bundle clientside files: npm run bundle-client to bundle serverside files: npm run bundle-server The bundled files will be in the "dist" folder. Server Config There are a bunch of settings you can control using conf.json: arena.round_seconds - round time, default: 600 seconds (10 minutes) arena.round_wait_seconds - time between a round ending and another one starting, default: 10 seconds arena.respawn_seconds - respawn time of a player, default: 4 seconds arena.powerup_chance - power-up drop chance where 0.0 is 0% and 1.0 is 100%, default: 0.33 arena.powerup_seconds - lifetime of a collectable power-up if uncollected, default: 60 seconds All these settings expect the values to be numbers. Source code is also available on GitHub: https://github.com/root-cause/ragemp-arena
    1 point
  3. Version 1.0.0

    978 downloads

    Installing Put the files you downloaded in their respective places Add require('levels') to client_packages/index.js Open packages/levels/database.js and put your MySQL config All done API /* Player level and XP is accessed through currentLevel and currentXP shared data keys. You should not change the value of these shared data keys, just use them to get data and use the API to set data. */ player.data.currentLevel OR player.getVariable("currentLevel") // returns level of the player player.data.currentXP OR player.getVariable("currentXP") // returns XP of the player /* setLevel(newLevel) Sets the player's level to newLevel. (will also change player's XP to level XP) */ player.setLevel(newLevel) /* setXP(newXP) Sets the player's experience to newXP. (will update player's level) */ player.setXP(newXP) /* changeXP(xpAmount) Changes the player's experience by xpAmount. (will update player's level) */ player.changeXP(xpAmount) /* hasReachedMaxLevel() Returns whether the player has reached max level or not. */ player.hasReachedMaxLevel() /* saveLevelAndXP() Saves the player's level and XP data. Automatically called a player disconnects. */ player.saveLevelAndXP() Events These events are called on serverside when a player's level or XP changes. /* playerXPChange This event is called when a player's XP changes. */ mp.events.add("playerXPChange", (player, oldXP, newXP, difference) => { // code }); /* playerLevelChange This event is called when a player's level changes. */ mp.events.add("playerLevelChange", (player, oldLevel, newLevel) => { // code }); Example Script Here's a script that lets you change your level/XP and writes it to console: mp.events.addCommand("setlevel", (player, newLevel) => { newLevel = Number(newLevel); if (!isNaN(newLevel)) { player.setLevel(newLevel); } else { player.outputChatBox("SYNTAX: /setlevel [new level]"); } }); mp.events.addCommand("changexp", (player, amount) => { amount = Number(amount); if (!isNaN(amount)) { player.changeXP(amount); } else { player.outputChatBox("SYNTAX: /changexp [amount]"); } }); mp.events.addCommand("setxp", (player, amount) => { amount = Number(amount); if (!isNaN(amount)) { player.setXP(amount); } else { player.outputChatBox("SYNTAX: /setxp [new xp amount]"); } }); mp.events.add("playerXPChange", (player, oldXP, newXP, difference) => { console.log(`${player.name} ${difference < 0 ? "lost" : "gained"} some XP. Old: ${oldXP} - New: ${newXP} - Difference: ${difference}`); }); mp.events.add("playerLevelChange", (player, oldLevel, newLevel) => { console.log(`${player.name} had a level change. Old: ${oldLevel} - New: ${newLevel}`); }); Credits Unknown Modder - RP List IllusiveTea - Rank bar scaleform Notes This script will load and save level and XP data of players on its own but a function to save player data yourself is provided. Like said before, don't change the values of currentLevel and currentXP shared data keys. Maximum reachable level is 7999 but a player can earn XP until his rank bar is full, kinda reaching 8000. Use player.hasReachedMaxLevel() to detect if a player is level 7999 and his rank bar is full.
    1 point
×
×
  • Create New...