Thread: Stoping script
View Single Post
  #5  
Old 11-30-2004, 09:58 PM
Slash-P2P Slash-P2P is offline
Banned
Join Date: May 2004
Location: Burning Blade
Posts: 941
Slash-P2P is on a distinguished road
Quote:
Originally Posted by Salaisuus
Sleep doesnt work with the keys.

if (keypressed) {
if (strequals(#p(1),1)) setani plah,; sleep 3;}
Try freezeplayer instead of sleep.

Quote:
Originally Posted by Salaisuus
Speaking of keys how do I use keydown command?

if (keydown(A)) {
setstring clientr.plahplah,0;}

Thats how I understood its used, but that script doesnt do anything.
keydown parameters are numbered. If you don't know the number for a key, use keydown2 (read how to use it if you dont know it already). I don't know about some other people, but for me, keydown only works under another condition such as a timeout.

Key codes for keydown() (ones I know off the top of my head)
0 - Arrow key up
1 - Arrow key left
2 - Arrow key down
3 - Arrow key right
4 - Weapon fire (default: d)
5 - Sword (default: s)
6 - Grab (default: a)
7 - Map (default: m)
9 - Q-Menu (default: q)
Reply With Quote