SALESup to -59%Sales are live in the shop: see the deals
← All scripts

NC Attack — Fantasy Weapons for Players

Fantasy weapons for players: greatsword, sword, katana, dagger, hatchet, great axe, magic staff, bow and dual pistols. They are held in hand as props with their own animations, sounds and particle effects, never GTA weapons. Combos, heavy attacks, stamina, mana, two aim modes, arrows you pick back up and weapons visible on the body. The server decides every hit: the client only says who it hit.

  • Works with Qbox, QBCore, ESX or without a framework (detected automatically through nc_bridge).
  • Hits players (PvP can be turned off), GTA NPCs, mobs and rift portals of NC Rift, mobs of NC Dungeon.
  • No friendly fire between members of the same NC Party.
  • 2 languages: English and Italian (each player gets the language of their game).
  • The UI follows the NC Bridge themes (and the theme of NC Rift / NC Party when they run).
  • Works with ox_target: clicking with the eye never starts an attack.

Full config guide (every option): CONFIG_GUIDE.md.

Requirements

  • FiveM server with OneSync on (the server checks the hits with the player positions).
  • The nc_bridge resource (shared library of the NC resources) in resources/.
  • The nc_attack_assets resource (weapon models, animations, particle effects, sounds) in resources/.
  • Optional: ox_inventory (or the Qbox / QBCore / ESX inventory) for the weapon items, NC Party, NC Rift, NC Dungeon, nc_hud (mana linked to its classes).

Installation

  1. Copy the nc_bridge, nc_attack_assets and nc_attack folders into resources/.
  2. Items:
    • ox_inventory: copy the items of nc_attack/install/ox_items.lua into ox_inventory/data/items.lua (inside return { ... }).
    • Qbox / QBCore / ESX without ox_inventory: create items with the same names (nc_spadone, nc_spada, nc_katana, nc_daga, nc_ascia_piccola, nc_ascia_grande, nc_bastone, nc_arco, nc_pistole, nc_arrow, nc_pistol_ammo). nc_attack makes them usable by itself.
  3. In server.cfg, after the framework and the inventory:
ensure nc_bridge
ensure nc_attack_assets
ensure nc_party      # optional
ensure nc_rift       # optional
ensure nc_attack
  1. Admins (positions editor, test commands):
add_ace group.admin nc_attack.admin allow
  1. Restart the server, join and test with nc_attack_give <id> <weapon> (server console or admin).

Start nc_attack_assets only with the server: never ensure / restart it with players inside, the clients crash. If you own several NC packs keep only one nc_bridge folder, the newest.

The weapons

WeaponItemTypeLeft clickRight click / R
Greatswordnc_spadonemelee, two hands4-hit combo, the last one sweeps all aroundjumping slam (area)
Swordnc_spadamelee4-hit combo with a lungespinning slash (area)
Katananc_katanamelee, fast4-hit combocharging slash
Daggernc_dagamelee, very faststab combolunge attack
Hatchetnc_ascia_piccolamelee3-hit combodouble step slash
Great axenc_ascia_grandemelee, slow, area3 heavy hits with knockdownberserker slam (area)
Magic staffnc_bastonemagicarcane bolt (mana)R = ground slam with area damage (mana, cooldown)
Bownc_arco + nc_arrowrangedshoot (in precision aim: hold right, then hold left to draw)precision aim, only after picking it with B (quick aim at the start)
Dual pistolsnc_pistole + nc_pistol_ammoranged, 12 roundsshoot, left and right hand in turnprecision aim, only after picking it with B (quick aim at the start); R = reload

Without a weapon in hand the GTA punches are off and fists use their own combo (left) and a kick (right) (Config.Fists). Every weapon (models, combos, damage, range, angle, stamina, sounds, effects) is in config/weapons.lua.

