Forum Discussion
Jürgen_Schoene_
11 months agoCommunity Member
here a small Javascript, which can do this
var groups = {
1: [
12345678, 12345679, 112345671,
],
2: [
12345699, 12345698, 112345667,
],
// ...
}
var player = GetPlayer();
var userID = parseInt( player.GetVar("UserID") );
var result = 0
for( var group in groups ){
if( groups[group].indexOf(userID) >= 0 ){
result = group;
break;
}
}
player.SetVar("Group", result )
Group = -1 -> not yet searched
Group = 0 -> not found
Group > 0 -> group number
https://360.articulate.com/review/content/aaf27bda-178d-411f-81cd-6d4d96a41724/review