Determine what triggered an event

Hi there.

I’m suggesting a way for us to identify what triggered an event using a native. An example of this is, make a way for us to identify if a server event was triggered by the server or if it was triggered by the client, and which script it came from. I think this would help combat cheaters who spam events in a big way. Not sure if this exists yet or not.

  • Flawws

There is GET_INVOKING_RESOURCE, this returns nil though when triggered from the client. You cannot trust the client as it could easily inject their malicious code in whatever resource (or just send the right resource in the event).

Ah, I had no idea that was possible, thank you.

Does this solution still work? It would seem after testing, GetInvokingResource() always returns nil when called from the server side of the same resource.

So in further testing; when triggering events from the same environment (ie. server ↔ server | client ↔ client), GetInvokingResource() returns the resource which called the event… perfect! But if you call the same event from a different environment, GetInvokingResource() returns nil, regardless of whether it was called from a different resource or not.

Has the functionality of this function changed, or am I misinterpreting the solution to the aforementioned issue in this topic?