HungryCoyote Posted January 12 Posted January 12 On a dedicated server, I would like to keep people from joining if their name is the default "Player". Is this possible?
Actium Posted January 12 Posted January 12 Should be possible via the onPlayerTryConnect hook: function myCall.onPlayerTryConnect(addr, name, ucid, id) if name == "Player" then return false, "Name 'Player' not permitted. Please change your name!" end end
Actium Posted January 13 Posted January 13 (edited) The hooks are not accessible from the mission scripting environment. You have to create a DCS Control API hook script, e.g. %USERPROFILE%\Saved Games\DCS.dcs_serverrelease\Scripts\Hooks\ProhibitNamePlayer.lua with the following content (untested code, but shouldTM be working) : -- SPDX-License-Identifier: MIT -- callback object, see DCS API documentation for details: -- * file:///C:/DCS_INSTALL_PATH/API/DCS_ControlAPI.html -- * https://wiki.hoggitworld.com/view/Hoggit_DCS_World_Wiki local myhook = {} function myhook.onPlayerTryConnect(addr, name, ucid, id) if name == "Player" then return false, "Name 'Player' not permitted. Please change your name!" end end -- register callback if this is a server instance if DCS.isServer() then DCS.setUserCallbacks(myhook) end Edited January 13 by Actium 2
Mistermann Posted January 13 Posted January 13 19 hours ago, HungryCoyote said: On a dedicated server, I would like to keep people from joining if their name is the default "Player". Is this possible? I highly recommend putting SLmod onto your server. There are lots of great options for you to manage your server - including a "Ban" feature. 1 System Specs: Spoiler Callsign:Kandy Processor:13th Gen Intel(R) Core(TM) i9-13900K - RAM: 64GB - Video Card: NVIDIA RTX 4090 - Display: Pimax 8kx VR Headset - Accessories: VKB Gunfighter III MCG Ultimate, VKB STECS Standard, Thrustmaster TPR Pedals, Simshaker JetPad, Predator HOTAS Mounts, 3D Printed Flight Button Box Video Capture Software: Open Broadcaster Software (OBS), Video Editing Software: PowerDirector 365 Into The Jungle Apache Campaign - Griffins Kiowa Campaign - Assassins Thrustmaster TWCS Mod
HC_Official Posted January 14 Posted January 14 (edited) I handled this issue by playing a audio annoying as hell sound along with a text message on screen for the person named player , it does this every 30 seconds to annoy the hell out of them until they leave Side Note: IF there is a person named player on the server and another person named player tries to connect, the server prevents them from joining, so it looks like you cannot have 2 people on a server with the same name at the same time Edited January 14 by HC_Official 2 No more pre-orders Click here for tutorials for using Virpil Hardware and Software Click here for Virpil Flight equipment dimensions and pictures. .
Wrecking Crew Posted January 14 Posted January 14 On 1/13/2025 at 9:39 AM, Mistermann said: I highly recommend putting SLmod onto your server. There are lots of great options for you to manage your server - including a "Ban" feature. I run SLmod on my Hollo Pointe server, and I recommend it. Can "Player" be banned by SLmod by just the name? I don't think so, you would need to manually Ban them the 1st time, in order to get their UID and / or IP. SLmod is great for kicking Teamkillers. BannedClients.lua Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.
Mistermann Posted January 14 Posted January 14 16 minutes ago, Wrecking Crew said: Can "Player" be banned by SLmod by just the name? I don't think so, you would need to manually Ban them the 1st time, in order to get their UID and / or IP. I based my comment of banning on this admin command found in the SLmod wiki. I personally have no need for it, but presumed it was what @HungryCoyote was after. System Specs: Spoiler Callsign:Kandy Processor:13th Gen Intel(R) Core(TM) i9-13900K - RAM: 64GB - Video Card: NVIDIA RTX 4090 - Display: Pimax 8kx VR Headset - Accessories: VKB Gunfighter III MCG Ultimate, VKB STECS Standard, Thrustmaster TPR Pedals, Simshaker JetPad, Predator HOTAS Mounts, 3D Printed Flight Button Box Video Capture Software: Open Broadcaster Software (OBS), Video Editing Software: PowerDirector 365 Into The Jungle Apache Campaign - Griffins Kiowa Campaign - Assassins Thrustmaster TWCS Mod
Recommended Posts