Jump to content

Packets communication


Recommended Posts

  • Former Staff

hello guys i got real problem ...

 

i tried client-game / game-client with four packets

none of them work :/

 

no errors .. no logs ... no anything  

 

i tried to send packets by buttons from the client to game .... sending ID of player to the client  but nothing works

 

i use for binary

 

and mainline for core

 

## Client-Game works fine :)  just the game-client

Edited by flygun
Link to comment
Share on other sites

  • 1 year later...
On 1/14/2015 at 1:19 AM, flygun said:

how can i change TEXT on button after clicking on it ??

like : after clicking on summon i want it to be unsummon :/

Class Button have arguments to SetText for button, so this is:

	self.btnHorse = self.GetChild("buttonHorse")
	self.btnHorse.SetEvent(self.RecvSummon)
	self.used = 0
		
	def AppendTextLine(self, token):
		if token == 1:
			self.btnHorse.SetText("Summon")
		else:
			self.btnHorse.SetText("UnSummon")			
		
	def RecvSummon(self):
		if self.used == 0:
			net.SendPacketHorseSummon()
			self.AppendTextLine(2)
			self.used = 1

		elif self.used == 1:
			net.SendPacketHorseUnSummon()
			self.AppendTextLine(1)
			self.used = 0
  • Love 1
Link to comment
Share on other sites

  • Former Staff
19 minutes ago, Kirosachi said:

Class Button have arguments to SetText for button, so this is:


	self.btnHorse = self.GetChild("buttonHorse")
	self.btnHorse.SetEvent(self.RecvSummon)
	self.used = 0
		
	def AppendTextLine(self, token):
		if token == 1:
			self.btnHorse.SetText("Summon")
		else:
			self.btnHorse.SetText("UnSummon")			
		
	def RecvSummon(self):
		if self.used == 0:
			net.SendPacketHorseSummon()
			self.AppendTextLine(2)
			self.used = 1

		elif self.used == 1:
			net.SendPacketHorseUnSummon()
			self.AppendTextLine(1)
			self.used = 0

i was studying programing but now i now how to write codes ;) thanks anyway

  • Love 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.