User panel stuff on forum
  21 posts on 1 page  1
Advanced Configuration
2012-03-13, 13:56
Member
186 posts

Registered:
Jan 2008
So i made a script to check the map and assign a hud depending on map but i got a problem

The script

alias "f_spawn" "if ('$connectiontype' == 'player') then map_check else exec hud_spec.d"
alias "map_check" "if ('$mapname' isin '$maps_pov') then exec hud_ca.d else exec hud.d"

set "maps_dmm4" "povdmm4 endif bla bla bla bla bla"

And it works, but lets say I add dm3hill to "maps_dmm4" then it will see "dm3" when I spawn on dm3 and I get my dmm4 hud.
Is there a way to get around that without doing a is mapname == for every map there is?
2012-03-13, 19:09
Member
1435 posts

Registered:
Jan 2006
alias "f_spawn" "if ('$connectiontype' == 'player') then map_check else exec hud_spec.d"
alias "map_check" "if (' $mapname ' isin '$maps_pov') then exec hud_ca.d else exec hud.d"

set "maps_pov" " povdmm4 endif bla bla bla bla bla "

Notice the extra spaces I have added. Also I have changed maps_dmm4 to maps_pov, guess that is what you intended.
2012-03-14, 13:48
Member
186 posts

Registered:
Jan 2008
Ye that was a typo. What is the space suppose to do? The problem is still there. Since "dm3" is in "dm3hill" it loads my dmm4 hud on dm3.
2012-03-14, 14:17
Member
485 posts

Registered:
Feb 2006
' dm3 ' is not in ' dm3hill '.
2012-03-14, 19:01
Member
950 posts

Registered:
Apr 2006
'dm3' is in 'dm3hill', but ' dm3 ' is not
2012-03-14, 19:03
Member
186 posts

Registered:
Jan 2008
Hmm Will that work? Don't have à computer to test it on atm.
2012-03-15, 16:40
Administrator
1025 posts

Registered:
Apr 2006
dithes wrote:
Hmm Will that work? Don't have à computer to test it on atm.

Yes it will since your comparision string will include the spaces in the comparision.

It also works to put GG instead of space if u want, then u compare GGdm3GG to GGdm3hillGG which doesn't match
2012-03-15, 16:48
Member
186 posts

Registered:
Jan 2008
Nopp does not work.
2012-03-16, 01:33
Administrator
384 posts

Registered:
Dec 2006
Johnny's scripts should work providing you implement it correctly (including the leading/trailing spaces within the $maps_pov variable).
Maybe paste what you actually have for $maps_pov
2012-03-16, 11:15
Member
186 posts

Registered:
Jan 2008
Ah it works! I missed the the spaces around $mapname. Thanks guys.

Any suggestions on the most common dmm4 maps? have these atm:

set "maps_dmm4" " povdmm4 end dm3hill dm2dmm4 noentry oldcrat amphi "
set "maps_midair" " endif midair midair2 midair3 midair4 midair5 "
2012-03-16, 12:29
Administrator
1025 posts

Registered:
Apr 2006
dmm4: povdmm4b outpost amphi2
2012-03-16, 12:49
Member
950 posts

Registered:
Apr 2006
midair: tearena airbiscuit
2012-03-16, 13:17
Member
186 posts

Registered:
Jan 2008
set "maps_dmm4" " amphi amphi2 dm2dmm4 dm3hill dm6dmm4 end entry noentry oldcrat outpost povdmm4 povdmm4b "
set "maps_midair" " airbiscuit endif pit midair midair2 midair3 midair4 midair5 tearena "
set "maps_race" " race1 race2 race3 race4 race5 race6 race7 race8 slide1 slide2 slide3 slide4 slide4 slide5 slide6 slide7 "
set "maps_tricks" " 2bfree hoppa2 mvdsv-kg sj ssj speed speed2 way2ez way2ez2 zjumps ztrain ztrain2 ztricks ztricks2 "

More suggestions?
2012-03-16, 13:35
Member
485 posts

Registered:
Feb 2006
Haven't tried this but $matchname will have "dmm4" in it when playing dmm4. See manual for match_format_*. If that works you don't need a map list.
2012-03-16, 13:47
Member
186 posts

Registered:
Jan 2008
Have tried that before it does not work that great. If I for instance spawn on povdmm4 by myself it will say solo/dithes - povdmm4. If i use $matchtype it will only say "duel". A map list will work everytime.
2012-03-16, 14:18
Member
485 posts

Registered:
Feb 2006
Match_format_solo doesn't have death match mode by default but you can add it.
2012-03-16, 14:28
Member
186 posts

Registered:
Jan 2008
Ah that's true. But its not a good solution, if I want to include it in my hudpak I need to either include the match_format_* myself or get the users to changes theirs. match_format_* also changes the demo names so it would get pretty messy.
Also I check on mapspawn, some servers doesn't have dmm4 default on some dmm4 maps.
2012-03-17, 09:30
Member
312 posts

Registered:
Feb 2006
What would be different in dmm3 / dmm4 huds? Weapon stats are included in dmm4?
2012-03-17, 12:47
Member
87 posts

Registered:
Apr 2011
I would remove ammo from a dmm4 hud
2012-03-17, 12:55
Member
186 posts

Registered:
Jan 2008
http://i42.tinypic.com/bjh5pw.png


Thats my dmm4 hud
2012-03-17, 13:00
Member
186 posts

Registered:
Jan 2008
Stats would be a cool thing to have on there, but it's not a hud item.
Should request a remake of r_weaponstats and r_tracker.
  21 posts on 1 page  1