KairudeguCZyou change spawn as medic without loosing your uber
Keep in mind this is disallowed in some leagues, check with your league's rule page.
_______________________________
So where is this script? Demoman.cfg? Or is this in an all-class reset.cfg sort of location?
Have you tried just directly binding the keys to the item preset without your intermediary aliases?
TF2 doesn't like quotes within quotes so maybe try re-working a bit to not have "quotes "within quotes"".
Lastly, what is demolp for? Could you not just omit demolp entirely?
alias announce_team_0 "say_team Item Preset 0"
alias announce_team_1 "say_team Item Preset 1"
alias announce_team_2 "say_team Item Preset 2"
alias announce_team_3 "say_team Item Preset 3"
bind kp_end "announce_team_0; load_itempreset 0; alias f_swap load_itempreset 0"
bind kp_downarrow "announce_team_1; load_itempreset 1; alias f_swap load_itempreset 1"
bind kp_pgdn "announce_team_2; load_itempreset 2; alias f_swap load_itempreset 2"
bind kp_leftarrow "announce_team_3; load_itempreset 3; alias f_swap load_itempreset 3"
alias f_swap "load_itempreset 0"
bind f f_swap
Try this. Should function as you want it to. Just remember that aliases cannot retain information after closing the game, so the first time you press F without touching a loadout key it'll be set to preset 0. I also removed your nasty nested binds which can cause issues when changing stuff in the future.
Thanks!
Yes it's different for each class.
Yes, I tried, result was the same.
Demolp (scoutlp...) is "demoman last preset", so after executing class config it will load last preset loaded with script. And if I choose for example preset 1 as demo, I won't have iteam preset 1 as scout, but I'll have 0 as last time I played scout. (after forward spawning with F)
EDIT:
I turned on half of my brain and made this:
alias loadout_pres_0 "say_team "Item preset 0"; alias "demo_lp" "load_itempreset 0"; demo_lp"
alias loadout_pres_1 "say_team "Item preset 1"; alias "demo_lp" "load_itempreset 1"; demo_lp"
alias loadout_pres_2 "say_team "Item preset 2"; alias "demo_lp" "load_itempreset 2"; demo_lp"
alias loadout_pres_3 "say_team "Item preset 3"; alias "demo_lp" "load_itempreset 3"; demo_lp"
bind f demo_lp
bind kp_end loadout_pres_0
bind kp_downarrow loadout_pres_1
bind kp_pgdn loadout_pres_2
bind kp_leftarrow loadout_pres_3
in class confings
+
bind alt "+joinclass"
alias +joinclass "bind 1 scout1; bind 2 soldier1; bind 3 pyro1; bind 4 demoman1; bind 5 heavy1; bind 6 engineer1; bind 7 medic1; bind 8 sniper1; bind 9 spy1"
alias -joinclass "bind 1 "aslot1"; bind 2 "aslot2"; bind 3 "aslot3"; bind 4 "aslot4"; bind 5 "clear"; bind 6 "clear"; bind 7 "clear"; bind 8 "clear"; bind 9 "clear""
alias scout1 "join_class scout; exec scout; scout_lp"
alias soldier1 "join_class soldier; exec soldier; solly_lp"
alias pyro1 "join_class pyro; exec pyro; pyro_lp"
alias demoman1 "join_class demoman; exec demoman; demo_lp"
alias heavy1 "join_class heavyweapons; exec heavyweapons; heavy_lp"
alias engineer1 "join_class engineer; exec engineer; engie_lp"
alias medic1 "join_class medic; exec medic; medic_lp"
alias sniper1 "join_class sniper; exec sniper; sniper_lp"
alias spy1 "join_class spy; exec spy; spy_lp"
in my autoexec
it seems working