Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/14/18 in all areas

  1. Version 1.0.2

    3830 downloads

    This resource probably won't get future updates, check out Currency API instead. Easy to use money system for your server. It handles saving&loading and provides you a custom data key to get/set a player's money. Installing Put the files you downloaded in their respective places Add require('moneyapi') to client_packages/index.js Open packages/moneyapi/constants.js and put your MySQL info (maybe edit the settings too while you're at it...) Congrats, you're all done Settings (packages/moneyapi/constants.js): startingMoney use this setting to change how much money players start with. Default: 0 autoSaveInterval use this setting to change how frequent auto saving happens (in minutes), you can set it to 0 if you want to disable auto saving. Default: 5 Example You can access a player's money from customMoney property using either .data.customMoney or .getVariable("customMoney"). mp.events.addCommand("smoney", (player, _, money) => { // set the player's money to the specified amount money = parseInt(money); if (!isNaN(money)) { player.data.customMoney = money; } else { player.outputChatBox("Invalid amount specified."); } }); mp.events.addCommand("cmoney", (player, _, amount) => { // change the player's money by the specified amount amount = parseInt(amount); if (!isNaN(amount)) { player.data.customMoney += amount; } else { player.outputChatBox("Invalid amount specified."); } }); mp.events.addCommand("buyhp", (player) => { // refill a player's health for $100 if (player.data.customMoney >= 100) { player.health = 100; player.data.customMoney -= 100; player.outputChatBox("Refilled health for $100."); } else { player.outputChatBox("You don't have $100."); } }); Notes First of all, thanks to @Donboo for their MySQL example which you can find here. This script won't save while the server is shutting down but will save player money when they disconnect or when autosave happens. This script uses an int(11) field to store a player's money. If you think $2147483647 isn't enough, you might want to change it. For some reason, MoneyAPI HUD elements will be off position in 1914x1080 windowed resolution. This script won't update the money display on the ESC/pause menu. (This note is obsolete if you're using the GameHUD version)
    3 points
  2. 2 points
  3. @Laricent dont worry men, have you seen the post from the developers regarding 0.4 Ped sync and traffic is definitely on the agenda
    2 points
  4. oh wow, this is cool men +rep
    2 points
  5. everything from @rootcause is beast πŸ‘ΊπŸ‘ΊπŸ‘ΊπŸ‘ΊπŸ‘Ί
    2 points
  6. wowmen very good job. i like
    2 points
  7. 2 points
  8. πŸ˜€πŸ˜€πŸ˜€πŸ˜€πŸ˜€πŸ˜€πŸ˜€πŸ˜€πŸ˜€πŸ˜€πŸ˜€ youre welcome on ragemp
    2 points
  9. lol i don't doubt ur JS skills, maybe lack on knowledge of the api causes you to use functions incorrectly, resulting in ur crashes, good luck men
    2 points
  10. @Chopper what elements? Maybe this is a JavaScript only problem (doubtful it is, maybe its just the ability to write shit-code in JS πŸ˜‹). I develop in C# on both clientside and serverside and I can restart both the game and server multiple times (probably restarted the server in a single game session 50+ times on an occasion) and have neither crash. It sounds like you are making code changes that cause the crashes, so the ability to: "package reload and restart" I doubt will help you here. Although I don't disagree that any feature is nice, I just don't think it's necessary or the solution to your problem, you may be better off asking a different question to solve this
    2 points
  11. oh men men men thats epic beast, better dont leak more
    2 points
  12. Information library about the game's weapons. Contains Weapon Hash Weapon Hash Key (you can use this with joaat functions to generate hash) Weapon Name GXT (game text, use with getLabelText to get localized string) Weapon Description GXT (game text, use with getLabelText to get localized string) Weapon Name (in English) Weapon Description (in English) Weapon Group Weapon Model Hash Key (this is the model you can spawn as a prop, use with joaat functions to generate hash) Weapon Default Clip Size Weapon Ammo Type (won't exist if the weapon doesn't have an ammo type) Weapon Components --> Component Hash --> Component Hash Key (you can use this with joaat functions to generate hash) --> Component Name GXT (game text, use with getLabelText to get localized string) --> Component Description GXT (game text, use with getLabelText to get localized string) --> Component Name (in English) --> Component Description (in English) --> Component Model Hash Key (this is the model you can spawn as a prop, use with joaat functions to generate hash) --> Component Ammo Type (won't exist if the component doesn't have an ammo type) --> Component Is Default Weapon Tints --> Tint Name GXT (game text, use with getLabelText to get localized string) --> Tint Name (in English) Weapon Livery Colors --> Livery Color GXT (game text, use with getLabelText to get localized string) --> Livery Color Name (in English) Weapon DLC Name (mpgunrunning etc., this will be "core" for stock weapons) Example "1593441988": { "HashKey": "WEAPON_COMBATPISTOL", "NameGXT": "WT_PIST_CBT", "DescriptionGXT": "WTD_PIST_CBT", "Name": "Combat Pistol", "Description": "A compact, lightweight, semi-automatic pistol designed for law enforcement and personal defense. 12-round magazine with option to extend to 16 rounds.", "Group": "GROUP_PISTOL", "ModelHashKey": "W_PI_COMBATPISTOL", "DefaultClipSize": 12, "AmmoType": "AMMO_PISTOL", "Components": { "119648377": { "HashKey": "COMPONENT_COMBATPISTOL_CLIP_01", "NameGXT": "WCT_CLIP1", "DescriptionGXT": "WCD_CP_CLIP1", "Name": "Default Clip", "Description": "Standard capacity for Combat Pistol.", "ModelHashKey": "w_pi_combatpistol_mag1", "IsDefault": true }, "3598405421": { "HashKey": "COMPONENT_COMBATPISTOL_CLIP_02", "NameGXT": "WCT_CLIP2", "DescriptionGXT": "WCD_CP_CLIP2", "Name": "Extended Clip", "Description": "Extended capacity for Combat Pistol.", "ModelHashKey": "w_pi_combatpistol_mag2", "IsDefault": false }, "899381934": { "HashKey": "COMPONENT_AT_PI_FLSH", "NameGXT": "WCT_FLASH", "DescriptionGXT": "WCD_FLASH", "Name": "Flashlight", "Description": "Aids low light target acquisition.", "ModelHashKey": "w_at_pi_flsh", "IsDefault": false }, "3271853210": { "HashKey": "COMPONENT_AT_PI_SUPP", "NameGXT": "WCT_SUPP", "DescriptionGXT": "WCD_PI_SUPP", "Name": "Suppressor", "Description": "Reduces noise and muzzle flash.", "ModelHashKey": "w_at_pi_supp", "IsDefault": false }, "3328527730": { "HashKey": "COMPONENT_COMBATPISTOL_VARMOD_LOWRIDER", "NameGXT": "WCT_VAR_GOLD", "DescriptionGXT": "WCD_VAR_CBP", "Name": "Yusuf Amir Luxury Finish", "Description": "", "ModelHashKey": "w_pi_combatpistol_luxe", "IsDefault": false } }, "Tints": [ { "NameGXT": "WM_TINT0", "Name": "Black tint" }, { "NameGXT": "WM_TINT1", "Name": "Green tint" }, { "NameGXT": "WM_TINT2", "Name": "Gold tint" }, { "NameGXT": "WM_TINT3", "Name": "Pink tint" }, { "NameGXT": "WM_TINT4", "Name": "Army tint" }, { "NameGXT": "WM_TINT5", "Name": "LSPD tint" }, { "NameGXT": "WM_TINT6", "Name": "Orange tint" }, { "NameGXT": "WM_TINT7", "Name": "Platinum tint" } ], "LiveryColors": [], "DLC": "core" } Notes The information was generated using game files, if there are mistakes feel free to report them. Click me
    1 point
  13. 1 point
  14. RAGE Multiplayer 0.3.7 introduces client-side C# scripting. Thanks to an incoming game update announcement today it goes into the stable branch with client updates that make it easier (you will have to back up your game files that are going to update still) to stay on the latest supported version until a compatibility update is done (previous time it has been made in a day, we can't give ETA though as the amount of changes is not known yet). STABLE RELEASE CHANGELOG (changes done from 0.3.7 Testing Release) Note: while there are no known security issues in the latest build, for now, it has been decided to not enable client-side C# by default in the Stable Release due to potential security concerns. Enabling it as pretty easy: just create "enable-clientside-cs.txt" file in your RAGE Multiplayer root folder. Added: Events.OnEventTriggeredByKey Added: Events.EnableKeyRemoteEvent Added: Events.OnEntityDataChangeByKey Added: Events.EnableKeyDataChangeEvent Added: Performance improvements thanks to utilizing some .NET Core features Added: Colshape.OnEnter (cancellable via OnPlayerEnterColshape) Added: Colshape.OnExit (cancellable via OnPlayerExitColshape) Added: Checkpoint.OnEnter (cancellable via OnPlayerEnterCheckpoint) Added: Checkpoint.OnExit (cancellable via OnPlayerExitCheckpoint) Added latest C# standard support Enhancements over providing secure .NET Core environment (@server devs: no worries for partial reflection restrictions introduced - that's going to be whitelisted per local contexts in future updates) .NET Core has been updated to our own fork based on .NET Core 2.2.0 Added: vehicle.nosActive Added: vehicle.nosAmount Peds are using entity streaming events now instead of what it used to be Fixed reported client-side JS regressions Fixed reported C# bugs Updating 0.3.6 resources Client-side: Update all the entityDataChange events to proper mp.events.addDataHandler: // old: mp.events.add("entityDataChange", (entity, dataName, value) => { if(dataName === "mydata") { HandleIt(); } }); // new: mp.events.addDataHandler("mydata", (entity, value) => { HandleIt(); }); Client-side: Update ped stream in eventing (streamIn param got deprecated in favor of regular entity streaming events). Here's a function to reproduce 0.3.6 mp.peds.new behavior: mp.peds.newLegacy = (hash, position, heading, streamIn, dimension) => { let ped = mp.peds.new(hash, position, heading, dimension); ped.streamInHandler = streamIn; return ped; }; mp.events.add("entityStreamIn", (entity) => { if(entity.streamInHandler) { entity.streamInHandler(entity); } }); Downloads Client* (includes Windows server) Linux server Linux C# API *if you already have RAGE Multiplayer installed, it will update itself on the next launch
    1 point
  15. 1 point
  16. Hello Guys, After making this script i was noticed that there is already a spike that can pop the tires, so i thought I would give this out as a Training to me. So why not share it with the community. This script makes you create spike strip anywhere and remove it so you can pop out some cars (Pretty funny script tho). Thanks anyways
    1 point
  17. I think having a package reload and restart feature would be essential. Right now the server restart thing works, but after 10-20 restarts, I believe the client gets filled up with all the compiled code, and puts itself to not responding, resulting in a complete freeze and having to restart the client. This makes it pretty cumbersome when working on things that need constant testing. Even a built in /reconnect command would work, just something that empties all the garbage. @ragempdev
    1 point
  18. I don't want to restart the server when there are many players. The MTA:SA or GTA:NETWORK the solved this good.
    1 point
  19. What types of things need constant testing, are you referring to carrying out regression testing? you should aim to develop your resource with a greater separation of concerns so code changes doesnt effect the rest of your code and make it easier to debug This sounds like a you problem . do you have an example of what causes these crashes? maybe incorrect usage of the rage api is causing this. its very rare for me to crash in a stable build of RAGE:MP.
    1 point
  20. epic. glad you like men))))πŸ’™πŸ’™πŸ’™πŸ’™πŸ’™
    1 point
  21. ffs, idiot roleplayers pushed it back........😑😑😑😑😑
    1 point
  22. Getting Started with Development πŸ›  πŸ”° The easiest way is with no doubt to download the boilerplate / example project from GitHub.You can look at the example package that is included in there to figure out how everything works. Once you've ran the Package option in IntelliJ within the boilerplate, copy the contents of the client_packages folder that should now have appeared in the project folder to the server's client_packages folder. It's that simple? Is there some kind of catch? πŸ€” Nope! There is no catch. All you need to get started is an IDE that supports Kotlin. I recommend JetBrain's IntelliJ IDEA due to its performance, flexibility and customization options. I'm super excited for what the simplicity of Kotlin will bring to the RageMP community and all of your creations that have been made just a tiny bit easier πŸ˜‰ (PS If you click on the header picture, it'll take you straight to the GitHub page for the library with more examples)
    1 point
×
×
  • Create New...