Jump to content

unlimited ammo


-stolka-

Recommended Posts

Posted

The only way would be to give the ammo back once the player uses it.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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 
) 
  

CAOS RP

SKYPE: stolka.caosrp

CONNECT to CAOS RP

  • 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.

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

  • 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

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

  • Moderators
Posted

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

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

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...