How to make it so freeze is disabled if being whipped?

Hello everyone! I run a darkrp server, and I would like to figure out how to make it so that if a player is being whipped, they can’t be frozen?


if v.whipped then
ULib.tsayError( calling_ply, v:Nick() .. " is being whipped!", true )
v:Unlock()
v.frozen = nil
ulx.clearExclusive( v )
end


that’s what we’ve tried. But it doesn’t work!

Where exactly did you place that piece of code?

If I’m not mistaken (I’m not a big ULX user), you should just need to edit the ulx.freeze function in the fun.lua file in the ulx/lua/ulx/modules/sh/ directory.
You should be able to accomplish what you’re looking to do with 2 lines and changing an if/else statement to an if/elseif/else statement.

Feel free to correct me if there’s a better way to do it. You could probably just plug some code into an autorun Lua file, but I prefer to go directly to the source.