[FilterScript] Discord Admin Control Panel - Manage players through discord!
#1

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

cheers! ( 2nd release )

Credits:
maddinat0r
Inn0cent
******
Me - Inferno.
Reply
#2

Sounds good, but could you provide some screens?
Reply
#3

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.


Reply
#4

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

Wooow that sounds awesome, great work mate.
Reply
#6

Good Idea brother
Reply
#7

One of the most useful releases nowadays, good job!
Reply
#8

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

Good release!
Reply
#10

Do you mind putting up a pastebin/github link?
Reply
#11

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

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.
Reply
#13

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.
Reply
#14

i can't seem to get this to work
Reply
#15

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

v0.2
Just a few optimizations with the players command.
Reply
#17

Good job.
Reply
#18

When I compiled, I get this warning?

warning 203: symbol is never used: "players"
Reply
#19

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

Rouge they already putted a pastebin and solidfiles link

And good work keep it up
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)