LucianL. Posted May 13, 2011 Author Share Posted May 13, 2011 I'm trying to make the client have 2 lang, but server send the message for the lang that joined the last one. Can you help me?client side:**frmlang**:```Private Sub Option1_Click()lang = 1Call Mainfrmlang.Visible = FalseEnd SubPrivate Sub Option2_Click()lang = 2Call Mainfrmlang.Visible = FalseEnd Sub```**modClientTCP**, on **Public Sub SendLogin**, under **Buffer.WriteLong App.Revision**:```Buffer.WriteLong lang```**modConstants**:```Public Limba As Byte```server side:**modConstants**:```Public Const Limba As Byte = 1Public en As Byte```**modHandleData**, on **HandleLogin**:```If Buffer.ReadLong = Limba Then en = TrueElse en = FalseEnd If```modPlayer, on joingame: - this one its working becouse server set the languange on every join``` If en = True Then Call GlobalMsg("English", JoinLeftColor) Else Call GlobalMsg("y language", JoinLeftColor) End If```**modCombat**, on **CanPlayerAttackPlayer**: - ok so here if an en client join the game the message will be language 1 for all the other clients, then if a non en client join all the clients get the message with language 2\. any hints ?```If Not Map(GetPlayerMap(attacker)).Moral = MAP_MORAL_NONE Then If GetPlayerPK(victim) = NO Then If en = True Then Call PlayerMsg(attacker, "Language 1!", BrightRed) Else Call PlayerMsg(attacker, "Language 2!", BrightRed) End If```Update:The message language 1 and 2 will show when you attack another player in a safe zone. Link to comment Share on other sites More sharing options...
Displaced Posted May 13, 2011 Share Posted May 13, 2011 Export this to a file, generate a new struct, give the player the id of the structuseLanguage(LangNumber).Text(TextNumber)best way… 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