-stolka- Posted September 5, 2014 Posted September 5, 2014 hi which functions should i use to make a weapon has unlimited ammo?
Castillo Posted September 5, 2014 Posted September 5, 2014 The only way would be to give the ammo back once the player uses it.
-stolka- Posted September 5, 2014 Author Posted September 5, 2014 which is the event that i have to use? i can't find it in the wiki
-stolka- Posted September 5, 2014 Author 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 )
Moderators IIYAMA Posted September 5, 2014 Moderators 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.
-stolka- Posted September 5, 2014 Author 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?
TAPL Posted September 5, 2014 Posted September 5, 2014 Aren't this event only for custom weapons anyway?
Moderators IIYAMA Posted September 5, 2014 Moderators 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
TAPL Posted September 5, 2014 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
Moderators IIYAMA Posted September 5, 2014 Moderators Posted September 5, 2014 They should give more priority to: onPlayerWeaponFire, since those bullets are already can be synced.
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