Jump to content

unlimited ammo


-stolka-

Recommended Posts

Posted

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
Posted

1. It laggs.

2. Synchronisation problems.

3. I doubt all bullets of a minigun will be synced. Since they get created every render frame.

Posted
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?

  • Moderators
Posted (edited)
Aren't this event only for custom weapons anyway? :roll:

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 by Guest
  • Moderators
Posted

They should give more priority to: onPlayerWeaponFire, since those bullets are already can be synced.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...