Emy Posted March 15, 2012 Author Share Posted March 15, 2012 Hello, I need some help with showing other players exp. I've tried with GetPlayerExp(Index) and it doesn't work (obviously), do I have to add something or is there an easy way?Thanks Link to comment Share on other sites More sharing options...
erkro1 Posted March 16, 2012 Share Posted March 16, 2012 @Couture:> Hello, I need some help with showing other players exp. I've tried with GetPlayerExp(Index) and it doesn't work (obviously), do I have to add something or is there an easy way?> > ThanksIt doesn't work client-side, you'll have to use MyIndex for that, although this will only display the players EXP, not from others, if you want to archieve that you'll have to make a new packet or find the packet which sends EXP from another player (don't know or it exists) Link to comment Share on other sites More sharing options...
Emy Posted March 17, 2012 Author Share Posted March 17, 2012 Well, I searched for it and couldn't find it, so I guess I'll have to add it then. Thanks for your answer though. If someone could give me a hint or anything, that would be lovely. Link to comment Share on other sites More sharing options...
erkro1 Posted March 18, 2012 Share Posted March 18, 2012 If you're working server side than GetPlayerExp(index) should work, but can you give us the whole code? Link to comment Share on other sites More sharing options...
Emy Posted March 18, 2012 Author Share Posted March 18, 2012 Well I'm basically just using the code for your own exp bar, and I thought it would work if I changed GetPlayerLevel(MyIndex) to GetPlayerLevel(Index) and GetPlayerExp(MyIndex) to GetPlayerExp(Index) but the exp stays at 0 when hovering over other players so I guess I need to add the GetPlayerExp packet that sends the other players exp client side.I don't think it works just adding the packet from server side right? I'm a rookie so sorry if it sounds stupid, I appreciate your help! Link to comment Share on other sites More sharing options...
erkro1 Posted March 19, 2012 Share Posted March 19, 2012 You'll have to make 2 packets, one for client to server with exp request, one with server to client with exp response. Link to comment Share on other sites More sharing options...
Emy Posted March 26, 2012 Author Share Posted March 26, 2012 So I got GetPlayerExp(Index) to work, but the problem is others can't see the exp change when they're in the same map, they have to reenter to see the current amount of exp the other players have. What I did was just adding the packet client side and to the PlayerData, any help? Link to comment Share on other sites More sharing options...
Growlith1223 Posted March 26, 2012 Share Posted March 26, 2012 call the Sub you just made in Sub GameLoop i think Link to comment Share on other sites More sharing options...
Ruins of Hell Posted March 26, 2012 Share Posted March 26, 2012 @Grim:> call the Sub you just made in Sub GameLoop i thinkWell, that's one way to do it. A better way would be to send the packet to the map whenever a player gains EXP.Create a sub that sends the EXP to the whole map and run it whenever the player gains EXP (which is how SendEXP is used; or you could modify SendEXP to send it to everyone on the map). Link to comment Share on other sites More sharing options...
Emy Posted March 27, 2012 Author Share Posted March 27, 2012 Thanks for your help, so I tried this:```Sub SendEXP(ByVal index As Long, ByVal mapNum As Long)Dim Buffer As clsBuffer Set Buffer = New clsBuffer Buffer.WriteLong SPlayerEXP Buffer.WriteLong GetPlayerExp(index) Buffer.WriteLong GetPlayerNextLevel(index) SendDataToMap mapNum, Buffer.ToArray() Set Buffer = NothingEnd Sub```It didn't work.. What am I doing wrong? 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