Thread: selectedweapon
View Single Post
  #11  
Old 06-06-2006, 07:38 PM
Omini Omini is offline
Millenium Owner
Join Date: Feb 2006
Location: N.Ireland
Posts: 293
Omini is on a distinguished road
Send a message via AIM to Omini Send a message via MSN to Omini Send a message via Yahoo to Omini
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.== 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.== clientr.hotkey1[0].id) { 
Or something.
__________________



Reply With Quote