![]() |
keys
jsut wondering....
is this the right format for if the player pressis a specified key? cause i want to make a text field for passwords and login and stuff.... so i got a few questions: 1.) is this the format i should use? if (keypressed){ if (keydown2(keycode(a),true){addstring this.passfield,a;} " " " " " " and so on? 2.) will keydown2 work offline? 3.) Should i use "if (this.passfield=<password>){//stuff} at the end? |
Re: keys
Quote:
2-Yes,at least works for me. 3-'if (strequals(<password>,#s(this.passfield))){//stuff;} would be better. |
hmm.... it wouldn't be insertstring? what would it be?
|
I never use if (keypressed) { etc } when using keydown2, I simply use:
if (keydown2(keycode(key),true)){ //do all this stuff; } May i remind you that keydown2 doesn't work in a timeout loop. eg: //#CLIENTSIDE if (keydown2(keycode(x),true)){ say2 Mo0; } that works. No timeout needed :P And if you want to make a password field, i suggest using showpoly, you can make a nice looking password field (yes a box) with showpoly. |
Quote:
|
but, i cant make a flag that's if (this.passfield=blah).
I used addstring to make it show the letters but it's always like: x,x,x,x,x,... |
jez no need to take my head off. I wasn't thinking, what i meant was you dont need a timeout 'with' if (keypressed) because thats an action x.x
and Loriel that hurt *holds head* =( |
Quote:
*puts fresh paint over the scratches on the server* |
New methods of flamming,
-Flamming is evolving, are you? |
Re: keys
Instead of using addstring, use something like this:
setstring this.passfield,#s(this.passfield)a; That way it will put the letter a after it. :) |
Quote:
Quote:
|
| All times are GMT +2. The time now is 04:45 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.