Jump to content

all stats and weapons functions


#RooTs

Recommended Posts

Posted

I found these

local range = getWeaponProperty(31, "poor", "weapon_range") 
local accuracy = getWeaponProperty(31, "poor", "accuracy") 
local damage = getWeaponProperty(31, "poor", "damage") 

more is missing 2

  • damage -- okay
  • range -- okay
  • accuracy -- okay
  • reach -- absent
  • fire rate -- absent

 DUyJ810.gif

Posted

not sure but i think you can get fire rate by property anim_loop_start and anim_loop_stop

arent reach and range the same thing?

If you find my post useful or if it helped you, please like my post :)
Ingame name: ZoeN

560x95_FFFFFF_FF9900_000000_000000.png

Posted
not sure but i think you can get fire rate by property anim_loop_start and anim_loop_stop

arent reach and range the same thing?

give-me example, please

local fireRate = getWeaponProperty(31, "??", "??") -- ???? 
local reach = getWeaponProperty(31, "??", "??") -- ???? 

 DUyJ810.gif

Posted
What part haven't you understood?

fireRate and reach get function

you can get fire rate by property anim_loop_start and anim_loop_stop using getWeaponProperty

A unique GangWar gamemode waiting for you!
Click here for more information.

560x95_FFFFFF_FF9900_000000_000000.png

Posted

@XeoN, you it is not helping me at nil , you're just making me confuse.

do not bother me again

------------------

local fireRate = getWeaponProperty ( 31 , "poor" , "anim_loop_start",  "anim_loop_stop",  ) 

friends, give-me examples, please

 DUyJ810.gif

Posted

It's not my problem if you're too stupid to understand his post , he already gave you that what you need , it's on you to create it now.

local fireRate = getWeaponProperty ( 31 , "poor" , "anim_loop_start"  ) 

A unique GangWar gamemode waiting for you!
Click here for more information.

560x95_FFFFFF_FF9900_000000_000000.png

Posted (edited)
local range = getWeaponProperty(31, "poor", "weapon_range") 
local accuracy = getWeaponProperty(31, "poor", "accuracy") 
local damage = getWeaponProperty(31, "poor", "damage") 
local fireRate = getWeaponProperty ( 31 , "poor" , "anim_loop_start"  ) 

  • damage -- okay
  • range -- okay
  • accuracy -- okay
  • fire rate -- okay

#EDIT - OMG, sorry

Edited by Guest

 DUyJ810.gif

  • 3 weeks later...
Posted

why is there no percentage?

local fireRate = getWeaponProperty ( 31 , "poor" , "anim_loop_start"  ) 

my code

local fireRate = getWeaponProperty ( getPlayerWeapon(getLocalPlayer(), weaponslot) , "poor" , "anim_loop_start"  ) 

 DUyJ810.gif

Posted

getPlayerWeapon is deprecated use getPedWeapon instead.

local fireRate = getWeaponProperty ( getPedWeapon(localPlayer, weaponslot) , "poor" , "anim_loop_start"  ) 

A unique GangWar gamemode waiting for you!
Click here for more information.

560x95_FFFFFF_FF9900_000000_000000.png

Posted
getPlayerWeapon is deprecated use getPedWeapon instead.
local fireRate = getWeaponProperty ( getPedWeapon(localPlayer, weaponslot) , "poor" , "anim_loop_start"  ) 

no work, always 0% in all weapons

my code

local fireRate = getWeaponProperty ( getPedWeapon(getLocalPlayer(), weaponslot) , "poor" , "anim_loop_start"  ) 

 DUyJ810.gif

Posted

I'm just having trouble with FireRate

local damage = getWeaponProperty(getPlayerWeapon(getLocalPlayer(), weaponslot), "poor", "damage") --ok 
local fireRate = getWeaponProperty ( getPedWeapon(getLocalPlayer(), weaponslot) , "poor" , "anim_loop_start"  )-- problem 
local accuracy = getWeaponProperty(getPlayerWeapon(getLocalPlayer(), weaponslot), "poor", "accuracy") --ok 
local range = getWeaponProperty(getPlayerWeapon(getLocalPlayer(), weaponslot), "poor", "weapon_range") ok 
  
--my dx 
dxDrawRectangle(left+710, top+30, 130/2*fireRate, 6, tocolor(255, 255, 255, 255), false) 

my test in dx

130/1*fireRate

130/100*fireRate

how should I use?

 DUyJ810.gif

Posted

You're not a very patient person, are you? :P

How about you actually try to debug it yourself, instead of always relying on examples given by others? John already told you what you should need for this. So, first step would be to find out what values they return;

local testValue1 = getWeaponProperty(31, "poor", "anim_loop_start") 
local testValue2 = getWeaponProperty(31, "poor", "anim_loop_stop") 
outputChatBox("Value 1: "..tostring(testValue1).." // Value 2: "..tostring(testValue2)) 

And then take it from there. Never expect everything to be straight forward when scripting. It's all about trial and error.

If I help you in a thread and you need further assistance, please don't PM me - use the thread you created instead. This way everyone on the forum can take advantage of it.

Posted

always the same value for all weapons?

this is right?

  
Value 1: 0.36666667461395 // Value 2: 0.38066667318344-- uzi 
Value 1: 0.36666667461395 // Value 2: 0.38066667318344--ak47 
Value 1: 0.36666667461395 // Value 2: 0.38066667318344--minigum 
Value 1: 0.36666667461395 // Value 2: 0.38066667318344--tec9 
Value 1: 0.36666667461395 // Value 2: 0.38066667318344--mp5 
Value 1: 0.36666667461395 // Value 2: 0.38066667318344--spaz12 
Value 1: 0.36666667461395 // Value 2: 0.38066667318344--pistol 
Value 1: 0.36666667461395 // Value 2: 0.38066667318344--desert 
Value 1: 0.36666667461395 // Value 2: 0.38066667318344--m4 

 DUyJ810.gif

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...