![]() |
[Feature]Admin Panel - Printable Version +- Mirage Source (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: Source Code Development (https://mirage-engine.uk/forums/forumdisplay.php?fid=51) +----- Forum: Mirage Source 4 (Visual Basic 6) (https://mirage-engine.uk/forums/forumdisplay.php?fid=44) +------ Forum: Tutorials (https://mirage-engine.uk/forums/forumdisplay.php?fid=13) +------ Thread: [Feature]Admin Panel (/showthread.php?tid=2102) |
[Feature]Admin Panel - Doomy - 16-09-2008 Some of this i scripted by my self others was from help. And some i looked at other sources and got ideas and some i just ripped. Hope you enjoy Components Microsoft Tagged Dialog Control Check it then Create A Form Called frmAdmin Create A SSTab with these properties Tabs - 4, Tabs Per Row - 4 Then Name Them. I named mine Admin, Map, Sprite, Develop Admin First Create A Label Called btnBan This is a ban button Put this inside Code: If GetPlayerAccess(MyIndex) >= ADMIN_CREATOR Then Create a button called btnWarpMeTo This is Warp To Me Put This Inside Code: If GetPlayerAccess(MyIndex) >= ADMIN_MAPPER Then Create a button called btnKick This is Kick Put This Inside Code: If GetPlayerAccess(MyIndex) >= ADMIN_MONITER Then Create a Button called btnSetAccess This is Set Access Put This inside Code: If GetPlayerAccess(MyIndex) >= ADMIN_CREATOR Then Create a label called Access Level Then create a txtbox called txtAccess Create a label called Player Name Then Create a txtbox called txtPlayerAdmin Now on to Map Tab Create a button called btnLOC This is Location put this inside Code: If GetPlayerAccess(MyIndex) >= ADMIN_MAPPER Then Create a button called btnRespawn This is Respawn put this inside Code: If GetPlayerAccess(MyIndex) >= ADMIN_MAPPER Then Create a button called btnWarpto This is Warp To put this inside Code: If GetPlayerAccess(MyIndex) >= ADMIN_MAPPER Then Create a label called Map Number then create a txtbox called txtMap Now onto sprite tab create a button called btnSprite This is Set Sprite then put this inside it Code: If GetPlayerAccess(MyIndex) >= ADMIN_MAPPER Then create a button called btnPlayerSprite This is Set Player Sprite then put this inside it Code: If GetPlayerAccess(MyIndex) >= ADMIN_MAPPER Then create a label called player name then create a txtbox called txtPlayer create a label called Sprite number then create a txtbox called txtSprite now on to the develop tab create a button called btnMapeditor This is Map Editor then put this inside Code: If GetPlayerAccess(MyIndex) >= ADMIN_MAPPER Then create a button called btneditspell This is Spell Editor then put this inside Code: If GetPlayerAccess(MyIndex) >= ADMIN_DEVELOPER Then create a button called btnedititem This is Item Editor then put this inside Code: If GetPlayerAccess(MyIndex) >= ADMIN_DEVELOPER Then create a button called btnEditShops This is Shop Editor then put this inside Code: If GetPlayerAccess(MyIndex) >= ADMIN_DEVELOPER Then Create a button called btnEditNPC This is NPC Editor then put this inside Code: If GetPlayerAccess(MyIndex) >= ADMIN_DEVELOPER Then To put this as a hot key for f1 go to KeyDown in frmMirage then put this inside Code: If KeyCode = vbKeyF1 then Hope you guys like Tell me what you think plz Admin form XD http://www.mediafire.com/?mdim4mozmom Re: Admin Panel - DarkC - 16-09-2008 Nice job. I'm working on my own right now. Gonna use this as reference though. =D Re: Admin Panel - Doomy - 16-09-2008 thanks and i created cause skillzalot wanted too know how to do it so i just made one so everyone dont go around asking Re: Admin Panel - Nean - 16-09-2008 I'm also working on one at the moment. So far, I have scripted: WarpMeTo WarpToMe WarpTo Kill Ban Kick I'm working on others though. =D. Thanks for the tut, this will come useful as a reference. Re: Admin Panel - Robin - 16-09-2008 You haven't scripted anything ![]() Scripting is what you do in Elysium's sadscript files. This is programming. You're a real man now. Re: Admin Panel - skillzalot - 16-09-2008 Following this tut I made it and im wondering what do i add to make it if I click f1 and im an admin it brings up this panel Re: Admin Panel - Robin - 16-09-2008 Open the 'KeyDown' subroutine in frmMirage then add this: Code: If KeyCode = vbKeyF1 then Re: Admin Panel - Doomy - 16-09-2008 thanks robin i forgot to add that part ill put that in Re: Admin Panel - Mattyw - 16-09-2008 doomteam1 Wrote:thanks robin i forgot to add that part ill put that in I'd make it require an access also. So people don't just find out about it randomly.(Even though the buttons require access) EDIT: Code: If KeyCode = vbKeyF1 then Untested. SHOULD work? Re: Admin Panel - Nean - 18-09-2008 It should work, but for MS4, you have to put the name of the form before the button. SO it would be like: Code: frmadminpanel.btnWarpMeTo.Enabled = False Re: Admin Panel - Nean - 19-09-2008 Sorry for the double post, but I found a bug. For the map editor button, you have to add: Code: frmMirage.Width = 14175 Re: Admin Panel - Doomy - 19-09-2008 i forgot about that i removed all the width things cause i resized my window and didnt want to put it in so i just made my mapeditor a picbox and placed over screen Re: Admin Panel - Nean - 19-09-2008 doomteam1 Wrote:i forgot about that Nevertheless, others haven't. So I'd suggest adding that to the tut somewhere. Thanks. Re: Admin Panel - Doomy - 20-09-2008 where would i add it cause idk because i dont have it Re: Admin Panel - Nean - 20-09-2008 Add it under the MapEditor Button. Inside the button, I mean. Re: Admin Panel - Doomy - 20-09-2008 There i fixed it thx Re: Admin Panel - Doomy - 20-09-2008 I added my Admin.frm for those who want it Re: Admin Panel - timster0 - 18-01-2009 ummm, i get an error with the BTNban, it highlights ".Text" and says "method or data member not found" but Ive looked it over and it should work fine. Re: Admin Panel - Rian - 18-01-2009 Probably because a button doesn't have a Text property. Well, it does, but it's called Caption |