I have a little problem with writing network connection in game.
I just want to do sth like this :
Client send name,health,x,y
Server recv this and send to other clients
Now i have problem because i can send some informations to the server. Server send this informations to clients and clients dont know how to read this informations and attribute this informations for variables Player.name etc.
I have sth like this :
Record:
- Code: Select all
TPlayerr=record
health : string[5];
name : string[20];
x : string[5];
y : string[5];
end;
Client Send informations to the server:
- Code: Select all
Player.health:='100';
Player1.name:='PlayerName';
Player1.x:='10';
Player1..y:='15';
ClientSocket1.Socket.Sendtext(Player1.name+#13#10+Player1.health+#13#10+Player1.x+#13#10+Player1.y+#13#10);
Now how client must recived this informations from server and get variabels name,health,x,y. Some one know how to do this ?

