Aiken Full Member
Posts: 333 Status: Offline Gender: Male Location: In a very lonely place, the domain of despair Age: 34 Joined:
pmskypemsnyahooxfire | Usergroup checker (9th Jan 10 at 7:32am UTC) Resolved | | Code: - <script>
- function GroupCheck(GroupId){
-
- GCheck = false;
-
- for(i = 0; i <= vf_usergroup.length; i++){
-
- if(vf_usergroup[i] = GroupId){
-
- GCheck = true;
- break;
-
- }
-
- }
-
- return GCheck;
-
- }
- </script>
Used to check if the user that is on is in a specific usergroup.
It isn't working right though
I am using it like:
Code: - <script>
- if(GroupCheck(14)){
- //code
- }
- </script>
| |
vF forums: Perfect World RP BLEACH Universe - Under Construction / Testing Phase Xen Qarna RP - Stage I Vyren Entar Battle Network RP - Under Construction / Maintenance Mode Enabled the Final Anime Hideout |
|
Ross Administrator
Posts: 3,709 Status: Offline Gender: Male Age: 8 1⁄1 Joined:
Additional Groups: Support Team
pmwwwgtalkvForum | Re: Usergroup checker (9th Jan 10 at 11:06pm UTC) | | To do a conditional check it needs a double ==
if(vf_usergroup[i] == GroupId){ | |
|
|
Aiken Full Member
Posts: 333 Status: Offline Gender: Male Location: In a very lonely place, the domain of despair Age: 34 Joined:
pmskypemsnyahooxfire | |
Ross Administrator
Posts: 3,709 Status: Offline Gender: Male Age: 8 1⁄1 Joined:
Additional Groups: Support Team
pmwwwgtalkvForum | Re: Usergroup checker (9th Jan 10 at 11:24pm UTC) | | Sometimes we all just need a fresh pair of eyes to spot the simple things | |
|
|
Aiken Full Member
Posts: 333 Status: Offline Gender: Male Location: In a very lonely place, the domain of despair Age: 34 Joined:
pmskypemsnyahooxfire | |