Jump to content

shrox

Members
  • Posts

    13
  • Joined

  • Last visited

  • Days Won

    2

shrox last won the day on September 9 2024

shrox had the most liked content!

3 Followers

Recent Profile Visitors

542 profile views

shrox's Achievements

Apprentice

Apprentice (3/14)

  • Collaborator Rare
  • Reacting Well Rare
  • Conversation Starter Rare
  • First Post Rare
  • Dedicated Rare

Recent Badges

4

Reputation

  1. Epicccccc
  2. Amazing as always!!!
  3. Amazing update as always, keep em coming!
  4. You could do it using tasks and overwriting default enter/exit Player::taskEnterVehicle - RAGE Multiplayer Wiki flag id 8 for example will jack the car from a driver
  5. awesome thank u root )))
  6. That message comes by default from RAGEMP, and it's not possible to remove it from client side, server developers are able to delete that message, so you might want to suggest this to them.
  7. Version 1.0.0

    731 downloads

    RAGE Multiplayer Inventory System A simple inventory system with plenty of features and a neat UI! *This script does not provide a saving or loading system, that's your doing, there's a 'save' method in the inventory class where you can implement your own saving system depending on what database you're using. *Comes in typescript & javascript version. *The keys binded in the clientside script are temporary, you should change them based on your preference. *Easy to use & implement. > Will be generally maintained and updated. Items Down below is a list of item properties, each property has its own unique use so read it please. type: ITEM_TYPES; //item type typeCategory: ITEM_TYPE_CATEGORY; //item category see ITEM_TYPE_CATEGORY enum in index.d.ts isPlaced: boolean; //whether item is 'placed' in clothes quality: number; //item quality level image: string; //item image hash: string; //unique item hash, also used as linked to a child item key: string; //item key which contains clothes data only (such as component id, drawable and texture) render: string; //item render image which later on can be used in CDN if you have plenty items. name: string; //item name description: string; //item description count: number; //item count, also determines whether you can split an item up weight: number; //item weight maxStack: number; //max stack determines how many items can be stacked in one slot options: string[]; //item options (to be used when you right click an item) such gender: number | null; //item gender, used on clothes whether the clothe is for female or male modelHash?: string; //prop model name or hash that will be used to create object when dropping item ammoType?: string; //ammo type that a weapon will contain ammoInClip?: number; //ammo in weapon clip amount?: number; //used for armor to contain its amount effect?: { //a feature to be developed whether the item will have an effect or not [key: string]: number; }; components?: Array<number>; //will be used for weapon attachments in future Class Structure The Inventory class is the main class for managing player inventories in a game. It extends from other classes such as InventoryClothes, QuickUse, and InventoryItem. InventoryBase: Base class for inventory management. It initializes the inventory structure and handles basic operations. InventoryItem: Extends InventoryBase and adds methods for managing individual items in the inventory. QuickUse: Extends InventoryItem and adds methods for managing quick-use slots. InventoryClothes: Extends QuickUse and adds methods for managing clothing items in the inventory. This class provides comprehensive functionality for managing player inventories, including adding, removing, equipping, and using items. Properties items: Contains the player's inventory items, divided into pockets and clothes. quickUse: Contains items assigned to quick-use slots. weight: Represents the total weight capacity of the inventory. equippedWeapons: Keeps track of equipped weapons. Constructor Initializes the inventory with player-specific data such as clothes, pockets, and quick-use items. Methods addItem: Adds an item to the inventory's pockets. addClothingItem: Adds a clothing item to the inventory. removeClothes: Removes a clothing item from the player's character. loadClothes: Loads clothing items onto the player's character. setClothes: Sets clothing items on the player's character. reloadClothes: Reloads clothing items onto the player's character. getFreeSlot: Retrieves a free slot in the inventory pockets. getTotalFreeSlots: Counts the total number of free slots in the inventory. getClothingIndex: Retrieves the index of a specific clothing item type. resetItemData, resetClothingItemData, resetBackpackItemData: Resets item data in the inventory. updateOnScreenPed: Updates the player's character appearance on-screen. getItemModel: Retrieves the model hash of an item type. getItemAndStack, getItemsByHashName, getItemsInCategoryByHashName, getItemsByHashNameEx: Methods for retrieving items by their type or category. getItemByUUID: Retrieves an item by its UUID. hasPistolItem, hasShotgun, hasAssault, hasSMG, hasWeaponInFastSlot: Methods for checking if the inventory contains specific weapon types. getActualWeight, getWeight, getItemsWeight: Methods for calculating the weight of the inventory and its items. checkWeight: Checks if adding a new item will exceed the weight limit. getFreeSlotCount: Retrieves the count of free slots in the inventory. dropItem, splitStack, addPlayerItem, addPlayerItemEx, addMultipleItems, addCountToPlayerItem, manageFastSlots, pickupItem, moveItem, openItem, useItem: Methods for managing inventory actions such as dropping, splitting, adding, and using items. deleteItemStack, deleteItem: Methods for deleting items from the inventory. checkQuickUse: Checks if an item is in a quick-use slot. Adding new items: Javscript -> Navigate to Items.module.js located inside inventory folder, there you can see a list of already added items, and you can follow the path, after adding an item there make sure the item image exists in the frontend, if it doesn't then add it and rebuild the frontend. Typescript -> Navigate to Items.module.ts located inside inventory folder, there you can see a list of already added items, and you can follow the path, after adding an item there make sure the item image exists in the frontend, if it doesn't then add it and rebuild the frontend. Getting Started with Development Install the required packages by executing `npm install` If you're on typescript version after installing packages you can execute `npm run watch:server` to watch/build server side and `npm run watch:client` to watch/build client side, if you're on the javascript version, you don't have to do anything. Getting started with frontend. In your terminal navigate to the frontend folder (cd frontend) Run frontend in development mode by executing: `npm run start` Build the frontend (inventory ui) by executing `npm run build` After you're done see the gifs below what to do next: Creating package2 folder: https://github.com/shr0x/ragemp-inventory-system/raw/main/gifs/create_package2.gif Building Inventory UI: https://github.com/shr0x/ragemp-inventory-system/raw/main/gifs/build_frontend.gif Moving built files to package2: https://github.com/shr0x/ragemp-inventory-system/raw/main/gifs/move_to_package2.gif
  8. Version 0.0.7-b1

    1560 downloads

    RAGEMP ROLEPLAY GAMEMODE A perfect game mode to get started with if you're about to make a roleplay server! This game mode is still work in progress, I will maintain and update it generally, plenty features are planned to be added so stay tunned! At current state, this gamemode is perfect to be used as a boilerplate for you to start a rp server! Built in: Client side: Typescript Webpack Server side Typescript Webpack Typeorm PostgreSQL Frontend(CEF) ReactTS MobX Current Features - Account system (Login/Register). - Character System (3 Available slots to create) - Inventory System - Notification system - Chat System - Command system Getting started with setting up: Database setup: This code requires you to have PostgreSQL installed on your machine, read more at https://www.postgresql.org/ After installing PostgreSQL, connect to your database using PGAdmin or HeidiSQL and create a new database by executing a query like: CREATE DATABASE mydb; After creating a database successfully, head back to the server files and edit .env by describing the database connection details there. Once you're setup with that, simply start the server, and the TypeORM will start creating the required database tables on its own (see Database.module.ts for deeper info) Code Structure: ragemp-rp-gamemode ├───config #contains webpack configuration files ├───frontend │ └───src │ ├───assets #contains assets such as page images or videos │ ├───events #contains page events which can be called from the backend │ ├───pages #contains pages │ ├───stores #contains temporary stores │ ├───styles #contains global styling │ └───utils #contains useful code methods │ ├───source #contains backend code │ ├───client #contains client-side code │ ├───server #contains server-side code │ └───shared #contains shared data between server and client │ └───.env #contains database connection details Getting started with development: (BACKEND) Make sure you have an empty ragemp-server folder ready. After downloading the gamemode, move all files to your ragemp-server folder. Open the gamemode to your terminal and simply install the required packages executing 'npm install', this will install all required packages the gamemode uses. After the packages are installed make sure you created the database explained above. Start server-side in development mode: Simply execute 'npm run watch:server' to start watching server side in development mode. Start client-side in development mode: Simply execute 'npm run watch:client' to start watching client side in development mode. (FRONTEND) Create a folder named package2 in client_packages folder. Navigate to frontend folder in your terminal. Install the required packages executing 'npm install' Once packages are done installing simply run 'npm run build' Once the build is done, it will automatically be moved to package2 folder. Once you're done, start the server and that's pretty much it. Github link: shr0x/ragemp-rp-gamemode: A startup rp script to make your way into making a rp server easier! (github.com) More docs are in the github repo, also keep an eye since most of the updates will be published there first then will eventually be updated in this post.
  9. shrox

    Weapon punch

    Hi, you can disable that using Controls::disableControlAction - RAGE Multiplayer Wiki And you can find a list of controls here: Controls - RAGE Multiplayer Wiki Edit: You can also disable the damage now using the newly added event: MeleeActionDamage - RAGE Multiplayer Wiki
×
×
  • Create New...