Quote:
|
Originally Posted by napo_p2p
selectedweapon will still work...
|
Alright but I'm unsure how to get it done... it seems a bit different now.
PHP Code:
for (this.i=0;this.i<weaponscount;this.i++) {
if (strequals(#w(this.i),#I(clientr.hotkey1,0))) {
addstring clientr.hotkey1,#v(this.i);
break;
}
}
That's GS1 version, of course. I'm not sure the GS2 version of #w(this.i)
I tried
PHP Code:
for (this.i=0;this.i<weaponscount;this.i++) {
if (this.i == clientr.hotkey1[0]) {
clientr.hotkey1.insert(2,this.i);
break;
}
}
It doesn't seem to pick up if the this.i is the weapon name (clientr.hotkey1[0] is the name of the weapon)
Any suggestions? Like
PHP Code:
if (this.i == clientr.hotkey1[0].id) {
Or something.