smajt Posted July 29, 2023 Share Posted July 29, 2023 (edited) Hi, im trying to get clickedPlayer from OnFillWorldObjectContextMenu. function CCCAdminMenu.CurrentTargets(worldobjects, subMenuObject) local NoPlayer local clickedPlayer = worldobjects.clickedPlayer if instanceof(clickedPlayer, "IsoPlayer") then local clickedPlayer = obj local clickedPlayerName = clickedPlayer.Forname .. " " .. clickedPlayer.Surname TargetName = subMenuObject:addOption(getText("UI_3CRP_Target_Name", clickedPlayerName), worldobjects, nil) TargetName.notAvailable = true NoPlayer = 0 else NoPlayer = 1 end end Now im trying something like this but before that i was trying to use for loop to check if in worldobjects is any instanceof isoplayer is anyone have an idea how i can get that to work ? Edited July 29, 2023 by smajt Link to comment Share on other sites More sharing options...
Hugo Qwerty Posted July 29, 2023 Share Posted July 29, 2023 Are you want to click on another player in MP? If so, maybe take a look at the code that deals with doing a medical check on another player in MP. /media/lua/client/ISUI/ISWorldObjectcontextMenu.lua, line 1331 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now