keydown extended help

Ok so I was Curious on how to get the correct use of GS1 Keydown with any key… Such as when you press “o” It will make you hurt or display a message…
I have soo far

if (keypressed && keycode(79))
{ message FORK
}

^ that being the only code without errors I can think of.
Please help.

Close but no cigar. It works, but you missed the “;” at the end of “message FORK”. Works fine if you add it though.

The age old mistake. I’m no coder, but Yen is right.

To be a bit more clear, you must remember to end each command with the semi-colon.
A silly mistake to be sure.

The Semicolon is not required unless more than one action command is added, none the less, the issue still goes on with it.
When I go in the level with the object, I can press any key, not just “o”, Any ideas of how I may change the conditions?

Nein, brackets are not required if you’re only executing one command from a flag. Semicolons are mandatory regardless!

It’s one fucking character, and it’s always a failsafe. Put it in no matter what. Next we’ll be hearing that brackets are useless around flags, and etcetera.

Try weird shit with your scripts, you’ll end up with weird results. Just do it the way everyone does.
Now to get to the real shit,

if (keypressed && keycode(79))
{ message FORK;
}

What you have here is the flag to check IF A KEY IS PRESSED, and the variable for a keyboard code (or whatever the fuck it’s called. I atleast know the logic behind it.)
Literally the client is thinking: Do this if the key is pressed, keycode(o). It doesn’t know what to do with that keycode so it just ignores it and it becomes useless. While that’s still partially correct, but what you want is a double flag here. You want to check if the keyboard is being used, and you want to check if a specific key is being pressed as a flag.

if (keypressed && keydown2(keycode(o),true))
{ message FORK;
}

I believe this is what you wanted.
Again, close but no cigar. Good luck!

Yiu shall be VIP on Uncivil, whether you want to or not :D[COLOR=“Silver”]

---------- Post added at 04:58 PM ---------- Previous post was at 04:39 PM ----------

[/COLOR]speaking of which, why not come on later today, I have quite a bit of questions.

Yenairo is a master scripter, trust me, I know this.

I have no time to be a master scriptor.
I mean I have no time to be a VIP. I’m not a master scriptor and never will be.

Uncivil - Anytime tomorrow

I am too busy doing other things.
Like procrastinating.

It’s not gonna work out, after that I have a whole lot of nothing to do. Doing nothing takes a lot of time out of my schedule.

[SIZE=1]this is my example:

if (keypressed && keydown2(keycode(o),true)) setplayerprop #c,setnick assesin32}

in your case would be like this if (keypressed && keydown2(keycode(o),true)) say2 hi;

[/SIZE]