SA-MP Forums Archive
Issue with DCC_OnChannelMessage (outdated callback, perhaps?) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Issue with DCC_OnChannelMessage (outdated callback, perhaps?) (/showthread.php?tid=674808)



Issue with DCC_OnChannelMessage (outdated callback, perhaps?) - Proxus - 28.04.2020

Hey, I was using this callback but it doesn't get called.
Code:
forward DCC_OnChannelMessage(DCC_Channel:channel, DCC_User:author, const message[]);
public DCC_OnChannelMessage(DCC_Channel:channel, DCC_User:author, const message[])
I was told that it was outdated but I can't find any functions that may replace this.
This seems to also be listed here: https://github.com/maddinat0r/samp-d...tor/issues/136

The closest I found was this:
Code:
forward DCC_OnMessageCreate(DCC_Message:message);
However, the parameters are fairly limited.

Other options would be using these natives with the above callback ^:
Code:
native DCC_GetMessageChannel(DCC_Message:message, &DCC_Channel:channel);
native DCC_GetMessageAuthor(DCC_Message:message, &DCC_User:author);
Is there another easier way?


Re: Issue with DCC_OnChannelMessage (outdated callback, perhaps?) - Markski - 28.04.2020

There's no easier way since the last DCC update. It shouldn't be that hard anyways, you'll just need to fetch those two things at the top of the callback. And of course, DCC_GetMessageContent for the message itself.


Re: Issue with DCC_OnChannelMessage (outdated callback, perhaps?) - Proxus - 28.04.2020

Quote:
Originally Posted by Markski
View Post
There's no easier way since the last DCC update. It shouldn't be that hard anyways, you'll just need to fetch those two things at the top of the callback. And of course, DCC_GetMessageContent for the message itself.
That's what I suspected, cheers for the clarification.