#RooTs Posted May 15, 2015 Posted May 15, 2015 hello my friends, can someone pass me these functions ? I thank you damage reach fire rate range accuracy example
#RooTs Posted May 15, 2015 Author Posted May 15, 2015 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
John Smith Posted May 15, 2015 Posted May 15, 2015 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?
#RooTs Posted May 15, 2015 Author Posted May 15, 2015 not sure but i think you can get fire rate by property anim_loop_start and anim_loop_stoparent reach and range the same thing? give-me example, please local fireRate = getWeaponProperty(31, "??", "??") -- ???? local reach = getWeaponProperty(31, "??", "??") -- ????
#RooTs Posted May 15, 2015 Author Posted May 15, 2015 What part haven't you understood? fireRate and reach get function
xeon17 Posted May 15, 2015 Posted May 15, 2015 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
#RooTs Posted May 15, 2015 Author Posted May 15, 2015 @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
xeon17 Posted May 15, 2015 Posted May 15, 2015 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" )
#RooTs Posted May 15, 2015 Author Posted May 15, 2015 I do not understand why he said "anim_loop_stop" more okay
#RooTs Posted May 15, 2015 Author Posted May 15, 2015 (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 May 16, 2015 by Guest
#RooTs Posted May 16, 2015 Author Posted May 16, 2015 Aren't range and reach exactly the same thing? #EDIT, sorry Thanks, I will test the functions
#RooTs Posted June 3, 2015 Author Posted June 3, 2015 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" )
xeon17 Posted June 3, 2015 Posted June 3, 2015 getPlayerWeapon is deprecated use getPedWeapon instead. local fireRate = getWeaponProperty ( getPedWeapon(localPlayer, weaponslot) , "poor" , "anim_loop_start" )
#RooTs Posted June 3, 2015 Author Posted June 3, 2015 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" )
#RooTs Posted June 3, 2015 Author Posted June 3, 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?
#RooTs Posted June 4, 2015 Author Posted June 4, 2015 oh my god, someone know? someone moderator or administrator ? support please
Dealman Posted June 4, 2015 Posted June 4, 2015 You're not a very patient person, are you? 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.
#RooTs Posted June 4, 2015 Author Posted June 4, 2015 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
#RooTs Posted June 4, 2015 Author Posted June 4, 2015 getWeaponFiringRate Hello admins, this function "getWeaponFiringRate" works with the?? getPedWeapon
xeon17 Posted June 4, 2015 Posted June 4, 2015 getWeaponFiringRate Hello admins, this function "getWeaponFiringRate" works with the?? getPedWeapon No, it's only for custom weapons.
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