Walid Posted June 4, 2015 Posted June 4, 2015 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")
#RooTs Posted June 4, 2015 Author Posted June 4, 2015 @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" )
Walid Posted June 4, 2015 Posted June 4, 2015 @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.
#RooTs Posted June 4, 2015 Author Posted June 4, 2015 (edited) @Walid, 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 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 June 4, 2015 by Guest
Walid Posted June 4, 2015 Posted June 4, 2015 (edited) lol try to use ur brain, as i can see weaponslot it's not defined in your code. Edited June 4, 2015 by Guest
#RooTs Posted June 4, 2015 Author Posted June 4, 2015 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
Walid Posted June 4, 2015 Posted June 4, 2015 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)
#RooTs Posted June 4, 2015 Author Posted June 4, 2015 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?
neves768 Posted June 5, 2015 Posted June 5, 2015 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...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now