Zzbrandon Posted October 24, 2012 Author Share Posted October 24, 2012 Ok so I changed this toIf GetPlayerAccess(Index) < ADMIN_CREATOR ThentoIf GetPlayerAccess(Index) = ADMIN_CREATOR ThenBecause there is a higher Access that is for members and I dont want them getting hold of admin and stuff but it doesnt seem to work I can still open with any Access?How can I change the code to only make ADMIN_CREATOR be able to use the command? Link to comment Share on other sites More sharing options...
Matt Posted October 24, 2012 Share Posted October 24, 2012 Compile the code. Link to comment Share on other sites More sharing options...
Zzbrandon Posted October 24, 2012 Author Share Posted October 24, 2012 I did that lol I compiled the project I edited in server and client also It does not work Link to comment Share on other sites More sharing options...
or3o Posted October 24, 2012 Share Posted October 24, 2012 where exactly in the code did you change this? Link to comment Share on other sites More sharing options...
Zzbrandon Posted October 24, 2012 Author Share Posted October 24, 2012 ModInput```Case "/admin" If GetPlayerAccess(MyIndex) = ADMIN_CREATOR Then GoTo Continue frmMain.picAdmin.Visible = Not frmMain.picAdmin.Visible``` Link to comment Share on other sites More sharing options...
or3o Posted October 24, 2012 Share Posted October 24, 2012 If getplayeracess(myindex) < 3 thenexit subend iftry putting that above your code Link to comment Share on other sites More sharing options...
Zzbrandon Posted October 24, 2012 Author Share Posted October 24, 2012 Dude the thing is though members is access 5 and I only want access 4 for command and others. Because their different accesses below 4 Link to comment Share on other sites More sharing options...
or3o Posted October 24, 2012 Share Posted October 24, 2012 wow so basically you gave members the highest access….just change it to if getplayeraccess(myindex) > 4 thenexit subend if Link to comment Share on other sites More sharing options...
Zzbrandon Posted October 24, 2012 Author Share Posted October 24, 2012 Doesnt the > mean less than 4 ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png) so people with a lower access of 4 will have admin panel too. Link to comment Share on other sites More sharing options...
Guest Posted October 24, 2012 Share Posted October 24, 2012 Okay both of you are misunderstanding the code.```If GetPlayerAccess(MyIndex) = ADMIN_CREATOR Then GoTo Continue```What this is saying is that if their access level is ADMIN_CREATOR then go to the Continue. The Continue in this case is an exit out line of code that prevents members who are NOT Admins from entering Admin commands. Link to comment Share on other sites More sharing options...
Zzbrandon Posted October 24, 2012 Author Share Posted October 24, 2012 So delete```GoTo Continue``` Link to comment Share on other sites More sharing options...
Guest Posted October 24, 2012 Share Posted October 24, 2012 No, change the = back to a <. Link to comment Share on other sites More sharing options...
Zzbrandon Posted October 24, 2012 Author Share Posted October 24, 2012 Yea but that is making it if Access is 4 or Greater than they can Access but I dont want that because Member's Access is 5. Link to comment Share on other sites More sharing options...
or3o Posted October 24, 2012 Share Posted October 24, 2012 lol soz sekaru i was just going off the top of my head, i hadnt actually looked to see what he was talking about. I should prolly pay more attention.and why the hell did you make members access 5? it just seems like a bad way of putting it. Link to comment Share on other sites More sharing options...
Guest Posted October 24, 2012 Share Posted October 24, 2012 > Yea but that is making it if Access is 4 or Greater than they can Access but I dont want that because Member's Access is 5.Admin = 5, Member = 0 (or 1, can't remember which).> lol soz sekaru i was just going off the top of my head, i hadnt actually looked to see what he was talking about. I should prolly pay more attention.> > and why the hell did you make members access 5? it just seems like a bad way of putting it.No worries man, I just remembered that because I made the same mistake when Robin changed the way commands were handled. Link to comment Share on other sites More sharing options...
Zzbrandon Posted October 24, 2012 Author Share Posted October 24, 2012 No but I customly added Member's to byte 5 lol 0 = regualr player ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png) Link to comment Share on other sites More sharing options...
Guest Posted October 24, 2012 Share Posted October 24, 2012 Okay so your regular players are 1, admins are 4 and "members" are 5? Link to comment Share on other sites More sharing options...
cheatking Posted October 24, 2012 Share Posted October 24, 2012 ```If GetPlayerAccess(MyIndex) <> ADMIN_CREATOR Then GoTo Continue```<> = not equal. Link to comment Share on other sites More sharing options...
Zzbrandon Posted October 24, 2012 Author Share Posted October 24, 2012 here it is:' Admin constantsPublic Const ADMIN_MONITOR As Byte = 1Public Const ADMIN_MAPPER As Byte = 2Public Const ADMIN_DEVELOPER As Byte = 3Public Const ADMIN_CREATOR As Byte = 4' Player constantsPublic Const Player_Member As Byte = 5 Link to comment Share on other sites More sharing options...
Zzbrandon Posted October 24, 2012 Author Share Posted October 24, 2012 so <> will make it So only admin_Creator will be able to use? Link to comment Share on other sites More sharing options...
cheatking Posted October 24, 2012 Share Posted October 24, 2012 Correct, if PlayerAccess is not equal to ADMIN_CREATOR then skip admin shiz Link to comment Share on other sites More sharing options...
Guest Posted October 24, 2012 Share Posted October 24, 2012 > ```> > If GetPlayerAccess(MyIndex) <> ADMIN_CREATOR Then GoTo Continue> > ```> <> = not equal.I was explaining his code to him.But yeah, like mrsean said just use "If GetPlayerAccess(MyIndex) <> ADMIN_CREATOR Then GoTo Continue". Link to comment Share on other sites More sharing options...
Zzbrandon Posted October 24, 2012 Author Share Posted October 24, 2012 Thanks guys lol already 2 pages I think I do ask to much I been here for 2 months and too many posts ![:D](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/biggrin.png)So <> is just like equal sign in vb6? Link to comment Share on other sites More sharing options...
cheatking Posted October 24, 2012 Share Posted October 24, 2012 for added fun:```' Admin constantsPublic Const ADMIN_MONITOR As Byte = 1Public Const ADMIN_MAPPER As Byte = 2Public Const ADMIN_DEVELOPER As Byte = 4Public Const ADMIN_CREATOR As Byte = 8' Player constantsPublic Const Player_Member As Byte = 16If NOT(GetPlayerAccess(MyIndex) AND (ADMIN_CREATOR Or ADMIN_DEVELOPER)) Then GoTo Continue```That will (hopefully) allow ADMIN_CREATOR or ADMIN_DEVELOPER to access it. You'll have to change all the checks though.Or suffix new ones with _NEW e.g. ADMIN_CREATOR_NEWSomething like that, My VB6 foo is rusty.[Reference](http://www.vb6.us/tutorials/how-utilize-binary-flags-your-program). Link to comment Share on other sites More sharing options...
cheatking Posted October 24, 2012 Share Posted October 24, 2012 > Thanks guys lol already 2 pages I think I do ask to much I been here for 2 months and too many posts ![:D](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/biggrin.png)> > So <> is just like equal sign in vb6?No, It's not equal to. If the player's access is not equal to admin_creator, go to the continue label. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now