Home PendingSpikes
Post
Cancel

PendingSpikes

Background

PendingSpikes is a project that aims to create a simple, effective, and beautiful script for utilisiing spike strips in FiveM.

Features

  • Player Animations.
  • Spike strip animations.
  • Customisable spike strip length.
  • Command and interaction support.
  • Removing all spikes in a group at one time.
  • Integration with RPEmotes.
  • Exports and Events for developers.

Try it Out!

Try it out at PendingDevelopment’s Tebex Webstore.

Credits

  • loaf_spikestrips for the original script (forked from v1.2.1). - PendingDevelopment will work to fix any of the performance issues addressed between v1.2.1 and v2.1.0 in releases coming soon.

Install

  1. Add PendingSpikes to your resources folder.
  2. Add ensure PendingSpikes to your server.cfg.
  3. Configure the config.json file.
  4. If you require use of PendingToast, install as described here.
  5. If you require use of rpemotes-reborn or rpemotes install the resources as “rpemotes”.

Config

Config NameDescriptionDefault ValueOther Possible Values
DEBUGToggle debug prints in the F8 console. More debugging prints will be made in future releases. This may hape PendingDevelopment troubleshoot your issues.falsetrue
NPC_VEHICLESAllow spikes strips to effect NPC / AI vehiclestruefalse
MESSAGE_STRINGS/REMOVE_STINGERThe text to display to notify the user how to remove the spike strips.“~INPUT_CONTEXT~ ~r~Remove ~s~spikestrip”Any String
MESSAGE_STRINGS/PLACE_STINGERThe text to display to notify the user how to place the spike strips. This will only display if you have VEHICLE_BOOTS enabled, as a command can be used otherwise.“~INPUT_CONTEXT~ ~g~Place ~s~spikestrip”Any String
VEHICLE_BOOTSWhether to enable the VEHICLE_BOOTS section of the script.falsetrue
SET_SPIKE_COMMANDThe command to use when VEHICLE_BOOTS is disabled.spikeAny String
SPIKE_LENGTHHow many individual strips to use when placing the spikes.2Any Integer
PLAYER_ANIMATION/ENABLEDWhether to enable player animation when placing down the spikestruefalse
PLAYER_ANIMATION/DICTIONARYDictionary for the player animation.“amb@world_human_bum_wash@male@low@idle_a”Any dictionary (leave default if you’re unsure).
PLAYER_ANIMATION/ANIMATIONAnimation name for the player animation.“idle_a”Any animation (leave default if you’re unsure).
PLAYER_ANIMATION/RP_EMOTESWhether to enable to integration with rpemotes-reborn or rpemotes. Resource name must be rpemotes.truefalse
PLAYER_ANIMATION/RP_EMOTES_EMOTEThe emote name to run when the player is holding the spike strips box.“suitcase2”Any valid emote.
SPIKE_ANIMATIONWhether to show the spike strips being laid accross the floor. If this is off, they will instantly be set down.truefalse

Vehicle Boots Info

The vehicle boots part of the script allows you to gather the spike strips from a location, such as a vehicle boot, allowing more interactive roleplaying scenarios.

This part of the script was made with the idea of ox_target in mind. Here you can see an example of the script in action. Their documentation can be found here.

1
2
3
4
5
6
7
8
9
10
11
12
exports.ox_target:addModel(VehicleName, {
    {
        label = "Stinger",
        onSelect = function()
            if not exports.PendingSpikes:DoesPlayerHaveSpikesInHand() then
                exports.PendingSpikes:TakeOutSpikes(true)
            else
                exports.PendingSpikes:PutAwaySpikes(true)
            end
        end
    },
})

Exports

TakeOutSpikes

1
exports.PendingSpikes:TakeOutSpikes(DisplayNotification)

DisplayNotification: Whether to display a PendingToast notification. If not using PendingToast, leave blank.

PutAwaySpikes

1
exports.PendingSpikes:PutAwaySpikes(DisplayNotification)

DisplayNotification: Whether to display a PendingToast notification. If not using PendingToast, leave blank.


Client Events

PendingSpikes:TakeOutSpikes

1
TriggerEvent("PendingSpikes:TakeOutSpikes", DisplayNotification)

DisplayNotification: Whether to display a PendingToast notification. If not using PendingToast, leave blank.

PendingSpikes:PutAwaySpikes

1
TriggerEvent("PendingSpikes:PutAwaySpikes", DisplayNotification)

DisplayNotification: Whether to display a PendingToast notification. If not using PendingToast, leave blank.

This post is licensed under CC BY 4.0 by the author.