Mirage Source http://miragesource.net/forums/ |
|
Jail Command Difficulty: 1/5 C&P (Now works with latest ver) http://miragesource.net/forums/viewtopic.php?f=183&t=4354 |
Page 1 of 57 |
Author: | Nean [ Thu Sep 18, 2008 7:26 pm ] |
Post subject: | Jail Command Difficulty: 1/5 C&P (Now works with latest ver) |
So this is just an edit of DarkC's Kill command. Even still, I find it useful, so I decided to make it for MS4's newest version. Here goes. Client Side: Find Code: CGetClasses = 1 And under it add: Code: CJailPlayer Now find: Code: ' // Mapper Admin Commands // And above it add: Code: ' Jail player Case "/jail" If GetPlayerAccess(MyIndex) >= ADMIN_CREATOR Then If UBound(Command) >= 1 Then SendData CJailPlayer & SEP_CHAR & Command(1) & END_CHAR End If End If Server Side: Find: Code: CGetClasses = 1 Under it add: Code: CJailPlayer Now find: Code: ' :: Quit game packet :: Under it add: Code: ' :::::::::::::::::::::::: ' :: Jail Player Packet :: ' :::::::::::::::::::::::: Case CJailPlayer ' Prevent hacking... If GetPlayerAccess(Index) < ADMIN_CREATOR Then Call HackingAttempt(Index, "Admin Cloning") Exit Sub End If n = FindPlayer(Parse(1)) If n <> Index Then If n > 0 Then 'Sends messages out Call PlayerMsg(n, "You have been jailed by an admin.", BrightRed) Call GlobalMsg(GetPlayerName(n) & " has been jailed by an admin.", BrightRed) 'Warp to Jail map (Change the coordinates to fit your needs) Call PlayerWarp(n, 5, 8, 8) Else Call PlayerMsg(Index, "Player is not online.", White) End If Else Call PlayerMsg(Index, "You cannot jail yourself!", White) End If Exit Sub And it's done! Tell me how I did, hope you like it. |
Author: | Doomy [ Thu Sep 18, 2008 9:48 pm ] |
Post subject: | Re: Jail Command Difficulty: 1/5 C&P |
nice very nice |
Author: | one [ Thu Sep 18, 2008 9:53 pm ] |
Post subject: | Re: Jail Command Difficulty: 1/5 C&P |
ont forget to change Code: 'Warp to starting map Call PlayerWarp(n, 5, 8, 8) to where your jail is and better commend it as 'Warp to Jail |
Author: | Nean [ Thu Sep 18, 2008 9:55 pm ] |
Post subject: | Re: Jail Command Difficulty: 1/5 C&P |
one wrote: ont forget to change Code: 'Warp to starting map Call PlayerWarp(n, 5, 8, 8) to where your jail is and better commend it as 'Warp to Jail Thanks. I changed the code, to make it easier to understand. Actually just the comment. But like I said, this is just an edit of DarkC's code. |
Author: | skillzalot [ Mon Sep 22, 2008 10:22 am ] |
Post subject: | Re: Jail Command Difficulty: 1/5 C&P |
First off when I just copy and paste the packet it highlights CJailPlayer() and says only comments may be placed after subs and I have it the way you said to. So then I tried turning it into a sub and it worked until If GetPlayerAccess(Index) It highlights index and said variable not defined. And yes I am trying so Robin and others dont freak out I tried to fix it and could not solve it can you give me some insight on this please. Code: ' ::::::::::::::::::::::
' :: Quit game packet :: ' :::::::::::::::::::::: Sub HandleQuit(ByVal Index As Long) Call CloseSocket(Index) End Sub ' :::::::::::::::::::::::: ' :: Jail Player Packet :: ' :::::::::::::::::::::::: Case CJailPlayer() ' Prevent hacking... If GetPlayerAccess(Index) < ADMIN_CREATOR Then Call HackingAttempt(Index, "Admin Cloning") Exit Sub End If n = FindPlayer(Parse(1)) If n <> Index Then If n > 0 Then 'Sends messages out Call PlayerMsg(n, "You have been jailed by an admin.", BrightRed) Call GlobalMsg(GetPlayerName(n) & " has been jailed by an admin.", BrightRed) 'Warp to Jail map (Change the coordinates to fit your needs) Call PlayerWarp(n, 5, 8, 8) Else Call PlayerMsg(Index, "Player is not online.", White) End If Else Call PlayerMsg(Index, "You cannot jail yourself!", White) End If Exit Sub |
Author: | Kousaten [ Mon Sep 22, 2008 2:08 pm ] |
Post subject: | Re: Jail Command Difficulty: 1/5 C&P |
Are you using MS4?... I don't have the source in front of me so I can't confirm, but this was made to work with the latest MS4. MS 3.0.3 was built differently, to a point where copypasta alone won't work with it. |
Author: | Lea [ Mon Sep 22, 2008 2:48 pm ] |
Post subject: | Re: Jail Command Difficulty: 1/5 C&P |
this tutorial will not work with the latest MSE4 release. Anyone want to update it? |
Author: | Nean [ Mon Sep 22, 2008 5:51 pm ] |
Post subject: | Re: Jail Command Difficulty: 1/5 C&P |
Lea wrote: this tutorial will not work with the latest MSE4 release. Anyone want to update it? It won't work with the newest release? What changed? |
Author: | Jacob [ Mon Sep 22, 2008 5:53 pm ] |
Post subject: | Re: Jail Command Difficulty: 1/5 C&P |
Download the newest version and test it out. We changed how packets are handled. They are separated into their own subs. |
Author: | Nean [ Mon Sep 22, 2008 6:09 pm ] |
Post subject: | Re: Jail Command Difficulty: 1/5 C&P |
Dugor wrote: Download the newest version and test it out. We changed how packets are handled. They are separated into their own subs. Hmm... I see. I haven't been using the latest version, because I don't wanna reprogram all that I have added. This is going to be bothersome. I'll see if I can remake it for the newest version. T_T; |
Author: | Rian [ Mon Sep 22, 2008 6:28 pm ] |
Post subject: | Re: Jail Command Difficulty: 1/5 C&P |
You should be using the newest version. It's only gonna get better and better. |
Author: | Nean [ Mon Sep 22, 2008 6:34 pm ] |
Post subject: | Re: Jail Command Difficulty: 1/5 C&P |
Sonire wrote: You should be using the newest version. It's only gonna get better and better. True, but what about all the programming I put into the other? I know it's not much, but heres my changelog: Code: Things I've changed: (Sep 19th, 2008) Admin Panel (F1) Member Of the Month Who's Online that Have PK's. Right click set access, server menu. Kill and Jail commmands. @ = Auction Chat (Sep 20th, 2008) Swear Filter Draw NPC Names Fixed Nullbanlist error Fixed Moniter spelling error, with Monitor. Made it so names can't go off screen. (Sep 21st, 2008) Changed /warpto, to /warp Added /advancedinfo feature Toggle Shift for run. Fixed /setaccess bug Programmed in /setlevel feature It'd be a major pain to reprogram that in.... Then again, it'd improve my skills. Learning how to program it in different ways. I don't know... We'll see. |
Author: | Nean [ Mon Sep 22, 2008 6:47 pm ] |
Post subject: | Re: Jail Command Difficulty: 1/5 C&P (Now works with latest ver) |
Alright, I fixed it so it works with the newest version. All you need to change, is the server side of things. Add this Code: ' :::::::::::::::::::::::: ' :: Jail Player Packet :: ' :::::::::::::::::::::::: Sub HandleJailPlayer(ByVal Index As Long, ByRef Parse() As String) Dim N ' Prevent hacking... If GetPlayerAccess(Index) < ADMIN_CREATOR Then Call HackingAttempt(Index, "Admin Cloning") Exit Sub End If N = FindPlayer(Parse(1)) If N <> Index Then If N > 0 Then 'Sends messages out Call PlayerMsg(N, "You have been jailed by an admin.", BrightRed) Call GlobalMsg(GetPlayerName(N) & " has been jailed by an admin.", BrightRed) 'Warp to Jail map (Change the coordinates to fit your needs) Call PlayerWarp(N, 5, 8, 8) Else Call PlayerMsg(Index, "Player is not online.", White) End If Else Call PlayerMsg(Index, "You cannot jail yourself!", White) End If End Sub And find: Code: Handlekickplayer index, parse And under that add:Code: Case CJailPlayer
HandleJailPlayer Index, Parse |
Author: | Ciao [ Tue Aug 11, 2009 6:22 am ] |
Post subject: | Re: Jail Command Difficulty: 1/5 C&P (Now works with latest ver) |
Help me please ? :\ |
Author: | Nean [ Tue Aug 11, 2009 5:03 pm ] |
Post subject: | Re: Jail Command Difficulty: 1/5 C&P (Now works with latest ver) |
Doesn't work with the newest version, I might reprogram it though. |
Author: | Ciao [ Tue Aug 11, 2009 8:52 pm ] |
Post subject: | Re: Jail Command Difficulty: 1/5 C&P (Now works with latest ver) |
Alright, thanks for the quick reply , and thanks for letting me know man. Im pretty much new and attempting to learn everything at a slow pace so that I can understand things better but im confused with the tutorial section because there's some tutorials that work and some that don't. |
Author: | wanai [ Sun Dec 26, 2021 6:08 pm ] |
Post subject: | Re: Jail Command Difficulty: 1/5 C&P (Now works with latest |
Vrin |
Author: | wanai [ Sun Dec 26, 2021 6:09 pm ] |
Post subject: | Re: Jail Command Difficulty: 1/5 C&P (Now works with latest |
37.6 |
Author: | wanai [ Sun Dec 26, 2021 6:10 pm ] |
Post subject: | Re: Jail Command Difficulty: 1/5 C&P (Now works with latest |
Bett |
Author: | wanai [ Sun Dec 26, 2021 6:11 pm ] |
Post subject: | Re: Jail Command Difficulty: 1/5 C&P (Now works with latest |
Bett |
Author: | wanai [ Sun Dec 26, 2021 6:12 pm ] |
Post subject: | Re: Jail Command Difficulty: 1/5 C&P (Now works with latest |
Rael |
Author: | wanai [ Sun Dec 26, 2021 6:13 pm ] |
Post subject: | Re: Jail Command Difficulty: 1/5 C&P (Now works with latest |
Colu |
Author: | wanai [ Sun Dec 26, 2021 6:15 pm ] |
Post subject: | Re: Jail Command Difficulty: 1/5 C&P (Now works with latest |
Bana |
Author: | wanai [ Sun Dec 26, 2021 6:16 pm ] |
Post subject: | Re: Jail Command Difficulty: 1/5 C&P (Now works with latest |
Henr |
Page 1 of 57 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |