Jump to content

all stats and weapons functions


#RooTs

Recommended Posts

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?

Use getPedWeapon instead of getPlayerWeapon

Example :

local range = getWeaponProperty(getPedWeapon(localPlayer), "poor", "weapon_range")  

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

Posted

@Walid, this is not my problem, because I'm already using "getPedWeapom" :?:?

look my function

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

 DUyJ810.gif

Posted
@Walid, this is not my problem, because I'm already using "getPedWeapom" :?:?

look my function

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

check my example you dont need weaponslot.

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

Posted (edited)

@Walid, :o

if you do not know, please do not disturb, I need to set the event "weaponslot" within the function FireRate

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

my full script

ob3v1Xq.png

values

Valor 1 : 0,36666667461395 // Valor 2 : 0,38066667318344 - uzi 
Valor 1 : 0,36666667461395 // Valor 2 : 0,38066667318344 --ak47 
Valor 1 : 0,36666667461395 // Valor 2 : 0,38066667318344 --minigum 
Valor 1 : 0,36666667461395 // Valor 2 : 0,38066667318344 --tec9 
Valor 1 : 0,36666667461395 // Valor 2 : 0,38066667318344 --mp5 
Valor 1 : 0,36666667461395 // Valor 2 : 0,38066667318344 --spaz12 
Valor 1 : 0,36666667461395 // Valor 2 : 0,38066667318344 --pistol 
Valor 1 : 0,36666667461395 // Valor 2 : 0,38066667318344 --desert 
Valor 1 : 0,36666667461395 // Valor 2 : 0,38066667318344 --m4 

Edited by Guest

 DUyJ810.gif

Posted (edited)

lol try to use ur brain, as i can see weaponslot it's not defined in your code.

Edited by Guest

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

Posted
lol try to use ur brain, as i can see weaponslot it's not defined in your code.

I will not post all my script because there is no need

 DUyJ810.gif

Posted
lol try to use ur brain, as i can see weaponslot it's not defined in your code.

I will not post all my script because there is no need

Lol no one can help you we need to see full code , or try to fix it by yourself.

anyways try to use (getPedWeaponSlot() or getSlotFromWeapon() )

sth like this untested

local weaponslot = getPedWeaponSlot (localPlayer) 
local weapon = getPedWeapon(localPlayer,weaponslot) 

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

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
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?

Dude, you want the full script code? Mathematic and logic is the key.

Tip: When you can't find the bug: Try with outputChatBox and keep testing and restarting the resource...

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...