Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/15/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)
    1 point
  2. Hairstyles! - Up to 20 NEW hairstyles for males! - Up to 19 NEW hairstyles for females! - Root's character creator adaption supported! - Credits to @rootcause Males! Females! Installation: 1) Unpack the rar. 2) If you haven't already, create a "dlcpacks" folder inside your "client_packages" folder. 3) Drop the "gtahairs" folder inside "dlcpacks" Download! (Size: 32.95MB) Download! (Current version) (Size: 45MB)
    1 point
  3. Der Inhaber des Sourcecodes würde sich bestimmt auch über Credits freuen @MarkCavalli: He's using your source code without naming you anywhere. Source code is available at https://github.com/FiveLifeRP/FiveLife (Already cloned in case he deletes it; PM if needed). Your source code is licensed under ISC (see package.json), therefore it is required to name the author and include the same license. He removed the package.json so there is no license in the repository and he also didn't named you at any point. Thats 2 license infringements.
    1 point
  4. Moin, kleiner Ratschlag für euer Projekt meinerseits: ihr solltet stets Neutral auftreten wenn ihr auf ein seriöses auftreten wert legt. Im eigenem Forum über andere Foren herziehen bzw. aus irgendwelchen Gründen vor diese zu "warnen" nachdem man dort Ausgeschlossen wurde(lässt sich alles über Google rausfinden), wirkt alles andere, nur nicht seriös. Auf den ersten Blick sieht das Forum übersichtlich aus, aber durch euer Auftreten nach außen ist dieses Projekt für mich kein weiteren Besuch oder Anmeldung wert.
    1 point
  5. to trigger client event from html use mp.trigger(event, args) inside you html file (use <script>) https://wiki.rage.mp/index.php?title=Trigger to trigger server event from client use mp.events.callRemote(event, args) https://wiki.rage.mp/index.php?title=Events::callRemote to trigger client event from server side use player.call (event, args) https://wiki.rage.mp/index.php?title=Player::call to execute some code to your html file use browser.execute(code) on client https://wiki.rage.mp/index.php?title=Browser::execute Reply if you need some examples.
    1 point
×
×
  • Create New...