• If you need help or want to discuss things, you now can also join us on our Discord Server!
  • A first preview of the unlimited version of SinusBot can be found in the Upcoming Changes thread. A version for Windows will follow, but we don't have a release date, yet.

DE Servergroup checker

Status
Not open for further replies.

sestry

Member
------------------------------------------------------- GERMAN -------------------------------------------------------


Hallo,

bin jetzt noch nicht so der Java Pro, deswegen habe ich mal wieder eine Frage:

Ich versuche gerade ein Plugin zu programmieren, welches auf eine Server Gruppe checkt.
Das alles für ein Registrierungs System.
Nun habe ich dies gefunden: https://github.com/Floflobel/sinusbot_scripts/blob/master/MyGroupAssigner.js

Code:
var srvgroups = ev.clientServerGroups;

// Check if group is already assign
                    for (var k in srvgroups) {
                        if (srvgroups[k].i == args[1]) {
                            sinusbot.log('already group assign');
                            return;
                        }
                        else {
                            sinusbot.log('continue..')
                        }
}

Nun habe ich versucht dies bei mir zu implementieren, nur dass es nicht wirklich klappt.
Ich war schon soweit das "args" in "arguments" zu ändern, aber es klappt halt sonst nichts.

Schönen Abend :)





--------------------------------------------- ENGLISH - GOOGLE TRANSLATOR -----------------------------------------------

Hello,

Is now not so the Java Pro, so I once again have a question:

I'm trying to program a plugin that checks for a server group.
All this for a registration system.
Now I have found this: https://github.com/Floflobel/sinusbot_scripts/blob/master/MyGroupAssigner.js

Code:
Var srvgroups = ev.clientServerGroups;

// Check if group is already assigned
For (var k in srvgroups) {
If (srvgroups [k] .i == args [1]) {
Sinusbot.log ('even group assign');
return;
}
Else {
Sinusbot.log ('continue ..')
}
}

Now I have tried to implement it, but it's does not work.
I was already as far as the "args" in "arguments" to change, but it does not work.

Beautiful evening :)
 

Floflobel

Donor
is awesome!
Contributor
Args return in command, you can replace with the group who want to check
Give me the error in the console
 
Last edited:
Status
Not open for further replies.
Top