Author Topic: GetWeaponData  (Read 1974 times)

Motley

  • Full Member
  • ***
  • Posts: 252
  • Karma: +32/-34
    • View Profile
GetWeaponData
« on: April 15, 2016, 05:41:57 pm »
Weapon Functions

*GetWeaponData
*GetWeaponIDFromName
*GetWeaponName
*SetWeaponData

In the wiki the function GetWeaponData brings you to a blank page. Does anyone now if it was removed? Or when the wiki was down pages got deleted?

I want to know what that function is

Vortrex

  • Full Member
  • ***
  • Posts: 267
  • Karma: +54/-73
    • View Profile
Re: GetWeaponData
« Reply #1 on: April 15, 2016, 07:50:35 pm »
When UAC is enabled, you can add a weapon data file into your server to make sure that players who connect aren't using a custom version.

The function GetWeaponData is used to return values of different weapon stats, like damage, range, ammo in the clip, reload time, etc.

To find values that can be returned (or set with SetWeaponData), there should be a set of constants on the wiki pertaining to each one.

I'm not at my PC but if I remember right, the syntax of the function is:
Code: [Select]
GetWeaponData( int WeaponID , int DataType )
Sent from my Nexus 4 using Tapatalk


rwwpl

  • Full Member
  • ***
  • Posts: 126
  • Karma: +18/-6
  • LU-DM Team
    • View Profile
    • LU-DM Team
Re: GetWeaponData
« Reply #2 on: April 16, 2016, 12:52:16 am »
You can't change weapon data since 0.1.0.15/0.1.0.16 (bugged)

Quote
Note: This function is deprecated. Its use is discouraged as it may be removed in a future update. This function currently does not work. Other method is using 'Weapon.dat

Weapon.dat also doesn't works

Vortrex

  • Full Member
  • ***
  • Posts: 267
  • Karma: +54/-73
    • View Profile
Re: GetWeaponData
« Reply #3 on: April 16, 2016, 06:26:33 am »
Wow, didn't realize that.

The last time I ever used it, was a few years ago, and only just to tinker around with it.
Eventually found myself with a rapid fire rocket launcher with infinite ammo :D

Motley

  • Full Member
  • ***
  • Posts: 252
  • Karma: +32/-34
    • View Profile
Re: GetWeaponData
« Reply #4 on: April 16, 2016, 08:00:04 am »
Wow, didn't realize that.

The last time I ever used it, was a few years ago, and only just to tinker around with it.
Eventually found myself with a rapid fire rocket launcher with infinite ammo :D

Do you remember what LU version you were on?
Also I highly doubt what so ever but do you still have that script to retest?

Just curious. Should be easy to build but you actually happened to get it working before.

#kudos to telling me about the function 

Vortrex

  • Full Member
  • ***
  • Posts: 267
  • Karma: +54/-73
    • View Profile
Re: GetWeaponData
« Reply #5 on: April 16, 2016, 08:38:57 am »
It was a few years ago so before I the update that broke it I think.

Sent from my Nexus 4 using Tapatalk


Theremin

  • Full Member
  • ***
  • Posts: 154
  • Karma: +48/-18
  • Worst Server Owner
    • View Profile
    • Visit my YouTube channel
Re: GetWeaponData
« Reply #6 on: April 16, 2016, 10:13:56 am »
For a couple of things the 0.14 version was better than the current one. There was correct handling interpretation, in the current one the traction reads a wrong value, anyway cars have problems in going uphill and they are much more drifty, including the Dodo which is harder to take off with; and yeah as rww mentioned the weapon.dat and related functions aren't working at all.

Vortrex

  • Full Member
  • ***
  • Posts: 267
  • Karma: +54/-73
    • View Profile
Re: GetWeaponData
« Reply #7 on: April 16, 2016, 10:17:42 am »
Well, I see two options then:
Don't use vehicle or weapon handling ... Or wait for an LU update.

I hope they still plan on having an update.

Sent from my Nexus 4 using Tapatalk


Motley

  • Full Member
  • ***
  • Posts: 252
  • Karma: +32/-34
    • View Profile
Re: GetWeaponData
« Reply #8 on: April 16, 2016, 07:52:50 pm »
Yes weapon.dat does not work, I can load the file in the server and it will count the weapons i left in that file but nothing server side. I have been curious if you have to script in Weapons and run the file.

Cars are broken with drift as Theremin said. I can get really lose in the banshee compared to the story mode edition.

Also have been noticing that the vehicles appear to take the wrong amount of damage, When a Vehicles health hits 200 it will catch on fire and will be ready to explode. which is incorrect. I am pretty sure its LU as I can make the banshee take more damage in story mode.

Honestly We should make a simple list or simple to update wish-list. Player.WeaponAmmo is one of them( It works it just never updates).
 

 

© Liberty Unleashed Team.