1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

weapon unlock pics on stats site mixed up

Discussion in 'Bugs' started by THE_WUQKED, Mar 16, 2006.

  1. THE_WUQKED

    THE_WUQKED New Member

    The G36E and SCAR-L unlock pics are mixed up:
    when pointing on the G36E, you see a SCAR-L pop-up and wise versa.
    And when you unlock the G36E, it shows the SCAR-L unlocked.

    Solution:
    under "/resources/graphics/unlocks" rename:
    10_0.jpg => 11_0.jpg
    10_1.jpg => 11_1.jpg
    11_0.jpg => 10_0.jpg
    11_1.jpg => 10_1.jpg

    then everything should work fine again. (Except for the missing P90 and L96 pics. That requires changing the code and add them there as well - but that's another story)
     
  2. hurr1k4ne

    hurr1k4ne Member

    then everything should work fine again. (Except for the missing P90 and L96 pics. That requires changing the code and add them there as well - but that's another story)
    ---> i'm workin on it
     
  3. THE_WUQKED

    THE_WUQKED New Member

    !blush Already fixed it myself, but too lazy to write a detailed guide or so.
    Anyway: What you basically need to do is:
    - get the missing pics (you can use the once I used - found them in this forum, but forgot which thread. Our Stats-Site: See Sig) and upload them
    - edit the unlock.php:
    - add the weapon to the weapondesc array (line ~70)
    - fix the while($currentWeaponNumber
     
  4. Groda_Lotsapot

    Groda_Lotsapot New Member

    This is actually a bigger issue from what I see.

    I noticed that the unlocks.php actually doesn't seem to work correctly (with your change). The reasoning behind it is because the getunlocksinfo.aspx doesn't always return all the guns (this is becuase of the change so that you had to select a Tier1 gun before you can select a Tier 2 gun)
    Anybody else notice this issue? try running the getunlocksinfo.aspx for a user that hasn't unlocked anything yet, you get:
    [blockquote]O
    H pid nick asof
    D 28999938 S. Wallberg 1199436176
    H enlisted officer
    D 4 0
    H id state
    D 11 n
    D 22 n
    D 33 n
    D 44 n
    D 55 n
    D 66 n
    D 77 n
    $ 98 $[/blockquote]

    Where if I run it against somone who's unlocked a few guns:
    [blockquote]O
    H pid nick asof
    D 93612376 *4207* 420Duckman 1199436697
    H enlisted officer
    D 0 0
    H id state
    D 11 s
    D 22 n
    D 33 n
    D 44 s
    D 55 n
    D 66 s
    D 77 s
    D 111 s
    D 333 n
    D 444 s
    D 555 n
    $ 124 $[/blockquote]

    So 3 options then:
    • Make getunlocksinfo.aspx list all guns regardless and find a new way to do the Tier2 unlocks.
      Possibly could check the IP address of the requester and list everything if it's the BF2WebStats Server
    • Find a new way to parse the returned information from getunlocksinfo.aspx in the unlocks.php file.
      Possibly create a prepopulated array of guns/id/enabled and then update it with the info retrieved.
    • Edit unlocks.php (or I'd prefer BF2Stats.php) to get the guns directly from the MySQL Server and do the same as the option above. If you did this in BF2Stats.php, you coulda add it to the BF2Stats class object like the rest of the stats.