NiceLoki Posted November 3, 2013 Author Share Posted November 3, 2013 Hí! In my game I put a little guide wich how up when u write "/guide" but, I want it to show up when the player level is under 10 I know this is de code:```If GetPlayerLevel ( Index ) <= 10 thenfrmGuide.Visible = TrueelseEnd if```But I don´t know where I have to put it so it turn into visible when the player log in the game…. Can anyone help me? xD thanks! :3 Link to comment Share on other sites More sharing options...
Growlith1223 Posted November 3, 2013 Share Posted November 3, 2013 look for modInput. there should be a sub there for all of the commands, go from there Link to comment Share on other sites More sharing options...
NiceLoki Posted November 3, 2013 Author Share Posted November 3, 2013 > look for modInput. there should be a sub there for all of the commands, go from thereNope, Read again…. I already put the comand "/guide", now I want the guide to show up when a player less than level 10 login... Link to comment Share on other sites More sharing options...
Growlith1223 Posted November 3, 2013 Share Posted November 3, 2013 HandleLoginOk i guess Link to comment Share on other sites More sharing options...
NiceLoki Posted November 3, 2013 Author Share Posted November 3, 2013 > HandleLoginOk i guessNope, it Start before than the game then.. :/ I want it to first show the frmMain and then the guide… Link to comment Share on other sites More sharing options...
DarkDino Posted November 3, 2013 Share Posted November 3, 2013 Go to sub GameLoop, below this line : If Options.Debug = 1 Then On Error GoTo errorhandler, put this:```If GetPlayerLevel ( Index ) <= 10 thenfrmGuide.Visible = TruefrmGuide.SetFocusEnd if```:3! Link to comment Share on other sites More sharing options...
NiceLoki Posted November 3, 2013 Author Share Posted November 3, 2013 Works! Thanks!!!!! *-* U´re my hero! > Go to sub GameLoop, below this line : If Options.Debug = 1 Then On Error GoTo errorhandler, put this:> > ```> If GetPlayerLevel ( Index ) <= 10 then> frmGuide.Visible = True> frmGuide.SetFocus> End if> > ```> :3! Link to comment Share on other sites More sharing options...
Matt Posted November 3, 2013 Share Posted November 3, 2013 Find the sub which handles the showing of frmMain. That's where you put your code. Please note that this sub has to be after the player data is received, otherwise it will always appear.Furthermore, you can optimize your code to something like this```if GetPlayerLevel(index) <= 10 then frmGuide.visible = true```or this.```if GetPlayerLevel(index) <= 10 thenfrmguide.visible = trueend if ```You should only put there else if you actually put there a line for the program to run, otherwise it's just a waste. 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