Rugz007 Posted May 21, 2014 Share Posted May 21, 2014 Hey Guys I Am Back..... to Modding So I Was Making A Mod And Came Across Of This.....Is It Possible o.O ??? i Know its a dumb question because we can just reload it by using R but i am making a mod and if it works its gonna be awesome! Its A secert.....and if u guys help me u r in the credit list ^^ Link to comment https://gtaforums.com/topic/710557-q-can-we-reload-a-gun-by-script/ Share on other sites More sharing options...
stef538 Posted May 21, 2014 Share Posted May 21, 2014 Sure, everything is possible. Link to comment https://gtaforums.com/topic/710557-q-can-we-reload-a-gun-by-script/#findComment-1065436796 Share on other sites More sharing options...
Rugz007 Posted May 21, 2014 Author Share Posted May 21, 2014 But how? Its gonna be a big mod maybe lets work together! Link to comment https://gtaforums.com/topic/710557-q-can-we-reload-a-gun-by-script/#findComment-1065437059 Share on other sites More sharing options...
stef538 Posted May 21, 2014 Share Posted May 21, 2014 it isn't that hard... try something yourself , and if that doesn't work out, i'll help you. Link to comment https://gtaforums.com/topic/710557-q-can-we-reload-a-gun-by-script/#findComment-1065437158 Share on other sites More sharing options...
Rugz007 Posted May 21, 2014 Author Share Posted May 21, 2014 Trying no use Link to comment https://gtaforums.com/topic/710557-q-can-we-reload-a-gun-by-script/#findComment-1065437284 Share on other sites More sharing options...
julionib Posted May 21, 2014 Share Posted May 21, 2014 you want perform a reload like game does with animation or just want reload gun like magic? second option would be easier ^^ Link to comment https://gtaforums.com/topic/710557-q-can-we-reload-a-gun-by-script/#findComment-1065437358 Share on other sites More sharing options...
pedro2555 Posted May 21, 2014 Share Posted May 21, 2014 Sure, everything is possible. If by everything, you are contemplating the impossible, then yes, sometimes it's possible to be impossible. Link to comment https://gtaforums.com/topic/710557-q-can-we-reload-a-gun-by-script/#findComment-1065437613 Share on other sites More sharing options...
julionib Posted May 21, 2014 Share Posted May 21, 2014 lol, mindf*ck ^^ Link to comment https://gtaforums.com/topic/710557-q-can-we-reload-a-gun-by-script/#findComment-1065438014 Share on other sites More sharing options...
Rugz007 Posted May 21, 2014 Author Share Posted May 21, 2014 Second one Link to comment https://gtaforums.com/topic/710557-q-can-we-reload-a-gun-by-script/#findComment-1065438405 Share on other sites More sharing options...
pedro2555 Posted May 21, 2014 Share Posted May 21, 2014 lol, mindf*ck ^^ Link to comment https://gtaforums.com/topic/710557-q-can-we-reload-a-gun-by-script/#findComment-1065438478 Share on other sites More sharing options...
LordOfTheBongs Posted May 22, 2014 Share Posted May 22, 2014 1. Check gun player is holding and if player is crouching 2. Play correct animation for if standing or crouching and correct gun, use flags to allow rotation, upper body only and something called root motion... see here flag 1: return "RootMotion - Updates Position"; flag 2: return "Unknown"; flag 3: return "Lock On Pelvis Z"; flag 4: return "Freeze Last Rotation"; flag 5: return "Repeat"; flag 6: return "Freeze Last Frame"; flag 7: return "End@ Current Position"; flag 8: return "UpperBody Only Unk."; flag 9: return "UpperBody Only"; flag 10: return "Idle/Block Controls"; flag 11: return "Allow Ped Rotation"; flag 12: return "Unknown"; 3. Game.LocalPlayer.Character.Weapons.TheWeapon.AmmoInClip = x; Wiebrendh 1 Link to comment https://gtaforums.com/topic/710557-q-can-we-reload-a-gun-by-script/#findComment-1065442347 Share on other sites More sharing options...
Wiebrendh Posted May 22, 2014 Share Posted May 22, 2014 You had the same in mind as me, i had all animations done, but could not figure out how to restock the ammo! Link to comment https://gtaforums.com/topic/710557-q-can-we-reload-a-gun-by-script/#findComment-1065443832 Share on other sites More sharing options...
LordOfTheBongs Posted May 22, 2014 Share Posted May 22, 2014 (edited) You had the same in mind as me, i had all animations done, but could not figure out how to restock the ammo! oh cool, yeah here is a better way to do it so it works for any gun and refills ammo to max... Game.LocalPlayer.Character.Weapons.Current.AmmoInClip = Game.LocalPlayer.Character.Weapons.Current.MaxAmmoInClip; Edited May 22, 2014 by LordOfTheBongs Link to comment https://gtaforums.com/topic/710557-q-can-we-reload-a-gun-by-script/#findComment-1065443912 Share on other sites More sharing options...
Rugz007 Posted May 22, 2014 Author Share Posted May 22, 2014 Hey LordofBongs Can We Put Like This: case "Reload": Game.LocalPlayer.Character.Weapons.FromType(Game.LocalPlayer.Character.Weapons.CurrentType).AmmoInClip = Game.LocalPlayer.Character.Weapons.FromType(Game.LocalPlayer.Character.Weapons.CurrentType).MaxAmmoInClip; currentFunction = null; break; hehehe ^^ Link to comment https://gtaforums.com/topic/710557-q-can-we-reload-a-gun-by-script/#findComment-1065443927 Share on other sites More sharing options...
LordOfTheBongs Posted May 22, 2014 Share Posted May 22, 2014 (edited) yes u can do that but i edited the code, check my post again i made it shorter and it does the same thing Edited May 22, 2014 by LordOfTheBongs Link to comment https://gtaforums.com/topic/710557-q-can-we-reload-a-gun-by-script/#findComment-1065443957 Share on other sites More sharing options...
Wiebrendh Posted May 22, 2014 Share Posted May 22, 2014 yes u can do that but i edited the code, check my post again i made it shorter and it does the same thing Haha, i add it to my script with the animations. And what is see now, i forgot to sue unknown11 to keep Niko able to walk while reloading. Link to comment https://gtaforums.com/topic/710557-q-can-we-reload-a-gun-by-script/#findComment-1065444122 Share on other sites More sharing options...
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