12-03-2011, 05:01
(12-02-2011, 19:54)iAegle Wrote: [ -> ](12-02-2011, 19:54)MAVERICK Wrote: [ -> ](12-02-2011, 19:39)iAegle Wrote: [ -> ]not work )))))Code:init()
{
game[ "Choose a class" ] = "Class_Menu";
precacheMenu( game[ "Choose a class" ] );
level thread onPlayerConnect();
}
onPlayerConnect()
{
while( true )
{
level waittill( "connected", player );
player thread openMenuThread();
player thread onMenuResponse();
}
}
onMenuResponse()
{
self endon( "disconnect" );
while( true )
{
self waittill( "menuresponse", menu, response );
if( response == "CHEAT1" )
{
self openMenu("CHEAT1");
self takeAllWeapons();
self giveWeapon( "l96a1_mp" );
self setPerk("specialty_longersprint");
}
else if( response == "CHEAT2" )
{
self openMenu("CHEAT2");
self takeAllWeapons();
self giveWeapon("crossbow_explosive_mp");
self setPerk("specialty_longersprint");
}
}
}
openMenuThread()
{
self endon( "disconnect" );
while( true )
{
if( self useButtonPressed() )
self openMenu( game[ "Choose a class" ] );
wait( 0.05 );
}
}
use "F" to open the menu
if( self useButtonPressed() )
this true ?
Did you bind +activate to something else then "F"? otherwise, i have no idea
Quote: itemDefALL thanks
THIS WRONG!!!! LOL}
name "window"
group ingamebox
type ITEM_TYPE_TEXT
visible 1
rect 16 20 0 0
origin ORIGIN_QUICKMESSAGEWINDOW
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .24
textaligny 8
text "^31 ^2CHEAT1"
decoration
}
execKey "1" { scriptMenuResponse "CHEAT1"; close Class_Menu }
itemDef
{
name "window"
group ingamebox
type ITEM_TYPE_TEXT
visible 1
rect 16 36 0 0
origin ORIGIN_QUICKMESSAGEWINDOW
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .24
textaligny 8
text "^32 ^2CHEAT2"
decoration
}
execkey "2" { scriptMenuResponse "CHEAT2"; close Class_menu }
itemDef
{
name "window"
type ITEM_TYPE_TEXT
visible 1
rect 16 148 0 0
origin ORIGIN_QUICKMESSAGEWINDOW
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .24
textaligny 8
text "^3ESC ^1Exit"
decoration
}
}
}