Author Topic: PMS Info getter  (Read 1037 times)

0 Members and 1 Guest are viewing this topic.

Offline iDante

  • Veteran
  • *****
  • Posts: 1967
PMS Info getter
« on: November 01, 2008, 01:39:05 am »
Might be done already... meh.
Yes getter is a word!
Script Name: PMS Info Getter
Script Description Load a PMS map file and returns it's options.
Author: iDante
Compile Test: Passed
Core Version: 2.6.3
Hosted by: Soldat Central - http://soldatcentral.com/

Full Description:
Gets options from a PMS map file:
Code: [Select]
NameLen : byte;
Name : string; //Description of the Map
TexLen : byte;
Texture : string; //Texture used
ColorTop: tColor; //Top background gradient color
ColorLow: tColor; //Bottom background gradient color
Jets : integer; //Jet Amount
Nades : integer; //# of nadekits
Medkits : integer; //# of medkits
Weather : string; //Weather type
StepType: string; //Step type
RandID : integer; //Useless
+ Version and Polygon count
If anyone wants me to continue this then just say so. I don't really want to figure out any more though.

To use just call LoadMap(MapName) and it will return the tMap. MapName includes .PMS ('ctf_Ash.PMS') for instance.
I just made this because I was bored, and it seems to work with almost all maps. If anyone finds a use for it then tell me and I'll be happy.



(Size 2.07 KB)
- http://soldatcentral.com/index.php?page=script&f=67 -


** Script hosted by Soldat Central! Please visit the author's script page and Rate this script **
« Last Edit: November 01, 2008, 05:05:54 am by iDante »

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: PMS Info getter
« Reply #1 on: November 01, 2008, 02:22:27 am »
Nice :D
Use:
1.Settings depending on map.
2.Command for players(/mapinfo).

[edit]
#2 is for fun

Offline Norbo

  • Camper
  • ***
  • Posts: 338
Re: PMS Info getter
« Reply #2 on: November 01, 2008, 04:55:45 am »
holypoo, that's quite advanced stuff there
nice one iDante

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: PMS Info getter
« Reply #3 on: November 02, 2008, 09:35:36 am »
Nice. Haven't tested this but looks most definitely sweet.
Just imagine if you parsed a whole PMS file, along with polygon information, you could have per-polygon stuff, but I guess that could be a problem when it comes to mass amounts of polygons and the speed of the server.

Offline iDante

  • Veteran
  • *****
  • Posts: 1967
Re: PMS Info getter
« Reply #4 on: November 02, 2008, 04:52:43 pm »
Nice. Haven't tested this but looks most definitely sweet.
Just imagine if you parsed a whole PMS file, along with polygon information, you could have per-polygon stuff, but I guess that could be a problem when it comes to mass amounts of polygons and the speed of the server.
Thats not so much the problem as my own laziness is.

If someone were to answer me this question, then I could continue:
How to turn 4 bytes into a float?