View Single Post
  #1  
Old 02-12-2010, 01:34 AM
Jimbo33 Jimbo33 is offline
****
Jimbo33's Avatar
Join Date: Jan 2008
Location: Canada
Posts: 74
Jimbo33 is on a distinguished road
Send a message via AIM to Jimbo33 Send a message via MSN to Jimbo33
Another GUI question

I'm using a GUI that's opening when 'w' is pressed,
I want it to close when 'w' is pressed again, so players don't
have to move their mouse up to the little red x button.

Here's what I used:

PHP Code:
//#CLIENTSIDE
function onKeyPressed(codekey){
 if (
key == "w") {
 
onOpenStats();
 }
}

function 
onOpenStats() {
  new 
GuiWindowCtrl("Stats_Window1") {
 and 
blabla all the gui scripts... 
Please help, thanks!
Reply With Quote