Slasheree Posted August 28, 2012 Author Share Posted August 28, 2012 I noticed there was a function to get the player name by his index but how can I retrieve a player's index by it's name ? Link to comment Share on other sites More sharing options...
Joyce Posted August 28, 2012 Share Posted August 28, 2012 Not sure if it exists by default, too tired to care and check Sooo..```Public Function GetPlayerIndexByName(Byval Name as String) as LongDim i as long if Name = vbnullstring then exit function for i = 1 to Player_HighIndex If (Lower$(Player(i).Name) = Lower$(Name) then GetPlayerIndexByName = i Exit Function End If nextEnd Function```Should return 0 if the player doesn't exist.. And the number of the player if it does. Not really tested, just written off of the top of my head. Link to comment Share on other sites More sharing options...
Slasheree Posted August 28, 2012 Author Share Posted August 28, 2012 Compile Error: Sub or Function not defined.It highlight the 'Lower$' what is it meant to do ? Link to comment Share on other sites More sharing options...
Growlith1223 Posted August 28, 2012 Share Posted August 28, 2012 change Lower$() to LBound() Link to comment Share on other sites More sharing options...
Slasheree Posted August 28, 2012 Author Share Posted August 28, 2012 > change Lower$() to LBound()Compile Error: Expected Array Link to comment Share on other sites More sharing options...
Growlith1223 Posted August 28, 2012 Share Posted August 28, 2012 …i only told you to replace the word.... Link to comment Share on other sites More sharing options...
Slasheree Posted August 28, 2012 Author Share Posted August 28, 2012 that's what I did change 'Lower$' for 'LBound' Link to comment Share on other sites More sharing options...
Growlith1223 Posted August 28, 2012 Share Posted August 28, 2012 woops sorry lol i meant to say LCase$() Link to comment Share on other sites More sharing options...
Slasheree Posted August 28, 2012 Author Share Posted August 28, 2012 this is supposed to be server-side right ? ( still didn't work with LCase$ but I don't think that's the problem ) Link to comment Share on other sites More sharing options...
Growlith1223 Posted August 29, 2012 Share Posted August 29, 2012 dumbass!!! it's not server-side….if ur wanting it server side then just use fukin Trim$()if you can't seem to use Trim$() then ur hopeless Link to comment Share on other sites More sharing options...
Exception Posted August 29, 2012 Share Posted August 29, 2012 Say, guys, according to Zero, I don't know my way around Eclipse, and I can't program!But, contrary to his suggestions, we could actually use the function **FindPlayer**!It's usage is as follows: FindPlayer("Name of the player here.")It'll return the index of the player, provided they're online/it's correct, and 0 otherwise. It's already in default EO. Link to comment Share on other sites More sharing options...
Slasheree Posted August 29, 2012 Author Share Posted August 29, 2012 How can I 'refresh' the character in-game ? Link to comment Share on other sites More sharing options...
abhi2011 Posted August 29, 2012 Share Posted August 29, 2012 Refresh meaning? Link to comment Share on other sites More sharing options...
Joyce Posted August 29, 2012 Share Posted August 29, 2012 > Say, guys, according to Zero, I don't know my way around Eclipse, and I can't program!> > But, contrary to his suggestions, we could actually use the function **FindPlayer**!> > It's usage is as follows: FindPlayer("Name of the player here.")> > It'll return the index of the player, provided they're online/it's correct, and 0 otherwise. It's already in default EO.Ah, so there was one. ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png) I was too tired to care and check. As for the Lower$() thing, I was confusing another BASIC language with VB6 xD Oh well.And Zero, Just because YOU make a ton of mistakes here and act like a turd doesn't mean there's a need to curse at others. Go and slap yourself in a corner. Also, Trim$() does not do what I wanted to do with it, that being to make everything lowercase, LBound doesn't do this either.. So yeap, please stop answering if all you can do is give completely useless advice if you're unable to admit a mistake. I'm getting tired of your so called 'help'. Link to comment Share on other sites More sharing options...
Slasheree Posted August 29, 2012 Author Share Posted August 29, 2012 what I mean by refresh is like, if I change the sprite, make it so everyone can see it changing in that moment. Link to comment Share on other sites More sharing options...
tslusny Posted August 29, 2012 Share Posted August 29, 2012 You must send packet from server, just call sendplayerdata(index) (of course server side) Link to comment Share on other sites More sharing options...
Joyce Posted August 30, 2012 Share Posted August 30, 2012 It's better to write a new one that sends ONLY the sprite though. Sending the player's FULL data to update a few values is a waste of traffic. 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