Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/20/18 in all areas

  1. Hi everyone! Two words about me: My name is Mark. Im working as junior fronted developer. What is this? My open source role play server. I think, it can help some new developers learn and start a project. I'll develop it via github: https://github.com/MarkCavalli/rageserver I will be glad to see any improvements: code review, pull requests, language improvements (My native language is Russian). Also you can quickly connect and test it How to install: https://github.com/MarkCavalli/rageserver Features: Log In/Sign Up Module Server saves player's position on disconnect. (/save) command for development simulate disconnect. MoneyAPI Module -bank account and tax account. - ATMs Character Creator Module Jobs: - Orange Collector Businesses: - Clothing Shops Future plans: - New jobs
    1 point
  2. 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
  3. Есть два вопроса, как убрать ник и шкалу жизни и добавить свои, кастомные надписи? Можно конечно их добавить с помощью лейблов, но для этого нужно опрашивать местоположение игрока, кроме setInterval в голову не приходит, но это как бы не гуд. Да и те что есть будут, перерыл всю вики , что-то не вышло у меня идентифицировать нужный метод. Может кто подскажет?
    1 point
  4. 1 point
  5. We've pushed an update to current server: added - courier job finished - error message for too less cash - /cloth command to add custom clothes - new player online list - wantes removal over time - /confess at the church - time & weather cycle ( 3 hours = 1 day ) - synced server time with phone time - added hotkey E to toggle hood/trunk - added vehicle inventory ( hold I, while trunk open ) - 7 black market positions changed - disabled shop peds for testing - cops cant impound vehicles on sale anymore - you cant enter decimal or letters anymore at ATM - you only can repsond once to a crime - go on duty with wanteds fixed - ATM Loader cant find atm - taxi HUD doesnt disappear - peds spawn twice on relog - shop peds can be pushed around - waypoint points to prison for non-high wanted - no jail at all - /backup for yourself This update took several weeks, because I had to add tons of debugging stuff. Hopefully, I've found the freeze issue and if this won't occur for the couple next days, this will be official launched as 0.9-BETA. That means: - account reset - everything you earn after this will be saved and never resetted - beta tester get their bonuses
    1 point
  6. Не устанавливается клиент RAGE Multiplayer, при попытке запустить файл появляется это окно. Кто-нибудь сталкивался с подобным? В чём может быть причина?
    1 point
×
×
  • Create New...