Announcement

Collapse
No announcement yet.

lua event/function

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    lua event/function

    Hi,
    Is this possible to Add an event OnPlayerSwitchingSlot ?
    And in SetPlayerWeapon, replace the parameter boolean bLoaded by an integer, so we can adjust how many bullets we wants to put in the magazine .

    What are you thinking about ?

    #2
    The event could be handy, although right now you could probably do it manually by checking for key presses and comparing those to the slot numbers. For SetPlayerWeapon I wouldn't mind making the number of bullets in the magazine an additional parameter. Again, you can do that right now by using SetPlayerWeaponStat to change the magazine size, set the weapon, then set the magazine size back to normal.

    Comment


      #3
      If the player modified the key of selection slot (like me), the key press function will not work. And the SetPlayerWeaponStat is not the most simple way to choose how many bullet I want in the mag at the start of my function.

      Comment


        #4
        Never mind, I found a better way to assign a mag to the weapon

        SetPlayerWeapon(player, model, mag, true, slot, true)
        SetPlayerWeapon(player, model, ammo, true, slot, false)

        First we set the mag loaded, second we set the ammo unloaded,
        But I still need an Event for detecting a swtich slot, using OnRenderHud is not the most opitmized...
        Last edited by GalaxHD551; 01-17-2020, 06:55 PM.

        Comment

        Working...
        X