ESX Security Patches - billing, drugs, illegal_drugs, jail, qalle-jail, CommunityService

good job taking care of the og scripts bro

Same problem with esx_jail and communityservice

local xtgt

1 Like

In what way is it being triggered?

yea i tested with command to put someone and i am admin and then i do command /comserv id 20

i got big error in chat also in console:
1assfhg

1 Like

Made update that might fix. Try downloading again.

I updated but i have like problem with server/server.lua:10: attempt to index a nil value (local ‘xSrc’)

When i type like /comserv id 1 also with /endcomserv command… can you check command on server side problem?

Ok. I pushed a new update to esx_jail, esx-qalle-jail, and esx_communityservice.

2 Likes

Yea nice it fixed error issues… command also fixed isssue but one more issuse with command i get when try to put someone as admin in community server i got this weird print in console when using command:

esx_communityservice --> [] nil has attempted to send [1] Tinky from community service via the sendToCommunityService event. The Legitimacy check returned false with a reason of xSrc or xTgt == nil..

Updated to lastest esx_communityservice update

Earlier in this topic people talked about esx_society:setjob event being vulnerable. But if im right esx_society already has a server side check to block setjob without being on grade “boss.”.

That’s correct. I questioned him on what even he was using but, I received no response, as I assumed.

Thanks for this :).

You fixed some of the more common/serious issues. Only other one I can think of is esx_drugs as all of its drug events are client side so if someone dumps your client side they get everything. (Idk if they still are as I haven’t used it in over a year.)

@ATG Some good issues you have brought up here.
And great to see someone step up and sort these issues out.
I may look in to some sort of ANTI Trigger event call. Not sure how it would separate generic triggers from miss use triggers. or if its possible. I look into it.

You may have started something here against the arseholes like @mcmurren_modz who jump servers just to be dicks.
Be great to see more good guys take up this reign.

Question. So, ESX has the availability server-side to check if a command is a specific job, right? So in your register commands why is the code so fucking messy when you can just use

local xPlayer = ESX.GetPlayerFromId(source)

and

if xPlayer ~= nil and xPlayer.job ~= nil and xPlayer.job.name == ‘police’

Which sure you’re doing a check if the player is admin which once again can still be used with the xPlayer, so I’m genuinely confused why you’ve made a mess and added the function as is when you could just even make the function smaller and replace with ESX’s “native” handler for it.

EDIT: I realize my functions for xPlayer are out of date but granted I don’t work with roblox frameworks.

Why did I make it a function? Because it’s used loads of times and it saves me times. It’s easy to use, and easy to reproduce.

Your function is 36 lines, not including the start and end of the function, 36 lines to do something which you can reduce to 16 lines, I made a pull request - not to use my version but to hopefully see a more cleaner way to handle it, it won’t reduce memory used or anything but at least it’s a simpler way which does the job just as effective.

1 Like

Your version is much smaller however, it does not respond with reasoning (which is really useful & i’m sure could be added again with ease). I did notice that I could remove

local srcIdent, tgtIdent = xSrc.identifier, xTgt.identifier;
local tgtJob = xTgt.job.name;
xTgt = ESX.GetPlayerFromId(tgt);

I’ll try and get out a more productive version sometime later.

1 Like

For sure, glad you’re not afraid of constructive criticism like most people are.

1 Like

It’s the best way of learning :slight_smile:

2 Likes

Added esx_drugs!

Added esx_drugs (the one that is refactored from esx_illegal_drugs)