SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 14/07/2017, 11:34 PM   #61
Zorono
Huge Clucker
 
Zorono's Avatar
 
Join Date: Dec 2015
Location: Africa, Egypt, Alexandria
Posts: 362
Reputation: 30
Default Re: Discord Connector

Removed...

Last edited by Zorono; 15/07/2017 at 10:22 AM.
Zorono is offline   Reply With Quote
Old 15/07/2017, 03:33 PM   #62
supernerd2000
Big Clucker
 
Join Date: Jun 2014
Posts: 60
Reputation: 3
Default Re: Discord Connector

Any change of seeing a DCC_Disconnect function? Would be nice to make a status-checker.
supernerd2000 is offline   Reply With Quote
Old 22/07/2017, 06:56 PM   #63
[G]am3r
Guest
 
Posts: n/a
Default Re: Discord Connector

I got some error, when I start my server using the plugin and my filterscript with the code maddinat0r provided. I also edited the token and server id. My samp server dosen't starts. Happened on windows, didn't tried on linux.
  Reply With Quote
Old 22/07/2017, 07:54 PM   #64
SmileJack
Big Clucker
 
SmileJack's Avatar
 
Join Date: Jul 2017
Posts: 83
Reputation: 0
Default Re: Discord Connector

Nice plugin!
SmileJack is offline   Reply With Quote
Old 31/07/2017, 10:16 AM   #65
criticalerror
Little Clucker
 
Join Date: Jan 2016
Posts: 15
Reputation: 6
Default Re: Discord Connector

Please add support for polish symbols, like ą, ę, , ć, ź, ż, ł

Messages with this symbols are not sending in Discord chat.
criticalerror is offline   Reply With Quote
Old 01/08/2017, 01:48 AM   #66
arad55
Big Clucker
 
Join Date: Jul 2011
Posts: 165
Reputation: 0
Default Re: Discord Connector

Code:
public DCC_OnChannelMessage(DCC_Channel:channel, const author[], const message[])
1. You need to check that author is NOT your bot with author[] (in-case you want to enable in-game to discord messaging too)
2. Then check if the first index in message[] equals the symbol '!'.
3. If it does, you can send the message to all players
Code:
format(msg, sizeof(msg), "[Discord] %s: %s", author, message);
arad55 is offline   Reply With Quote
Old 01/08/2017, 09:48 AM   #67
EmrySH
Little Clucker
 
Join Date: Oct 2016
Posts: 1
Reputation: 0
Default Re: Discord Connector

Can I redirect users from one channel to another? Depending on the conditions inside Gamemode/
EmrySH is offline   Reply With Quote
Old 01/08/2017, 10:50 AM   #68
Crystallize
High-roller
 
Join Date: Aug 2013
Posts: 1,579
Reputation: 308
Default Re: Discord Connector

Quote:
Originally Posted by Crystallize View Post
It's possible yet to issue ban commands through discord?
Any answers on this?
__________________
SAMP BATTLE GROUNDS
87.98.241.207:7780
Crystallize is online now   Reply With Quote
Old 01/08/2017, 11:52 AM   #69
Xeon
Banned
 
Join Date: Jul 2017
Location: Earth
Posts: 526
Reputation: 96
Default Re: Discord Connector

Quote:
Originally Posted by Crystallize View Post
Any answers on this?
hmm, i have an idea on this.

its possible to create an table on SQLite/MySQL Database named `DDC_Admins` on it you will put columns
Name and Admin level

and you need to use this callback
PHP Code:
forward DCC_OnChannelMessage(DCC_Channel:channel, const author[], const message[]); 
when he use !ban or $ban call it as you want. you should check if author name is exists on DDC_Admins on databse,
if its exists check the level of name. then allow the command

here is an expl of it

PHP Code:
DCCMD:ban(channel[], user[], params[])
{   
    new 
query[71], Cache:getCacherows;
    
mysql_format(connquerysizeof(query), "SELECT * FROM `DDC_Admins` WHERE `Name` = '%e'"user);
    
getCache mysql_query(connquery);
    
cache_get_row_count(rows);
    if(
rows != 0)
    {
        new 
admin;
        
cache_get_value_name_int(0"Admin"admin);
        if(
admin 2) return DCC_SendChannelMessage(echo, "Sorry, you can't use this command.");
        
cache_delete(getCache);
        
// Your ban command here
        
return 1;
    }
    else return 
DCC_SendChannelMessage(echo, "Sorry, you can't use this command.");
    return 
1;

or you can use it from your users database directly by adding Discordname column in end of table and add editing it by command ingame

Here's Discord command processor: http://forum.sa-mp.com/showthread.ph...95#post3908995


or simply allow ban command only from crew channel in discord

Last edited by Xeon; 01/08/2017 at 04:25 PM.
Xeon is offline   Reply With Quote
Old 01/08/2017, 02:09 PM   #70
kernel32
Little Clucker
 
kernel32's Avatar
 
Join Date: Sep 2016
Posts: 19
Reputation: 0
Default Re: Discord Connector

Discord incorrectly displays Cyrillic alphabet.
kernel32 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Plugin] Teamspeak Connector maddinat0r Plugin Development 322 09/02/2018 11:53 AM
Route Connector James_Braga Русский/Russian 9 15/05/2015 08:24 AM
[Map] Connector Gas Tellken Maps 4 01/06/2012 03:04 AM
PSU connector help! patchkinson Everything and Nothing 3 20/03/2010 09:24 PM


All times are GMT. The time now is 02:26 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.