alex_r

Members
  • Content count

    6
  • Joined

  • Last visited

Community Reputation

2 Neutral

About alex_r

  • Rank
    Newbie
  1. tutorial Add Command Line to server console

    Isn't it better to make separate package?
  2. Private Messages (PM)

    Good job! Also I bit updated your code: function findPlayerByIdOrNickname(playerName) { if (playerName == parseInt(playerName)) return mp.players.at(playerName); else { let foundPlayer = null; mp.players.forEach((_player) => { if (_player.name === playerName) { foundPlayer = _player; break; } }); return foundPlayer; } } module.exports = { // Add command `/pm` "pm": (player, args, fullcmd) => { // Check args if (args.length < 3 || !args[1].length || !args[2].length) { player.outputChatBox('Valid syntax: <b>/pm [recipient_id_or_nickname] [text_message]</b>'); return false; } // Search recipient by second argument const recipient = findPlayerByIdOrNickname(args[1]); // If recipient not found show special message if (!recipient) { player.outputChatBox('<b>User not found</b>'); return false; } // Source message const message = fullcmd.substr(fullcmd.indexOf(args[1]) + args[1].length + 1); // Generate chat string in the following format: // [PM] Sender_Nickname[Sender_Id] -> Recipient_Nickname[Recipient_Id]: Text message const str = `<b>[PM] ${player.name}[${player.id}] -> ${recipient.name}[${recipient.id}]</b>: ${message}`; // Send message to recipient recipient.outputChatBox(str); // Send message to sender player.outputChatBox(str); } };
  3. Choose What Would you choose?

    Oh I have already voted :((
  4. Choose What Would you choose?

    Why Google Pixel XL is mising here?
  5. Some questions

    Hi everyone! I have some questions about your multiplayer: Will you open source code in future? Does it uses GTA Online network code (like fivem-based multiplayers)? Can 1.33 players play together with 1.35 players? What do you think about embedding second scripting language? Do you have any ETA?