Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Q Menu (https://forums.graalonline.com/forums/showthread.php?t=62929)

Angel_Light 12-23-2005 12:52 AM

Q Menu
 
Hello all, is there any command for the qmenu? I've tried keydown(Q) and most stuff alike and none of it seems to work? Any help?

Skyld 12-23-2005 01:03 AM

The Wiki suggests that the check for Q is:
PHP Code:

if (keydown(9))
{
  
// Code


You may also want to disable weapon select if you are writing your own Q menu:
PHP Code:

disableselectweapons


Angel_Light 12-23-2005 01:52 AM

All hail the wiki.... wait... what's this..... the wiki failed. XP That doesn't work dude.

Skyld 12-23-2005 01:59 AM

Does this?
PHP Code:

if (keypressed)
{
  if (
keydown2(keycode(q),true))
  {
    
// Code
  
}



Angel_Light 12-23-2005 02:26 AM

Nope

ZeLpH_MyStiK 12-23-2005 02:58 AM

Did you put
NPC Code:
//#CLIENTSIDE


in front of the script?

Angel_Light 12-23-2005 04:15 AM

Yes

ApothiX 12-23-2005 04:39 AM

PHP Code:

if(keypressed) {
  if(
keydown(9)) {
    
setplayerprop #c,Wtf q pressed.;
  
}


?

Bl0nkt 12-23-2005 04:40 AM

Is there something wrong with the rest of your script?

Lance 12-23-2005 06:40 AM

Quote:

Originally Posted by Angel_Light
All hail the wiki.... wait... what's this..... the wiki failed. XP That doesn't work dude.

That would naturally need to execute within some kind of event, e.g. a timeout loop.

Angel_Light 12-23-2005 07:06 AM

tried it all none seems to work

Inverness 12-24-2005 02:10 AM

KeyPressed is an event

PHP Code:

function onKeyPressed() {
  if (
params[1] == "q") {
    
stuffhere;
  }


I use this for my Q Menu, works perfectly.
I guess for GS1 you would use:
PHP Code:

if (keypressed) {
  if (
strequals(#p(1),q)) {
    
stuffhere;
  }



Angel_Light 12-24-2005 09:14 AM

All hail Invern!!!!

ApothiX 12-24-2005 11:38 AM

That would force people to use the 'q' button, not what they have set in the options. I suggest you use #K(9) (old engine), or keyname(9) (new engine)

Lance 12-24-2005 12:14 PM

Quote:

Originally Posted by ApothiX
That would force people to use the 'q' button, not what they have set in the options. I suggest you use #K(9) (old engine), or keyname(9) (new engine)

lowercase k


All times are GMT +2. The time now is 07:21 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.