Author Topic: Map Downloads from Servers  (Read 2951 times)

0 Members and 1 Guest are viewing this topic.

Offline Frenchie

  • Camper
  • ***
  • Posts: 358
  • SoldatHQ
Map Downloads from Servers
« on: February 15, 2007, 06:28:00 am »
Hey,
Just wondering if anyone knows how to connect to a server and download it's map.
Or has that information not been released and only EnEsCe knows. ( I rememeber he made an app which could do just that)
Soldat Lobby Avec Players -New Release! - Updated AGAIN!


Offline mar77a

  • Global Moderator
  • Veteran
  • *****
  • Posts: 1295
  • mad
    • random stuffs
Re: Map Downloads from Servers
« Reply #1 on: February 15, 2007, 08:01:55 am »
You connect to the server port + 10 (TCP/IP), then send the map filename, for example, maps/ctf_Laos.PMS. You'll get STARTFILES\r\n all the data here and ENDFILES at the end.

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: Map Downloads from Servers
« Reply #2 on: February 15, 2007, 08:14:40 am »
The first integer after STARTFILES is the size of the file.

Offline Frenchie

  • Camper
  • ***
  • Posts: 358
  • SoldatHQ
Re: Map Downloads from Servers
« Reply #3 on: February 15, 2007, 04:21:39 pm »
Thanks for replies.

You'll get STARTFILES\r\n all the data here and ENDFILES at the end.

Does that include sceneries and textures as well?
Soldat Lobby Avec Players -New Release! - Updated AGAIN!


Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: Map Downloads from Servers
« Reply #4 on: February 15, 2007, 07:17:07 pm »
No, its only whatever file you request.

Offline Frenchie

  • Camper
  • ***
  • Posts: 358
  • SoldatHQ
Re: Map Downloads from Servers
« Reply #5 on: February 16, 2007, 04:12:10 am »
Could anyone provide a php snippet to get the filesize of the file? (int):)
After that I should be set.
Soldat Lobby Avec Players -New Release! - Updated AGAIN!


Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: Map Downloads from Servers
« Reply #6 on: February 16, 2007, 06:58:27 am »
$arr = unpack("V", $data,4); //$data is the packet buffer.

Don't know if it will work, I just got that from the PHP manual to get an integer.

Offline Frenchie

  • Camper
  • ***
  • Posts: 358
  • SoldatHQ
Re: Map Downloads from Servers
« Reply #7 on: February 16, 2007, 07:18:08 am »
$arr = unpack("V", $data,4); //$data is the packet buffer.

Don't know if it will work, I just got that from the PHP manual to get an integer.
Didn't work.
nvm I got it working another way. ;D
Soldat Lobby Avec Players -New Release! - Updated AGAIN!