Leaderboard
Popular Content
Showing content with the highest reputation on 02/09/21 in Files
-
1 point
-
Version 1.0.0
1572 downloads
What is this? This is a @MrPancakers's custom chat with scroll bar with a simple addition - it adds option to use arrow up, down key to move thru your chat history. Just like in SAMP! How to install? Extract everything into client_packages folder and add the chat script into your index.js. require("/chat/index.js"); Note This may include some bugs and I do not provide "tech support" for it This was created in version 0.3.7 Credits @MrPancakers (https://rage.mp/profile/5511-mrpancakers/)1 point -
Version 2.0.0
828 downloads
Requires RAGE Multiplayer 1.1.0 and above. This resource adds a GTA Online like player list to your server. Installing Put playerlist into your server's client_packages directory, then add require('playerlist'); to client_packages/index.js. Controls Z = Toggle player list visibility. PageUp = Move to the next page. PageDown = Move to the previous page. Customization You have the ability to customize how a player is displayed in the list. Here's a list of shared variable keys used for customization: PlayerListColor = This shared variable is used to specify which background color the player will have in the list. Uses an integer (HUD color ID), so go check the wiki. PlayerListTag = This shared variable is used to give players a crew/clan tag next to their name in the list. Setting this value to more than 5 characters isn't recommended since the scaleform displays up to 5 characters. (deprecated in 2.0) Crew Tag API (Serverside - v2.0 and above) // Sets the crew tag of a player. // "tag" being empty will reset player's crew tag. // "tag" should not be more than 4 or 5 characters to prevent visual annoyances player.setCrewTag(tag, { crewIsPrivate, // Boolean - makes the crew tag background a rectangle if true, indicates player owned clans crewIsRockstar, // Boolean - adds the Rockstar Games logo to the crew tag display if true playerCrewRank, // Number - player's rank in their crew, refer to crew ranks list below, ignored if crewIsPrivate is false crewTagColor // Array of numbers (red, green, blue) - the crew color }); // Resets the crew tag of a player. player.resetCrewTag(); // Crew ranks Leader = 0 (100% crew color "strip" display) Commissioner = 1 (80% crew color "strip" display) Lieutenant = 2 (60% crew color "strip" display) Representative = 3 (40% crew color "strip" display) Muscle = 4 (20% crew color "strip" display) Member = 5 (no crew color "strip" display) Various crew tags: Credits TomGrobbe - mp_mm_card_freemode scaleform research @rgnbgnhnd @Jer - Testing Notes This script uses mp.gui.chat.show function to toggle chat visibility when a player opens/closes the player list. Meaning if you have a custom chat, this resource might fail to toggle chat visibility. Source code is available on GitHub in case you don't want to download: https://github.com/root-cause/ragemp-playerlist1 point -
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 -
Version 1.0.0
526 downloads
This resource adds a way to make the local player hold a mugshot board with custom text on it, the custom text and animation won't be synced to others. You can also use this resource to understand how rendertarget system works which lets you display scaleform on certain game objects. Installing: Put policetext into your server's client_packages directory, then add require('policetext/index.js'); to index.js. Available functions/events: mp.players.local.mugshotboard.show -> mp.events.call("ShowMugshotBoard") -> Params: title, topText, midText, bottomText, rank = -1 mp.players.local.mugshotboard.hide -> mp.events.call("HideMugshotBoard") -> Params: - And you can access if the local player has a mugshot board or not by using the hasMugshotBoard global variable. Clientside example (pressing F10 will give your character a mugshot board, pressing it again will remove it): mp.keys.bind(0x79, false, () => { if (!hasMugshotBoard) { mp.players.local.mugshotboard.show(mp.players.local.name, "Top Text", "Mid Text", "Bottom Text", 15); } else { mp.players.local.mugshotboard.hide(); } });1 point
