Comments (4)
Hmm, that stuff down there is quite experimental, tried to add levels in kick menu and joining dialog, as well as removing level in players 'over-head' labels....
Only the kick levels seem to work, the rest is kinda broken and needs some more work.... :/
Added a check for HUDManager for now, so that error goes away.
Not quite sure, which of the other two Hooks isn't possible to hook into, will try that out later...
from wolfhud.
I thought kick levels were in the base game?
https://bitbucket.org/YaPh1l/payday-2-lua/src/17e0723084141b791a4ce490a022ba5c43f58bd1/lib/managers/menumanager.lua?at=master&fileviewer=file-view-default
KickPlayer = KickPlayer or class()
function KickPlayer:modify_node(node, up)
node:clean_items()
if managers.network:session() then
for _, peer in pairs(managers.network:session():peers()) do
local params = {
name = peer:name(),
text_id = peer:name() .. " (" .. (peer:rank() > 0 and managers.experience:rank_string(peer:rank()) .. "-" or "") .. (peer:level() or "") .. ")",
callback = "kick_player",
to_upper = false,
rpc = peer:rpc(),
peer = peer,
help_id = peer:is_host() and managers.localization:text("menu_vote_kick_is_host") or managers.vote:option_vote_kick() and managers.vote:help_text() or "",
localize = false,
localize_help = false
}
local new_item = node:create_item(nil, params)
if peer:is_host() or managers.vote:option_vote_kick() and not managers.vote:available() then
new_item:set_enabled(false)
end
node:add_item(new_item)
end
end
managers.menu:add_back_button(node)
return node
end
Try BaseNetworkSession for the joining dialog and menumanagerdialog
from wolfhud.
Uhm, how could I overlook that.... removed it now.
Now I feel stupid, xD
The other errors resulted out of the 'MenuNodeMainGui' not beeing present, when Core.lua got called.
Added a check for that now.
Also moved the other stuff out of core, into more appropriate places.
Yeah, for the joining, I'm already in menumanagerdialog, but I'm not quite sure, if my code isn't working, or the level just syncing too late. Only tested it with 2 or 3 players, and for those it didn't show up...
Thanks for the help, might take a look into BaseNetworkSession....
from wolfhud.
Managed to get the player rank to show
function MenuManager:show_person_joining(id, nick)
local dialog_data = {}
local peer = managers.network:session():peer(id)
local name = nick
name = name .. " (" .. (peer:rank() > 0 and managers.experience:rank_string(peer:rank()) .. "-" or "") .. peer:level() .. ")"
dialog_data.title = managers.localization:text("dialog_dropin_title", {
USER = string.upper(name)
})
dialog_data.text = managers.localization:text("dialog_wait") .. " 0%"
dialog_data.id = "user_dropin" .. id
dialog_data.no_buttons = true
managers.system_menu:show(dialog_data)
end
from wolfhud.
Related Issues (20)
- Custom heists crash HOT 1
- Golden Grin Casino: Quest loot is named "???"
- Game crashes after entering heist and shooting HOT 5
- Game crashes when I join a lobby. HOT 3
- Игра вылетает при стрельбе в кого-либо HOT 6
- FIX BUG IN EGS
- скачал WolfHUD после того как в игре нажимаю на Tab или стреляю игра вылетает без ошибок на робочий стол после удаления всё было нормально скачал снова всё повторилось. что делать? HOT 2
- game chrashes after killing somone (RESOLVED) HOT 1
- Crashing when buying/claiming contract HOT 2
- players don't log in
- Проблема отображения иконок баффов HOT 5
- /
- My WolfHUD is crashing during the loading HOT 1
- выллет при запуске wolfHUD payday 2 HOT 2
- Game crashes when playing with other players HOT 3
- !!!READ BEFORE ASK
- The game is crashing, because of WolfHUD! (Trading platform) HOT 1
- Crashing on Bank Heist HOT 6
- Нажал букву чата взяла и вылетает постояна HOT 2
- Game crash when I try to talk in in-game chat during a heist beacuse of Wolf hud HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wolfhud.