• How do I disable the wanted and unwanted messages that appear on screen darkrp
    3 replies, posted
Hey so, how would I disable the message in the middle of the screen that tells everyone that they have been wanted or unwanted? I tried this: hook.Add("playerWarranted","supress_warrant_message", function (criminal,actor,reason)     if IsValid(criminal) and IsValid(actor) then         return true     end end) hook.Add("playerWanted", "supress_wanted_message", function (criminal,actor,reason)     if IsValid(criminal) and IsValid(actor) then         return true     end end)   and put it in lua/autorun/server and tried putting it in the darkrpmodification/modules but this doesnt work? any help would be appreciated thank you.
Wouldn't it be easier to just comment out the arrest notifier than try and override it?
you're just wanting to get rid of the screen notification correct? the default code for the warrant/wanted system is found here: DarkRP/sv_init.lua at master · FPtje/DarkRP · GitHub I believe it starts around line 66. Hope this helps
If you're wanting to override those, you would need to override the function in the hook.call, because even if you call a hook and do nothing with it, the hook will still be called in the code, whilst overwriting it will change what it does (which you can alter to your particular liking). However, when it comes to editing things in the modules folder in darkrp, it's better imo to copy-paste the police folder into your own darkrp_modules folder, then edit the code from there.
Sorry, you need to Log In to post a reply to this thread.