Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/05/21 in all areas

  1. Version 2.0.0

    429 downloads

    This resource adds wrappers for these natives: GET_TATTOO_SHOP_DLC_ITEM_DATA GET_SHOP_PED_COMPONENT GET_SHOP_PED_PROP GET_DLC_WEAPON_DATA GET_DLC_WEAPON_COMPONENT_DATA GET_PED_HEAD_BLEND_DATA GET_WEAPON_HUD_STATS GET_WEAPON_COMPONENT_HUD_STATS GET_DLC_VEHICLE_DATA GET_SHOP_PED_OUTFIT GET_SHOP_PED_OUTFIT_PROP_VARIANT GET_SHOP_PED_OUTFIT_COMPONENT_VARIANT Before 1.1.0, you couldn't use these natives because they needed pointers to their respective structures but since 1.1 allows developers to use ArrayBuffers, that is no longer a problem. Thing is, you still need to create a buffer, invoke the native and read the data from your buffer. (too much work) This resource is made to prevent that. Installing Put gamedata into your server's client_packages directory, then add require('gamedata'); to client_packages/index.js. Clientside API This resource extends "mp.game" by adding a "data" object that contains multiple functions. /* Returns information about a decoration/tattoo. characterType: * 0 = Michael * 1 = Franklin * 2 = Trevor * 3 = MPMale * 4 = MPFemale decorationIndex: * Decoration/tattoo index between 0 and GET_NUM_TATTOO_SHOP_DLC_ITEMS(characterType). Returned object: * { lockHash, id, collection, preset, cost, eFacing, updateGroup, textLabel } This native was researched & documented by TomGrobbe. (https://github.com/TomGrobbe) */ mp.game.data.getTattooShopDlcItemData(characterType, decorationIndex); /* Returns information about a clothing item. componentHash: * Obtained by GET_HASH_NAME_FOR_COMPONENT. Returned object: * { lockHash, uniqueNameHash, locate, drawableIndex, textureIndex, cost, eCompType, eShopEnum, eCharacter, textLabel } */ mp.game.data.getShopPedComponent(componentHash); /* Returns information about a clothing item. (prop) propHash: * Obtained by GET_HASH_NAME_FOR_PROP. Returned object: * { lockHash, uniqueNameHash, locate, propIndex, textureIndex, cost, eAnchorPoint, eShopEnum, eCharacter, textLabel } */ mp.game.data.getShopPedProp(propHash); /* Returns information about a ped's headblend data. entityOrHandle: * Entity (mp.players.local) or handle (mp.players.local.handle) of the ped you want to get headblend data of. Returned object: * { shapeFirstId, shapeSecondId, shapeThirdId, skinFirstId, skinSecondId, skinThirdId, shapeMix, skinMix, thirdMix, isParent } */ mp.game.data.getPedHeadBlendData(entityOrHandle); /* Returns information about a weapon's HUD stats. weaponHash: * Hash of the weapon you want to get HUD stats of. Returned object: * { hudDamage, hudSpeed, hudCapacity, hudAccuracy, hudRange } */ mp.game.data.getWeaponHudStats(weaponHash); /* Returns information about a weapon component's HUD stats. componentHash: * Hash of the weapon component you want to get HUD stats of. Returned object: * { hudDamage, hudSpeed, hudCapacity, hudAccuracy, hudRange } */ mp.game.data.getWeaponComponentHudStats(componentHash); /* Returns information about a DLC weapon. dlcWeaponIndex: * DLC weapon index between 0 - GET_NUM_DLC_WEAPONS(). Returned object: * { lockHash, weaponHash, id, cost, ammoCost, ammoType, defaultClipSize, textLabel, weaponDesc, weaponTT, weaponUppercase } */ mp.game.data.getDlcWeaponData(dlcWeaponIndex); /* Returns information about a DLC weapon's component. dlcWeaponIndex: * DLC weapon index between 0 - GET_NUM_DLC_WEAPONS(). dlcWeaponComponentIndex: * DLC weapon component index between 0 - GET_NUM_DLC_WEAPON_COMPONENTS(dlcWeaponIndex). Returned object: * { attachBone, isDefault, lockHash, componentHash, id, cost, textLabel, componentDesc } */ mp.game.data.getDlcWeaponComponentData(dlcWeaponIndex, dlcWeaponComponentIndex); /* Returns information about a DLC vehicle. dlcVehicleIndex: * DLC vehicle index between 0 - GET_NUM_DLC_VEHICLES(). Returned object: * { lockHash, modelHash, cost } */ mp.game.data.getDlcVehicleData(dlcVehicleIndex); /* Returns information about an outfit. outfitHash: * uniqueNameHash of the outfit. Returned object: * { lockHash, uniqueNameHash, cost, numProps, numComponents, eShopEnum, eCharacter, textLabel } */ mp.game.data.getShopPedOutfit(outfitHash); /* Returns information about an outfit's component. outfitHash: * uniqueNameHash of the outfit. componentIndex: * index of the outfit's component. Returned object: * { uniqueNameHash, enumValue, eCompType } */ mp.game.data.getShopPedOutfitComponentVariant(outfitHash, componentIndex); /* Returns information about an outfit's prop. outfitHash: * uniqueNameHash of the outfit. propIndex: * index of the outfit's prop. Returned object: * { uniqueNameHash, enumValue, eAnchorPoint } */ mp.game.data.getShopPedOutfitPropVariant(outfitHash, propIndex); Example Script Writes bunch of information to the console. (which you can access by pressing F11) mp.keys.bind(0x75, false, () => { // First freemode male tattoo const tattooData = mp.game.data.getTattooShopDlcItemData(3, 0); if (tattooData) { mp.console.logInfo(`Tattoo data: ${JSON.stringify(tattooData)}`); } // Player's top const component = 11; const componentHash = mp.game.invoke("0x0368B3A838070348", mp.players.local.handle, component, mp.players.local.getDrawableVariation(component), mp.players.local.getTextureVariation(component)); const topData = mp.game.data.getShopPedComponent(componentHash); if (topData) { mp.console.logInfo(`Top data: ${JSON.stringify(topData)}`); } // Player's hat const prop = 0; const propHash = mp.game.invoke("0x5D6160275CAEC8DD", mp.players.local.handle, prop, mp.players.local.getPropIndex(prop), mp.players.local.getPropTextureIndex(prop)); const hatData = mp.game.data.getShopPedProp(propHash); if (hatData) { mp.console.logInfo(`Hat data: ${JSON.stringify(hatData)}`); } // Headblend mp.players.local.setHeadBlendData(21, 2, 0, 21, 2, 0, 0.75, 0.5, 0.0, false); const blendData = mp.game.data.getPedHeadBlendData(mp.players.local.handle); if (blendData) { mp.console.logInfo(`Headblend data: ${JSON.stringify(blendData)}`); } // Current weapon HUD stats const weaponData = mp.game.data.getWeaponHudStats(mp.players.local.weapon); if (weaponData) { mp.console.logInfo(`Current weapon HUD stats: ${JSON.stringify(weaponData)}`); } // COMPONENT_AT_MUZZLE_04 HUD stats const componentData = mp.game.data.getWeaponComponentHudStats(mp.game.joaat("COMPONENT_AT_MUZZLE_04")); if (componentData) { mp.console.logInfo(`Component HUD stats: ${JSON.stringify(componentData)}`); } // DLC weapon data const dlcWeaponIndex = 7; const dlcWeaponData = mp.game.data.getDlcWeaponData(dlcWeaponIndex); if (dlcWeaponData) { mp.console.logInfo(`DLC weapon data: ${JSON.stringify(dlcWeaponData)}`); // First component of weapon const dlcWeaponCompData = mp.game.data.getDlcWeaponComponentData(dlcWeaponIndex, 0); if (dlcWeaponCompData) { mp.console.logInfo(`DLC weapon first component data: ${JSON.stringify(dlcWeaponCompData)}`); } } // DLC vehicle data const dlcVehicleIndex = 21; const dlcVehicleData = mp.game.data.getDlcVehicleData(dlcVehicleIndex); if (dlcVehicleData) { mp.console.logInfo(`DLC vehicle data: ${JSON.stringify(dlcVehicleData)}`); } // Outfit data const outfitHash = mp.game.joaat("DLC_MP_SUM24_M_OUTFIT_0"); // Pizza This... Outfit const outfitData = mp.game.data.getShopPedOutfit(outfitHash); if (outfitData) { mp.console.logInfo(`Outfit data: ${JSON.stringify(outfitData)}`); // First component of outfit if (outfitData.numComponents > 0) { const outfitComponentData = mp.game.data.getShopPedOutfitComponentVariant(outfitHash, 0); if (outfitComponentData) { mp.console.logInfo(`First component of outfit: ${JSON.stringify(outfitComponentData)}`); } } // First prop of outfit if (outfitData.numProps > 0) { const outfitPropData = mp.game.data.getShopPedOutfitPropVariant(outfitHash, 0); if (outfitPropData) { mp.console.logInfo(`First prop of outfit: ${JSON.stringify(outfitPropData)}`); } } } }); Notes If mp.game.invoke fails (trying to get non-DLC item data/invalid params etc.), return value of the function will be null. Most non-DLC items (core GTAV weapons like Pistol, Assault Rifle etc, initial freemode tattoos, initial freemode clothes) are not supported by the natives. Strings returned by the functions (textLabel, componentDesc etc.) are GXT entries. You're supposed to use them with getLabelText or GXT::get.
    1 point
  2. Current status: Closed Alpha Feature Complete Discord | Forums Introduction 'PRP' has been in silent development for nearly two years. Our vision: To provide the most realistic roleplay experience imaginable. We feel that hardcore roleplay hasnt made the jump to RageMP yet and we are now here to provide that experience and we have achieved that. We are introducting a new perspective and standard to roleplay that we now call "realistic roleplay" where every act you do will have an impact to your characters development. Description Aiming to introduce a completely new perspective and standard on realistic roleplay. A place where every word, every action, every murder and every arrest will directly affect the life of each and every single character surrounding each and every single situation. If that sounds a little extreme, that's ok, we know. CCRP will become the place where roleplayers go for hardcore character development and top-notch roleplay because our developers have laser focused their hard work and dedication into creating a roleplay environment that will be considered exceptionally close to real life. Actually... we built off the notion that it will be "uncomfortably" close to real life. That should leave little to the imagination for how serious we aim to take the realism factor here. Fear not though, discomfort was not what we were aiming for and anyone who takes the initiative to join our server will come to learn that as they interact with our friendly staff and hypercreative community members. This is going to be a community where roleplayers are happy to call themselves roleplayers, and uplift each other to create something everyone can enjoy at any given point or another. With our standard set as high as it could possibly be, we promise that our players will come to feel the excitement behind both the greatness and the ingloriousness of certain things like policing a city, being involved in criminal organizations or running a multimillion dollar company. From the moment you create a character and enter our world you will see the level of immersion our developers have envisioned and brought to life. Here are some key features that we are proud off: Interactive business system Our business system is linked to an in game database that keeps records of finances, salaries and profits that any CEO sets for their company. It has immersified a tax system that our government roleplayers and police roleplayers will completely rely on. It has also laid the foundation that can immersify our police and criminal roleplay at the same time, thanks to money laundering, tax evasion, fraud and other financial related crimes. In game internet We have developed a strictly in game internet, complete with apps to communicate, advertise businesses or publish media entirely in game. It's also a vital piece to our police and government's MDC system. This as well has laid the foundation for criminal, police, government and civilian roleplayers to eventually create internet scams, access private information of each character and access your own bank accounts. Realistic fighting & shooting We have removed the reticle that typically pops up when you aim a weapon. On top of that, we have implemented a recoil system that will make it significantly hard for people who shoot off a wildfire flurry of bullets. We truly put the words "spray and pray" in it's proper place. Fistfights do significantly less damage, for longer, more exciting and lengthy skirmishes and brawls. This should be lovely for barfights or gang initiations. Interactive medical roleplay With our fistfights and shootout system modified, we have created an interactive script for medical emergency roleplayers to properly examine and treat characters who were hurt in any melee or gunplay. From cuts, abrasions, lacerations, punctures and bruises, each and every single injury will be accounted for. We have a very in depth system wherein characters may actually fall unconscious where they can get up eventually, or wind up in critical, life threatening condition. On top of our medical roleplay, we've incorperated a character's will to live by giving players the option to die after being put in a critical state. Vehicle damage system No more are the days of wild goose chases where players can continuously lead police on drawn out, unrealistic pursuits around the city. No more smacking down light poles and driving perfectly through them. No more flying through the windshield and not paying dearly for it. In our server cars suffer long term damage, which can change the outcome of a number of situations. On top of that cars have components within them. Batteries, Starter motor, Engine block, Radiator and even down to tyre treads everything is traced to get cars to become more realistic then just a buy and drive. Make sure you park your car somewhere safe or someone could steal any part of those in our fully physicalised inventory system. Everything is physicalised Every object, weapon, bullet, magazine, item and car is physicalised. Police are able to open a their trunks and grab physical road cones to place in the road or grab some extra handcuffs. These are not spawned for nothing as every item will have a cost applied to it. So dont go stealing all of the LSPD cones or all of EMS medical supplies. They wont be happy. Dynamic Vehicle Inventories Every vehicle is different, meaning we wanted each vehicle to have a different trunk capacity. Our rule of thumb was the faster the vehicle the smaller the trunk. Each trunk is based off our "rows" inventory system meaning in a SultanRS you will get 4 rows of 10 columns compared to a Burrito van where you will get 20 rows of 10 columns to put and store items or bodies (if you can fit them). While we could go on and on these are just some of the features we have either revealed or have shown off during alpha to our selected community members. We now invite you and all of your friends to join us on discord and prepare yourselves for the most immersive realistic roleplay experience you could get in GTA V RageMP. Development Blogs More will come in time. The beginning (Lots of info) Los Santos Police Computer Los Santos MDC Player and Vehicle Inventories (coming next) Business (coming next) Medical (coming soon) Player owned dealership.
    1 point
  3. Methods above do not work at 1.1 version. If came here like me, try this method to write normal engine system: mp.events.add("playerEnterVehicle", (vehicle, seat) => { mp.game.vehicle.defaultEngineBehaviour = false; // stop starts engine when player press 'W' or enter vehicle(because we using it in event) mp.players.local.setConfigFlag(429, true); // stop problems with animations });
    1 point
×
×
  • Create New...