Search the Community

Showing results for tags 'player'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • RAGE Multiplayer
    • Announcements
    • Discussion
    • Suggestions
  • Scripting
    • Scripting
    • Resources
  • Community
    • Support
    • Servers
    • Media Gallery
  • Non-English
    • Русский - Russian
    • Français - French
    • Deutsch - German
    • Espanol - Spanish
    • Română - Romanian
    • Portuguesa - Portuguese
    • Polski - Polish

Categories

  • Scripts
  • Gamemodes
  • Libraries
  • Plugins
  • Maps
  • Tools

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Facebook


Youtube


Skype


Web


VK

Found 5 results

  1. Flashrex

    Soundviewer

    Version 1.0.0

    111 downloads

    Just a simple js-script that let you play every sound in the following list and gives you info about the current sound on the bottom of the screen: https://wiki.rage.mp/index.php?title=Sounds Install: Simply drop the files in your client-packages folder and merge the index.js with your index.js. How to use: Type /s or /sound to activate/deactivate it. Use Left-Arrow, Right-Arrow to navigate trough the sounds. Credits: Thanks to n0minal and his interior Resource with which i learned how to create commands in js.
  2. Hello Someone asks me, how to create a car at right side next to player. So i just wrote this little tutorial about. I hope you enjoy this little thing, which was did in two hours, and explained with a horrible english ;D Spend time: 2 hours testing the spawn of vehicles and coding + doc 3 hours making this tutorial with translation 0.5 hours thinking about, why i am doing this ... (i didn't found an answer -.-) First we have to know some things: How is the World working How is the Position working How is the Rotation working How can i spawn a car (Code snippet) How is the World working? => It is a north axis oriented map. If you open the full map ingame, top is north, bottom is south. It is every time a constant and will not change How is the Position working? => It is a Vector based information. It has three types. X => left - | + right Y => top - | + bottom Z => down - | + up The "+" and "-" are the operators here in our coordination system, which we have to use later. How is the Rotation working? => It is a Vector based information. Same here we have three types, but the number is always positive. So we can just use the Z variable. X => back | front (Not tested) Y => left | right (Not tested) Z => ground Then we will get four options: N => 0° E => 270° S => 180° W => 90° We have to use the radius to know how the player is rotated away from north. Just think about your shool days. back then you had geometry and raius was a topic of it. Ok, we got our information. Let us code that stuff Small version Doc version
  3. tl;dr: - How to check if player is carrying a specific weapon - How to check how much ammo he is carrying Hello, i hope that this is the right subforum for my problem. I am trying to make an armory where players can take and put weapons/ammo. The "take" is working fine, but I don't find a way to check (on server-side) if a player carries the weapon he wants to put in and how much ammo he is carrying, so when a player wants to put a weapon in the armory, i don't know if hes actually carrying the weapon. In the wiki i have found: Player::getWeaponAmmo (not working with weapon hash, always returns 0) Player::weaponAmmo (don't know how to use) Player::weapons (don't know how to use) Player::allWeapons (returns "{}") Regards, Pacco (i'm not a native english speaker, so please have indulgence)
  4. Lokote1998

    Color Chat

    Version 1.0.0

    486 downloads

    This simple script gives the player a random color for the chat when he joins. If you already have a chat, i recommend you removing it & modifying this one to make it look like your old chat or merge them.
  5. После создании структуры персонажа не удается вызвать функцию из структуры Существует данный скрипт global.PLAYERS = {}; function AddPlayer(playerid, skin, name, health, armor, eat, money, bank, weapons, arrests, stars, drugs, fraction, rank) { PLAYERS[playerid] = {}; const temp = {}; temp.name = name; temp.skin = skin; temp.health = health; temp.armor = armor; temp.eat = eat; temp.money = money; temp.bank = bank; temp.weapons = weapons; temp.arrests = arrests; temp.stars = stars; temp.fraction = fraction; temp.rank = rank; temp.drugs = drugs; this.GetName=function(){ return this.name; } this.GetSkin=function(){ return this.skin; } this.SetSkin=function(skin){ this.skin = skin; } this.GetHp=function(){ return this.health; } this.SetHp=function(health){ this.health = health; } this.GetHp=function(){ return this.health; } this.SetHp=function(health){ this.health = health; } this.GetArm=function(){ return this.armor; } this.SetArm=function(armor){ this.armor = armor; } this.GetEat=function(){ return this.eat; } this.SetEat=function(eat){ this.eat = eat; } this.GetMoney=function(){ return this.money; } this.SetMoney=function(money){ this.money = money; } this.GetBank=function(){ return this.bank; } this.SetBank=function(bank){ this.bank = bank; } this.GetDrugs=function(){ return this.drugs; } this.SetDrugs=function(drugs){ this.drugs = drugs; } this.GetWeapons=function(){ return this.weapons; } this.SetBank=function(weapons){ this.weapons = weapons; } this.AddWeapon=function(weapon){ this.weapons.push(weapon);} this.RemoveWeapon=function(weapon){ this.weapons.remove(this.indexOf(weapon));} this.GetArrests=function(){ return this.arrests; } this.AddArrests=function(){ this.arrests += 1; } this.GetStars=function(){ return this.stars; } this.SetStars=function(stars){ this.stars = stars; } this.GetFraction=function(){ return this.fraction; } this.SetFraction=function(fraction){ this.fraction = fraction; } this.GetRank=function(){ return this.rank; } this.SetRank=function(rank){ this.rank = rank; } PLAYERS[playerid] = temp; } function RemovePlayer(playerid) { PLAYERS[playerid] = {}; } При подключении игрока вызывается эвент "playerJoin" а в нем функция : AddPlayer(player.id, models["a_f_y_hipster_02"], player.name, 100, 100, 100, 500, 0, {"Pistol": 900}, 0, 0, 0, 0, 0); В мод добавлена команда: "getdata": (player, args) => { let id = player.id; player.outputChatBox('Name:<br /><b>'+PLAYERS[id].name+'</b>'); player.outputChatBox('skin:<br /><b>'+PLAYERS[id].skin+'</b>'); player.outputChatBox('health:<br /><b>'+PLAYERS[id].health+'</b>'); player.outputChatBox('armor:<br /><b>'+PLAYERS[id].armor+'</b>'); player.outputChatBox('eat:<br /><b>'+PLAYERS[id].eat+'</b>'); player.outputChatBox('money:<br /><b>'+PLAYERS[id].money+'</b>'); player.outputChatBox('bank:<br /><b>'+PLAYERS[id].bank+'</b>'); }, При вызове команды выходит ошибка, PLAYERS[0].name is not defined где именно я накосячил с ООП структурой? (P.S переходил с Lua )