player skin menu improvements
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4557 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -12,12 +12,11 @@ alias joinservermenu [ searchlan 1
|
||||
// Normal in-game menu that opens when pressing escape and connected to a game.
|
||||
newmenu "In-game"
|
||||
|
||||
menuinit [__ingamemenu_showmodel "In-game"]
|
||||
menuitemtextinput "Nickname: " "result $curname" "name $arg1"
|
||||
menuitem "Change to the enemy team" "changeteam"
|
||||
menuitem "Change weapon..." "showmenu Weapons"
|
||||
menuitem "Change player skin..." [showmenu (at [CLA RVSF] (curteam))]
|
||||
menuitem "" -1
|
||||
menuitemtextinput "Nickname: " "result $curname" "name $arg1" [__ingamemenu_showmodel "In-game" 0]
|
||||
menuitem "Change weapon..." "showmenu Weapons" [__ingamemenu_showmodel "In-game" 0]
|
||||
menuitem "Change to the enemy team" "changeteam" [__ingamemenu_showmodel "In-game" 1]
|
||||
menuitem "Change player skin..." [showmenu (at [CLA RVSF] (curteam))] [__ingamemenu_showmodel "In-game" 1]
|
||||
menuitem "" -1 [__ingamemenu_showmodel "In-game" 0]
|
||||
menuitem "Set mode/map..." "showmenu Gamemode"
|
||||
menuitem "Kick/ban player..." "showmenu kick/ban"
|
||||
menuitem "Adjust teams..." [ showmenu "Team adjustment" ]
|
||||
@@ -32,7 +31,7 @@ menuinitselection 12
|
||||
|
||||
alias __ingamemenu_showmodel [
|
||||
if (curteam) [alias __curskin (+ 1 $skin_rvsf)] [alias __curskin (+ 1 $skin_cla)]
|
||||
chmenumdl $arg1 (concatword "playermodels/" (at "CLA RVSF" (curteam)) "/0" $__curskin) idle 20 4
|
||||
if $arg2 [chmenumdl $arg1 (concatword "playermodels/" (at "CLA RVSF" (curteam)) "/0" $__curskin) idle 15 3] [chmenumdl $arg1]
|
||||
]
|
||||
|
||||
// In-game menu that opens if when you press escape if you're admin state and connected to a game.
|
||||
@@ -48,10 +47,10 @@ menuitem "Find a players IP address..." "saycommand /whois "
|
||||
menuitem "Give admin..." [ showmenu "give admin" ]
|
||||
menuitem "" -1
|
||||
menuitemtextinput "Nickname: " "result $curname" "name $arg1"
|
||||
menuitem "Change to the enemy team" "changeteam"
|
||||
menuitem "Change weapon..." "showmenu Weapons"
|
||||
menuitem "Change player skin..." [showmenu (at [CLA RVSF] (curteam))]
|
||||
menuitem "Demos..." "showmenu Demo"
|
||||
menuitem "Change weapon..." "showmenu Weapons" [__ingamemenu_showmodel "In-game admin" 0]
|
||||
menuitem "Change to the enemy team" "changeteam" [__ingamemenu_showmodel "In-game admin" 1]
|
||||
menuitem "Change player skin..." [showmenu (at [CLA RVSF] (curteam))] [__ingamemenu_showmodel "In-game admin" 1]
|
||||
menuitem "Demos..." "showmenu Demo" [__ingamemenu_showmodel "In-game admin" 0]
|
||||
menuitem "" -1
|
||||
menuitem "4Main menu..." [ closemenu "In-game admin"; showmenu main ]
|
||||
menuitem "4Browse servers..." [ closemenu "In-game admin"; joinservermenu ]
|
||||
|
||||
@@ -19,6 +19,7 @@ menuitem "V-19 Combat Shotgun" "nextprimary 2;echo V-19 Combat Shotgun selecte
|
||||
|
||||
newmenu CLA
|
||||
|
||||
menuinit [menuselection CLA $skin_cla]
|
||||
menumdl playermodels/CLA/01 all 50 4
|
||||
menuitem "Comandante" "skin_cla 0" "chmenumdl CLA playermodels/CLA/01 all 50 4"
|
||||
menuitem "Psycho" "skin_cla 1" "chmenumdl CLA playermodels/CLA/02 all 50 4"
|
||||
@@ -28,6 +29,7 @@ menuitem "Ripper" "skin_cla 3" "chmenumdl CLA playermodels/CLA/04
|
||||
|
||||
newmenu RVSF
|
||||
|
||||
menuinit [menuselection RVSF $skin_rvsf]
|
||||
menumdl playermodels/RVSF/01 all 50 4
|
||||
menuitem "Alpha" "skin_rvsf 0" "chmenumdl RVSF playermodels/RVSF/01 all 50 4"
|
||||
menuitem "Tango" "skin_rvsf 1" "chmenumdl RVSF playermodels/RVSF/02 all 50 4"
|
||||
|
||||
+10
-1
@@ -618,6 +618,13 @@ void menuinitselection(int line)
|
||||
if(lastmenu->items.inrange(line)) lastmenu->menusel = line;
|
||||
}
|
||||
|
||||
void menuselection(char *menu, char *line)
|
||||
{
|
||||
if(!menu || !line || !menus.access(menu)) return;
|
||||
gmenu &m = menus[menu];
|
||||
menuselect(&m, atoi(line));
|
||||
}
|
||||
|
||||
void menuitem(char *text, char *action, char *hoveraction)
|
||||
{
|
||||
if(!lastmenu) return;
|
||||
@@ -686,9 +693,10 @@ void menudirlist(char *dir, char *ext, char *action, char *image)
|
||||
|
||||
void chmenumdl(char *menu, char *mdl, char *anim, char *rotspeed, char *scale)
|
||||
{
|
||||
if(!menu || !mdl || !menus.access(menu)) return;
|
||||
if(!menu || !menus.access(menu)) return;
|
||||
gmenu &m = menus[menu];
|
||||
DELETEA(m.mdl);
|
||||
if(!mdl ||!*mdl) return;
|
||||
m.mdl = newstring(mdl);
|
||||
m.anim = findanim(anim)|ANIM_LOOP;
|
||||
m.rotspeed = max(0, min(atoi(rotspeed), 100));
|
||||
@@ -722,6 +730,7 @@ COMMANDN(showmenu, showmenu_, ARG_1STR);
|
||||
COMMAND(closemenu, ARG_1STR);
|
||||
COMMAND(menuinit, ARG_1STR);
|
||||
COMMAND(menuinitselection, ARG_1INT);
|
||||
COMMAND(menuselection, ARG_2STR);
|
||||
COMMAND(menuitem, ARG_3STR);
|
||||
COMMAND(menuitemvar, ARG_3STR);
|
||||
COMMAND(menuitemimage, ARG_4STR);
|
||||
|
||||
Reference in New Issue
Block a user