[Release][Beta] WeaponOnBack v0.2.4 (with Tint/Components) - Updated at 2019/05/07

This script has been totally rewritten and re-release here.

Old content

Description

  1. Put/Sheath weapons on back, with custom components.
  2. Weapon is displayed via switching weapons.
  3. Video demo here
  4. Client-specified attachment offset (can adjust offset per weapon client-side).
  • image

Commands/Features

  1. Client-specified attachment offset (can adjust offset per weapon client-side).
    1. /wob pos [posX] [posY] [posZ] - set attachment position offset, which is lastest weapon switching “on back”.
    2. /wob rot [rotX] [rotY] [rotZ] - set attachment rotation offest, which is lastest weapon switching “on back”.
  2. Since UI might be server preference, there’s no UI or command hint for player, and you can add them by yourself:
    1. Event “FuturePlanFreeRoam:WeaponOnBack:CommandSucceed” with input will be triggered when command succeed. eg.: FuturePlanFreeRoam:WeaponOnBack:CommandSucceed: wob pos 0 0 0
    2. Event “FuturePlanFreeRoam:WeaponOnBack:CommandFailed” with input will be triggered when command failed, eg.: FuturePlanFreeRoam:WeaponOnBack:CommandFailed: wob pos i m wrong command

Known issues

  1. It seems too much components/tints on weapon objects would cause unknown crash(eg.: crash when switch to first-person), I’ve limited up to 3 weapon objects to display, and tested only 1-2 players online and works fine. If players encounter more frequent crash related to this script, please provide detail info.
  2. Currently “attached” position is not fit well on every models (working on it) Now player can use /wob pos to adjust attachment position :slight_smile:
  3. Weapon object not sync well through client (working on it)
  4. It’s in beta stage and F8 console is somewhat verbose.
  5. If you find more issues, feel free to post it.

Download link

Changelong

v0.2.4 (2019-05-07)
  • Add weapon re-attach timer schedule, which might be help to fix sync issue.
v0.2.1 (2019-05-06)
  • Add client-specified attachment offset (can adjust offset per weapon) with command.
  • Trying to fix sync issue.
  • Fix some bugs (Thanks for you guys reporting from FiveM community :stuck_out_tongue: )

Credits

8 Likes

Great release, I’ve seen something similar to this somewhere too! Good job!

Work esx?

its standalone so yes, it works on any framework.

1 Like

it doesnt work on esx resource does not start on server startup.

It works fine on ESX
https://gyazo.com/cbc72d83e081b4b8f28805e24d2dd558

i must be doing something wrong then i put start WeaponOnBack in my cfg and it wouldnt load it

Does it display only to me? the other players can not see?

It should display across all clients.

More info should be provided if something wrong/wants to fix.

Hey so i was wondering, how would i move the weapons just a tiny bit more away from the players back?

On my server it is displaying the weapons only for the player itself, other users can not see them …

I would have optimized more script to consume less (ms)

Currently does not support to do so, client-customizable feature will be added in future version :slight_smile:

Thank for respond, I‘ll look into it

1 Like

Sorry I don‘t catch your point. Could you please explain on more?

you should make an option for a command instead, like /strap or for pistols /holster

If you know simple lua anyone can make a command… :stuck_out_tongue:

I’m running OneSync with ~64 players. Some of the guns look fine on the client’s side however for other clients will be multiple “feet” away. There is also a significant delay for the updating of the position of the gun for other players. On my screen, it looks fine.

I’m sorry but currently not consider to add more commands to player. It just makes thing more complicated.
Till now, it’s up to server owner to choose display weapon objects or not.