{SOLVED}I know the method IsInGroup, but I don't know how to disclaim it??
Well it be like IsNotInGroup? Or is there even a way to disclaim it?{SOLVED}
{SOLVED}I know the method IsInGroup, but I don't know how to disclaim it??
Well it be like IsNotInGroup? Or is there even a way to disclaim it?{SOLVED}
The unary logical operator not inverts a boolean statement.
That is, not true is false and not false is true.
IsInGroup returns a boolean, so not will work as expected with it, e.g.,
notinagroup = not player:IsInGroup(someGroupId)
Otherwise, in a clearer way, if ... else constructs can act depending on the truthy-ness of a statement:
if player:IsInGroup(someGroupId) then
-- What to do if in group
else
-- What to do if NOT in group
end
Thanks.
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
What do you mean by "disclaim"?
I mean... I want the script to check if the player IS NOT in a group, instead of checking if he/she IS in a group.