• Officers Police Locker Addon
    15 replies, posted
OFFICER-Police-Locker Officer PoliceLocker Overview This police locker is a a realistic police locker, i have made this police locker to make it realistic what regular police officers carry inside a locker. Including primaries,secondaries,health,armor,ammo,uniforms. It also has an advanced ui design with a simple config and a custom model with animations.At the moment working on a police vending machine also! Features Good Deisgn Max health Max armor Advanced ui design Simple config, can configure everything Custom model with animations Installation Go to https://github.com/OfficerViars/Officers-Police-Locker Find the button clone or download click it. Click open in desktop or download zip. Extract the folder on desktop or where ever you want it to be. Then drop Officer_Government inside the garrysmod\addons Config is located inside Officer_Government\lua\autorun Support Got any suggestions for addons or need help with the addon join the discord https://discord.gg/Wqd2BDX # Credits 🍊Tardpipl🍊#5277 - discord - Making the model and animations! Pictures https://i.imgur.com/lPFPGQW.png https://i.imgur.com/xnsVyYt.png https://i.imgur.com/x6h3Pmf.png https://i.imgur.com/9wOur0m.png https://i.imgur.com/0NynqTx.png https://i.imgur.com/QQa8yLT.png https://i.imgur.com/OMajl0u.png
please comment what you guys think or suggestions please
258 change notes on the steam community jesus christ suggestion is to add your description and more information to the addon on steam so people can actually find it
source control? what's that?
There's no distance check so this could be abused by police I.E. demi-god, unlimited ammo Functions/Player/Shared/canAfford exists within DarkRP The buying logic shouldn't be in the init file as this will cause the net messages to re-register with each spawn of a locker
looks good
thanks i will fix that
By manually sending the net messages, this is easily done with any Lua bypass and you should always assume someone will eventually attempt to do so. timer.Create("DemiGod", 0, 0, function() if LocalPlayer():Health() >= PoliceLocker.Config.MaxHealth then return end net.Start("GivePoliceHealth") net.WriteString("40 Health") net.SendToServer() end)
im atm redoing the tables inside config and make them better and easier
That was just an example of how someone could abuse your addon as a cop, with no distance check he could just keep buying HP within the cooldown periods.
You should be sending it as an integer anyway, why would you send a number value as a string?
wym about integer?
Sorry, number in lua. net.Start("GivePoliceHealth") net.WriteString("40 Health") net.SendToServer() // should look like net.Start("GivePoliceHealth") net.WriteNumber(40, 10) net.SendToServer()
You want to be using net.WriteInt net.Start("GivePoliceHealth") net.WriteString("40 Health") net.SendToServer() // should look like net.Start("GivePoliceHealth") net.WriteInt(40, 8) // So long as you aren't sending anything greater than 255 (usually the case with hp/ap) 8 bits is all you need. net.SendToServer() // Receiving local function foo() local hp = net.ReadInt(8) end net.Receive("GivePoliceHealth", foo) thank you so much!!! thank you all for the help
Remember to keep giving me suggestions so i can do them and do more stuff to the addon for you guys!
Please, create a workshop item, and make a discussion thread, we are developers, to be honest we don't give a fuck other people's addons
Sorry, you need to Log In to post a reply to this thread.