ID 0 bug
#1

Hey. I've added some commands with the discord connector like /dchaton and /dchatoff to toggle between the Discord Chat but only id 0 is able to see the messages that are sent from discord to the samp server.
Code:

PHP код:
public DCC_OnChannelMessage(DCC_Channel:channelDCC_User:author, const message[])
{
    new 
channel_name[100 1];
    if(!
DCC_GetChannelName(channelchannel_name))
        return 
0;
    new 
user_name[32 1];
    if (!
DCC_GetUserName(authoruser_name))
        return 
0;
        
    new 
str[145];
    
format(strsizeof str"{667aca}[Discord/%s] %s:{ffffff} %s"channel_nameuser_namemessage);
    for(new 
0MAX_PLAYERSi++){
    if (
DiscordStats[i]==0) return 0;
    
SendClientMessage(i, -1str); }
    return 
1;

I want the it to show the messages to everyone who have Discord chat turned on but not the ones who don't have it on.
Reply


Messages In This Thread
ID 0 bug - by Exhibit - 03.04.2018, 14:44
Re: ID 0 bug - by jlalt - 03.04.2018, 14:50
Re: ID 0 bug - by Exhibit - 03.04.2018, 15:00
Re: ID 0 bug - by AdamsLT - 03.04.2018, 15:21
Re: ID 0 bug - by Exhibit - 04.04.2018, 05:33

Forum Jump:


Users browsing this thread: 1 Guest(s)