How to play

  • Use the item from the inventory = draw / holster that weapon. H = draw the last weapon / holster.
  • Melee: left click = combo, right click = heavy attack. You turn toward the nearest target and close small gaps (lock-on circle on the target). While you move the attack plays from the waist up.
  • Ranged (bow, pistols, staff): B switches aim mode.
    • *Quick*: click = shot at once, aim snaps to the nearest target in front of the camera.
    • *Precision*: hold right click = first-person zoom, no spread, headshot bonus; bow: hold left click to draw, release to shoot.
  • R = reload (pistols) or ground slam (staff). E = pick up an arrow from the ground.
  • Space = backward dodge with a weapon in hand (costs stamina; with the fists only during a fight).
  • F7 or /armi = holster menu (where each weapon sits on the body).
  • Stamina bar for every swing, shot and draw; mana bar for the staff. At 0 stamina you cannot attack for a moment.
  • Damage numbers over the targets, red numbers for the damage you take, combo counter on screen.

Every player can change the keys in Settings > Key Bindings > FiveM.

Weapons on the body (/armi, F7)

The weapons you own are visible on the body (back, crossed on the back, low back, hips, thighs, chest). In the menu each player picks the place of every weapon, fine-tunes it with sliders or hides it. The choice is saved on the player's PC and seen by everyone.

Admins (nc_attack.admin) also see an Admin section in the same menu: the position chosen there is saved for everyone in data/positions.json and becomes the starting position of every player.

Weapon in hand: admin editor (/armimano)

Admin only (nc_attack.admin). Optional key: assign it in Settings > Key Bindings > FiveM (Config.Keys.handEditor).

  • Every weapon in the list (even if you do not own it), right / left hand for the pistols.
  • Position X / Y / Z and rotation sliders with exact number fields and ±90° buttons.
  • Bone: SKEL_R_Hand, PH_R_Hand, SKEL_L_Hand, PH_L_Hand.
  • An attack of the weapon in a loop with pause, speed and frame, orbit camera and a button that frames the hand.
  • Save for everyone = data/positions.json (wins over the config). Back to config removes the saved value.
  • Copy for config = the hand = { ... } line to paste into config/weapons.lua (also printed in F8).

Commands

CommandWhoWhat it does
/armieveryoneholster menu (name in Config.MenuCommand, key F7)
/armimanoadmineditor of the weapon in hand (Config.HandEditorCommand)
nc_attack_give <id> <weapon>admin / consolegives the weapon item and some ammo (weapon = key of Config.Weapons, e.g. arco)
/nc_attack_anim <dict> <clip>everyoneplays an animation on your character (tests)
/nc_attack_handautoeveryoneforgets the automatic staff grip found on this PC (found again at the next draw)

With the other NC resources

ResourceWhat changes
NC Partyno damage between mates (Config.Combat.partyProtect); nc_party can show the nc_attack mana in its boxes
NC Riftweapons hit rift mobs and portals; each weapon has a damage kind (melee, bullet, magic) for the mob resistances
NC Dungeonweapons hit the mobs of the dungeon engine
nc_hudConfig.Mana.source = 'nc_hud' uses the nc_hud mana (its classes)

Each one can be turned off in Config.Combat / Config.Bridge. Without them nc_attack works on its own (players and NPCs).

For developers

  • exports.nc_attack:UseWeapon(src, item) (server): draws / holsters a weapon as if the player used the item.
  • server/bridge.lua is open: job of the player, owned items, usable items for other inventories.
  • Readable and editable: config.lua, config/weapons.lua, locales/*.lua, server/bridge.lua, web/style.css. The rest of the code is protected with Cfx escrow; nc_attack_assets is encrypted except the sounds (web/sounds, replaceable with your .ogg / .mp3 / .wav).

Problems

  • Weapon not drawn when using the item: check the item names and, with ox_inventory, the server.export line of each item (install/ox_items.lua).
  • Weapon in a strange position in the hand: fix it with /armimano and save for everyone.
  • No damage to rift mobs or portals: nc_rift must start before nc_attack and Config.Combat.riftMobs / riftPortals must be true.
  • Animations or models missing: nc_attack_assets must start before nc_attack; restart the whole server after adding it.

The full guide in 9 languages is also in the resource's docs/ folder.