Jump to content

SetStatus Hook Isn't Firing

Closed 1.1.3 1.1.4

BippyMiester

Posted

So, after much debugging, and using both carbon and oxide, I'm under the impression that the "SetStatus" hook isn't being called.

I loaded up the demo plugin in the description, typed the /show command in chat, and theres nothing popping up for me at all. I also enabled debug mode on simple status, and its showing the creation of the statuses, but its not firing the set status hook. See attached screenshot.

I'm assuming there is something wrong with this? I also can't get it to work with EasyVotePro anymore either, even though i know its being called at the correct time, and passing the right variable types as well.

 private void SimpleStatusShowMessage(BasePlayer player, string statusId, int duration)
        {
            _Debug("-----------------------------");
            _Debug("Method: SimpleStatusShowMessage");
            _Debug($"Player: {player.displayName}");
            _Debug($"Status ID: {statusId}");
            _Debug($"Duration: {duration.ToString()}");

            SimpleStatus.CallHook("SetStatus", player.userID, statusId, duration);
        }

What threw me for a loop was the fact that the simple status demo plugin didn't work, which makes me believe that the issue lies with simple status and not my plugin. Can you confirm that this is the case?

image.png

BippyMiester

Posted

Also, this is the output on oxide. The above screenshot is carbon

image.png.842d4eba53e53af4dd46de12d79138cd.png

Mr01sam

Posted

Ah, yes. The most recent update changed the way UserIds work. So the result is that it will break the plugin in some cases. The temporary solution for you is to just add .Get() at the end of where you get the userId. Like this:
image.png.247a71c5c32e92f4bcc2182793ace650.png

I'm working on fixing this on the plugin side to use the UserIdString instead of userId. I plan to make the API support both moving forward.

Mr01sam

Posted

Changed Status from Pending to Work in Progress

Mr01sam

Posted (edited)

This should be fixed in v1.1.4 now - the API method will now accept the user id's as: ulong, Encrypted<ulong> or string, but string is preferred for performance.

I also updated the demo code accordingly.

Edited by Mr01sam
Mr01sam

Posted

Changed Status from Work in Progress to Closed

Changed Fixed In to 1.1.4

1.4m

Downloads

Total number of downloads.

6.9k

Customers

Total customers served.

103.5k

Files Sold

Total number of files sold.

2.1m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.