Download pd2 Chat Commands Script - Requests Open Payday 2 hacks and Cheats | OxKos.com - Place to find Great Game Hacks and other Free Stuff | OxKos.com - Place to find Great Game Hacks and other Free Stuff

Download pd2 Chat Commands Script – Requests Open Payday 2 hacks and Cheats

Chat Commands Script – Requests Open –


I’ve been making scripts for PAYDAY: The heist for many years so I have decided to start making scripts for PAYDAY 2 as well, I adapted my PAYDAY The Heist Chat Commands Script to PAYDAY 2.
Post Require to “lib/managers/chatmanager”
Code: if rawget(_G, “CommandManager”) then — this allows us to reload the script in case we made some changes in-game. rawset(_G, “CommandManager”, nil)end if not rawget(_G, “CommandManager”) then rawset(_G, “CommandManager”, {}) — CommandManager settings. CommandManager.command_prefix = “.” — Command prefix CommandManager.history = {} CommandManager.cmd = nil  — Send a message to a player function CommandManager:Send_Message(peer_id, message) if not message or message == “” then return end  local peer = managers.network:session():peer(peer_id)  if peer then managers.chat:feed_system_message(ChatManager.GAME, string.format(“private message sent to %s”, peer:name())) managers.network:session():send_to_peer(peer, “send_chat_message”, 1, message) end end  — Check Command function CommandManager:Command(command) if string.sub(self.cmd, 1, command:len()) == command then return true end end  — Command Handler function CommandManager:CommandHandler(message, peer_id) local peername = managers.network:session():peer(peer_id):name() local peeruserid = managers.network:session():peer(peer_id):user_id() local lpeer_id = managers.network:session():local_peer():id() local unit = managers.network:session():peer(peer_id):unit() local lunit = managers.player:player_unit() local args = {} if not peername then return end  — prefix check if message:sub(1,1) ~= CommandManager.command_prefix or string.len(message) == 1 then return end  if peer_id == lpeer_id then table.insert(self.history, 1, message) end — commands for command in string.gmatch(message, ‘[^’..self.command_prefix..’]+’) do command = command:lower() self.cmd = command  for cmd_args in command:gsub(“^.-%s”, “”, 1):gmatch(“%S+”) do — setup command args table.insert(args, cmd_args) end  if self:Command(“inf”) then local peer = managers.network:session():peer(tonumber(args[1])) if peer and alive(peer:unit()) and peer:id() ~= lpeer_id then unit = peer:unit() if peer.inf_tase == nil then — only create loop one time (saves cpu). peer.inf_tase = true for i = 1, 100 do managers.enemy:add_delayed_clbk(“_”..i, function() if peer.inf_tase then unit:network():send(“sync_player_movement_state”, “standard”, 0, unit:id()) unit:network():send(“sync_player_movement_state”, “tased”, 0, unit:id()) end end, Application:time() + (9 * i)) end else peer.inf_tase = true end end end  –Send a private message to a player if self:Command(“dm”) or self:Command(“prv”) then if peer_id == lpeer_id then if managers.network:session():peer(tonumber(args[1])) then local peername = managers.network:session():peer(tonumber(args[1])):name() if peername then local text = “” for i, msg in pairs(args) do if i ~= 1 then text = string.format(“%s %s”, text, args[i]) end end self:Send_Message(tonumber(args[1]), string.format(“[PRIVATE]: %s”, text)) end end end end if self:Command(“prf”) then if peer_id == lpeer_id then local peerid = tonumber(args[1]) local peer = managers.network and managers.network:session():peer(peerid) if peer then Steam:overlay_activate(“url”, string.format(“http://steamcommunity.com/profiles/%s/”, peer._user_id)) end end end if self:Command(“status”) then local peer = managers.network:session():peer(tonumber(args[1])) local status = args[2] if peer and alive(peer:unit()) and peer:id() ~= lpeer_id then unit = peer:unit() unit:network():send(“sync_player_movement_state”, status, 0, unit:id()) end end  if self:Command(“stop”) then — stop a player from being tased local peer_id = tonumber(args[1]) local peer = managers.network:session():peer(peer_id) if peer and alive(peer:unit()) and peer.inf_tase then peer.inf_tase = false end end end end  function ChatManager:send_message(channel_id, sender, message) if managers.network:session() then sender = managers.network:session():local_peer() if string.sub(message, 1, 1) == CommandManager.command_prefix then CommandManager:CommandHandler(message, managers.network:session():local_peer():id()) else managers.network:session():send_to_peers_ip_verified(“send_chat_message”, channel_id, message) self:receive_message_by_peer(channel_id, sender, message) end else self:receive_message_by_name(channel_id, sender, message) end end function ChatManager:receive_message_by_peer(channel_id, peer, message) if self:is_peer_muted(peer) then return end local color_id = peer:id() local color = tweak_data.chat_colors[color_id] or tweak_data.chat_colors[#tweak_data.chat_colors] CommandManager:CommandHandler(message, peer:id()) self:_receive_message(channel_id, peer:name(), message, tweak_data.chat_colors[color_id] or tweak_data.chat_colors[#tweak_data.chat_colors], (peer:level() == nil and managers.experience:current_rank() > 0 or peer:rank() > 0) and “infamy_icon”) end function tablelength(T) local count = 0 for _ in pairs(T) do count = count + 1 end return count end ChatGui.selected_command = 0 local orig = ChatGui.key_press function ChatGui:key_press(o, k) orig(self, o, k) local text = self._input_panel:child(“input_text”) if self._key_pressed == Idstring(“up”) then if self.selected_command ~= tablelength(CommandManager.history) then self.selected_command = self.selected_command + 1 if CommandManager.history[self.selected_command] then text:set_text(CommandManager.history[self.selected_command]) end end elseif self._key_pressed == Idstring(“down”) then self.selected_command = self.selected_command – 1 if CommandManager.history[self.selected_command] then text:set_text(CommandManager.history[self.selected_command]) end if self.selected_command <= 0 then self.selected_command = 0 text:set_text(“”) end elseif self._key_pressed == Idstring(“enter”) then self.selected_command = 0 end end  local orig = HUDChat.key_press function HUDChat:key_press(o, k) orig(self, o, k) local text = self._input_panel:child(“input_text”) if self._key_pressed == Idstring(“up”) then if self.selected_command ~= tablelength(CommandManager.history) then self.selected_command = self.selected_command + 1 if CommandManager.history[self.selected_command] then text:set_text(CommandManager.history[self.selected_command]) end end elseif self._key_pressed == Idstring(“down”) then self.selected_command = self.selected_command – 1 if CommandManager.history[self.selected_command] then text:set_text(CommandManager.history[self.selected_command]) end if self.selected_command <= 0 then self.selected_command = 0 text:set_text(“”) end elseif self._key_pressed == Idstring(“enter”) then self.selected_command = 0 end endend

List of commands:

  • /dm – send a private message to a player.
  • /inf – tase a player in loop (basically infinte tasing)
  • /prf – open a player’s steam profile on steam interface.
  • /prv – send a private message to a player.
  • /status – change a player state.
  • /stop – stop a player from being tased.

Example:/status2arrestedNotes:
You can change the command prefix (“/” by default) at the CommandManager.command_prefix variable.
You can scroll between your used commands with up/down arrow keys.
Command requests are open.

Download

Spread the love


I'm a game lover and game player so decided to create a website for other user to download Free Game hacks. Most time i don't use game cheats however sometime i do and is fun!

Share This Post

Recent Articles

Leave a Reply

Call Of Duty Mobile Hack ✅ COD Mobile Points Free 🔥 COD Mobile Hack APK Android/iOS Call Of Duty Mobile Hack that will work for your android and ios devices which will help you enjoy COD Mobile Hack more than ever, making the gameplay fun and exciting. You asked us how to hack call of duty mobile and we searched day and night for working call of duty mobile hacker that will allow you to get cod mobile points as well as cod mobile credits in less than 1 minutes. Click here to get Free Points!