• DarkRP 2.5.1 How do i remove the /pm command?
    11 replies, posted
Trying to remove /pm as I am implementing a different call/pm system but I can't seem to disable pm. I have looked through the configs and cant find anything and have tried to use the command line below in autorun/server and the darkrp_modules but no luck at all. Any help would be much appreciated. [code] DarkRP.removeChatCommand("/pm") [/code]
[url]https://github.com/FPtje/DarkRP/blob/master/gamemode/modules/chat/sv_chatcommands.lua[/url] Delete the chat command.
[QUOTE=code_gs;44260729][url]https://github.com/FPtje/DarkRP/blob/master/gamemode/modules/chat/sv_chatcommands.lua[/url] Delete the chat command.[/QUOTE] Don't edit core gamemode files -Falco Use the darkrp modification [url]https://github.com/FPtje/darkrpmodification[/url]
[QUOTE=Scratch.;44260813]Don't edit core gamemode files -Falco Use the darkrp modification [url]https://github.com/FPtje/darkrpmodification[/url][/QUOTE] [del]And do what? The chat command is in the core files; you'd have to find a hacky way to block the chat command, which isn't ideal when you can just delete it and implement your own system.[/del] Scratch is right, I should really read stuff first.
[QUOTE=code_gs;44260844]And do what? The chat command is in the core files; you'd have to find a hacky way to block the chat command, which isn't ideal when you can just delete it and implement your own system.[/QUOTE] Doubt you read the md You can disable shit with darkrpmod
I know where it is in the core files but i do not want to touch them and dont particularly want to change it everytime i update darkrp aswell, Also there is no actual setting to disable it in the darkrp modification folders. So does anyone have a clue how i could disable it?
EDIT: Didn't work, however this works: Create a file in /addons/darkrpmodification/lua/darkrp_modules/disablepm/sv_disablepm.lua (create folder aswell) and put this into the file, and save: [CODE] local function PM(ply, args) DarkRP.notify(ply, 1, 4, "Private Messaging is disabled on this server.") return "" end DarkRP.defineChatCommand("pm", PM, 1.5) [/CODE]
[QUOTE=Svenskunganka;44264004]EDIT: Didn't work, however this works: Create a file in /addons/darkrpmodification/lua/darkrp_modules/disablepm/sv_disablepm.lua (create folder aswell) and put this into the file, and save: [CODE] local function PM(ply, args) DarkRP.notify(ply, 1, 4, "Private Messaging is disabled on this server.") return "" end DarkRP.defineChatCommand("pm", PM, 1.5) [/CODE][/QUOTE] Ahh many thanks man works well
[QUOTE=datguyrick;44264706]Ahh many thanks man works well[/QUOTE] Glad to be of service! :downs:
Or just remove the slash from removeChatCommand [lua]DarkRP.removeChatCommand("pm")[/lua] Shared realm for this btw.
[QUOTE=Bo98;44264859]Or just remove the slash from removeChatCommand [lua]DarkRP.removeChatCommand("pm")[/lua] Shared realm for this btw.[/QUOTE] Now I feel terribly stupid... Oh well, atleast they get a ehrm... *fancy* looking popup saying "Private Messaging is disabled on this server." when someone tries to PM!
[QUOTE=Svenskunganka;44265159]Now I feel terribly stupid... Oh well, atleast they get a ehrm... *fancy* looking popup saying "Private Messaging is disabled on this server." when someone tries to PM![/QUOTE] Saves players from going "WHY WON'T PM'S WORK" :)
Sorry, you need to Log In to post a reply to this thread.