-stolka- Posted September 5, 2014 Share Posted September 5, 2014 hi which functions should i use to make a weapon has unlimited ammo? Link to comment
Castillo Posted September 5, 2014 Share Posted September 5, 2014 The only way would be to give the ammo back once the player uses it. Link to comment
-stolka- Posted September 5, 2014 Author Share Posted September 5, 2014 which is the event that i have to use? i can't find it in the wiki Link to comment
-stolka- Posted September 5, 2014 Author Share Posted September 5, 2014 what's wrong in this function? addEventHandler( "onWeaponFire", root, function () if ( isElement( source ) ) and ( getElementType( source ) == "player" ) then if getPlayerWeapon( source ) == 38 then giveWeapon ( source, 38, 1 ) end end end ) Link to comment
Moderators IIYAMA Posted September 5, 2014 Moderators Share Posted September 5, 2014 1. It laggs. 2. Synchronisation problems. 3. I doubt all bullets of a minigun will be synced. Since they get created every render frame. Link to comment
-stolka- Posted September 5, 2014 Author Share Posted September 5, 2014 1. It laggs.2. Synchronisation problems. 3. I doubt all bullets of a minigun will be synced. Since they get created every render frame. so how do i make minigun has unlimited ammo? Link to comment
TAPL Posted September 5, 2014 Share Posted September 5, 2014 Aren't this event only for custom weapons anyway? Link to comment
Moderators IIYAMA Posted September 5, 2014 Moderators Share Posted September 5, 2014 (edited) Aren't this event only for custom weapons anyway? hmmm, yes. Why is there a onWeaponFire event when people can't create custom weapons serverside. @-stolka- By using a timer, checking the ammo, setting the ammo. Edited September 5, 2014 by Guest Link to comment
TAPL Posted September 5, 2014 Share Posted September 5, 2014 It was possible server side but it been removed because it incomplete. https://code.google.com/p/mtasa-blue/source/detail?r=6679 Link to comment
Moderators IIYAMA Posted September 5, 2014 Moderators Share Posted September 5, 2014 They should give more priority to: onPlayerWeaponFire, since those bullets are already can be synced. Link to comment
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