Alerd Posted March 22, 2013 Author Share Posted March 22, 2013 Add this into modGameLogic:```Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long```Add this on top of Sub Main():```Call MultiClient```Add this sub into modGameLogic:```Sub MultiClient()Dim GameClient As LongDim OldAppName As StringOldAppName = App.TitleApp.Title = ""GameClient = FindWindow(vbNullString, OldAppName)App.Title = OldAppNameIf App.PrevInstance = True Or GameClient <> 0 ThenCall MsgBox("Client already running!", vbExclamation, "Error")EndEnd IfEnd Sub``` Link to comment Share on other sites More sharing options...
DMF Posted March 22, 2013 Share Posted March 22, 2013 intresting,but it would have draw backs in the users view. some people enjoy loging more then 1 char.xDnice code tho some one may use it. ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png) Link to comment Share on other sites More sharing options...
abhi2011 Posted March 23, 2013 Share Posted March 23, 2013 app.PrevInstance and Unload me or End Link to comment Share on other sites More sharing options...
Abyssrayel Posted March 23, 2013 Share Posted March 23, 2013 EDIT:```Call MultiClient```on top of Sub Main(). You add it just under/ in it.(as that's sort of confusing)EDIT: I get the error saying my client is already running even if it isn't.Could some one explain this tutorial better?I've tried a few different things to make it work and I can't wrap my head around it I guess.Has any one gotten it to work? Link to comment Share on other sites More sharing options...
abhi2011 Posted March 24, 2013 Share Posted March 24, 2013 Add the call MutliClient in the sub Main() at the top. Also I am not sure but using the method provided by Microsoft rather than using API calls would be better. Link to comment Share on other sites More sharing options...
Punika Posted June 3, 2013 Share Posted June 3, 2013 Works for me fine. Thank you ! These little things are important for a good game !EDIT:> EDIT: I get the error saying my client is already running even if it isn't.Copy&Paste as stated above, compile, close VB Project.As long as your VB Project is opened it will tell you that you already have one client opened ![;)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/wink.png) 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