SA-MP Forums Archive
[FilterScript] Discord Admin Control Panel - Manage players through discord! - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Discord Admin Control Panel - Manage players through discord! (/showthread.php?tid=655367)



Discord Admin Control Panel - Manage players through discord! - Exhibit - 19.06.2018

Discord - Admin Control Panel v0.2


Hi, I'm back with another discord release lol. This filterscript only consists of "kick, asay, freeze, unfreeze and cmds". I did not add more commands right now because people have trouble with their roles id and they can't get it to work so I scripted only these commands for the release so every level of adminstration can use the commands.

Steps to get it working

Firstly read this topic https://sampforum.blast.hk/showthread.php?tid=631562 after that make a channel only for your staff on discord. Place the channel id, bot name, prefix etc in the filterscript and you are good to go.
You must read the discord connector topic!

Requirements
Discord Connector Plugin - https://sampforum.blast.hk/showthread.php?tid=631562
YSI/y_ya
sscanf2 plugin
dcc include by Inn0cent - https://sampforum.blast.hk/showthread.php?pid=3981609#pid3981609

Download
https://www.solidfiles.com/v/kDx7QjDGqAZjR
https://pastebin.com/kDF71D8z
cheers! ( 2nd release )

Credits:
maddinat0r
Inn0cent
******
Me - Inferno.


Re: Discord Admin Control Panel - Manage players through discord! - RxErT - 19.06.2018

Sounds good, but could you provide some screens?


Re: Discord Admin Control Panel - Manage players through discord! - Exhibit - 19.06.2018

Quote:
Originally Posted by RxErT
View Post
Sounds good, but could you provide some screens?
sure.

All the output is going to the samp server. These are old screens I didn't get the new ones but It gives you an idea of how it works.





Re: Discord Admin Control Panel - Manage players through discord! - JeSuisUnChat - 06.07.2018

Nice job but what is the BOT_CHANNEL ? Because the commands don't work for me


Re: Discord Admin Control Panel - Manage players through discord! - Akeem - 06.07.2018

Wooow that sounds awesome, great work mate.


Re: Discord Admin Control Panel - Manage players through discord! - BanSilog - 06.07.2018

Good Idea brother


Re: Discord Admin Control Panel - Manage players through discord! - Crystallize - 06.07.2018

One of the most useful releases nowadays, good job!


Re: Discord Admin Control Panel - Manage players through discord! - Ultraz - 06.07.2018

Finally non-useless script in these days, keep it up!


Re: Discord Admin Control Panel - Manage players through discord! - AzaMx - 07.07.2018

Good release!


Re: Discord Admin Control Panel - Manage players through discord! - RogueDrifter - 07.07.2018

Do you mind putting up a pastebin/github link?


Re: Discord Admin Control Panel - Manage players through discord! - Exhibit - 07.07.2018

Quote:
Originally Posted by RogueDrifter
View Post
Do you mind putting up a pastebin/github link?
I've added a pastebin link.


Re: Discord Admin Control Panel - Manage players through discord! - RogueDrifter - 07.07.2018

U should change this:
Code:
    for(new i=0; i < MAX_PLAYERS; i++) {
    GetPlayerName(i, name, MAX_PLAYER_NAME);
    if(!IsPlayerConnected(i)) continue;
To this:
Code:
    for(new i=0; i < MAX_PLAYERS; i++) {
    if(!IsPlayerConnected(i)) continue;
    GetPlayerName(i, name, MAX_PLAYER_NAME);
Also do you realize that this:
Code:
    for(new i=0; i < MAX_PLAYERS; i++) {
    GetPlayerName(i, name, MAX_PLAYER_NAME);
    if(!IsPlayerConnected(i)) continue;
    SendDC(CHANNEL_ID, "```%s(%d)```", name, i); }
Is going to send 500 discord messages if the server is busy enough? I'd suggest grouping it all up in one string and sending one message or at least do so by checking the amount of online players?

One last thing is this:
Code:
GetPlayerName(giveplayerid, giveplayer, MAX_PLAYER_NAME);
It is for the best always using the sizeof the varible you're storing the name in regardless if MAX_PLAYER_NAME is the same just for compatibility cautiousness in this case and all other cases seeing as if the size of that variable's array ever changes it will lead into problems.

Nevertheless, there isn't much to look at seeing as its a small script, it's a cool idea lots of the effort done was put into the include&plugin that's for sure but it's different so good job to you, Inn0cent and maddinat0r.


Re: Discord Admin Control Panel - Manage players through discord! - Exhibit - 07.07.2018

Quote:
Originally Posted by RogueDrifter
View Post
U should change this:
Code:
    for(new i=0; i < MAX_PLAYERS; i++) {
    GetPlayerName(i, name, MAX_PLAYER_NAME);
    if(!IsPlayerConnected(i)) continue;
To this:
Code:
    for(new i=0; i < MAX_PLAYERS; i++) {
    if(!IsPlayerConnected(i)) continue;
    GetPlayerName(i, name, MAX_PLAYER_NAME);
Also do you realize that this:
Code:
    for(new i=0; i < MAX_PLAYERS; i++) {
    GetPlayerName(i, name, MAX_PLAYER_NAME);
    if(!IsPlayerConnected(i)) continue;
    SendDC(CHANNEL_ID, "```%s(%d)```", name, i); }
Is going to send 500 discord messages if the server is busy enough? I'd suggest grouping it all up in one string and sending one message or at least do so by checking the amount of online players?

One last thing is this:
Code:
GetPlayerName(giveplayerid, giveplayer, MAX_PLAYER_NAME);
It is for the best always using the sizeof the varible you're storing the name in regardless if MAX_PLAYER_NAME is the same just for compatibility cautiousness in this case and all other cases seeing as if the size of that variable's array ever changes it will lead into problems.

Nevertheless, there isn't much to look at seeing as its a small script, it's a cool idea lots of the effort done was put into the include&plugin that's for sure but it's different so good job to you, Inn0cent and maddinat0r.
I appreciate you pointing out my mistakes, It is always better to learn.


Re: Discord Admin Control Panel - Manage players through discord! - Akeem - 08.07.2018

i can't seem to get this to work


Re: Discord Admin Control Panel - Manage players through discord! - Exhibit - 08.07.2018

Quote:
Originally Posted by Akeem
View Post
i can't seem to get this to work
Contact me on discord. Inferno#7135


Re: Discord Admin Control Panel - Manage players through discord! - Exhibit - 28.07.2018

v0.2
Just a few optimizations with the players command.


Re: Discord Admin Control Panel - Manage players through discord! - Ogisa - 28.07.2018

Good job.


Re: Discord Admin Control Panel - Manage players through discord! - AzaMx - 19.08.2018

When I compiled, I get this warning?

warning 203: symbol is never used: "players"


Re: Discord Admin Control Panel - Manage players through discord! - Danielknow - 15.09.2018

Amazing work! i using it now on my server
Admin console + chat its amazing.


Re: Discord Admin Control Panel - Manage players through discord! - NikhilMeena - 15.09.2018

Rouge they already putted a pastebin and solidfiles link

And good work keep it up