This wont select the next variable in thiso.rights.
thiso.rights = Stick,Unstick,Jail,Stealth
can someone help me get this to work?
PHP Code:
function onKeyPressed(code, key, scancode) {
for (temp.i = 0; temp.i < thiso.rights.size(); temp.i ++) {
//[ 219
//] 221
//\ = 220,\,43
if (code == 219) {
//[
if (this.selected - 1 => thiso.rights[0]) {
this.selectedid = temp.i;
this.selected = thiso.rights[(@this.selectedid - 1)];
UpdateText(this.selected);
}
}
if (code == 220) {
//\
if (this.selected + 1 =< thiso.rights.size() - 1) {
this.selectedid = temp.i;
this.selected = thiso.rights[(@this.selectedid + 1)];
UpdateText(this.selected);
}
}
}
}