RX Scripts Logo
Hunting

Events

All client- & serversided events included within this script. Events serve as listeners that capture and respond to actions executed by this script.
If additional events are required for your implementation, please submit a formal request through our ticketing system on the official Discord server.

Server Events

rxhunting:onLicenseBought

Triggered after a hunting license has been bought successfully.

RegisterNetEvent('rxhunting:onLicenseBought', function(playerId) end)
playerId
number

Source of the player that bought the hunting license.

rxhunting:onLicenseRevoked

Triggered after a hunting license has been revoked from a player.

RegisterNetEvent('rxhunting:onLicenseRevoked', function(playerId) end)
playerId
number

Source of the player whose hunting license was revoked.

rxhunting:onItemBought

Triggered after a player buys an item from the hunting shop.

RegisterNetEvent('rxhunting:onItemBought', function(playerId, itemData, amount, price) end)
playerId
number

Source of the player that bought the item.

itemData
table

Data of the item that was bought.

amount
number

Amount of items purchased.

price
number

Total price paid for the items.

rxhunting:onItemSold

Triggered after a player sells an item at the hunting shop.

RegisterNetEvent('rxhunting:onItemSold', function(playerId, itemData, amount, totalPrice) end)
playerId
number

Source of the player that sold the item.

itemData
table

Data of the item that was sold.

amount
number

Amount of items sold.

totalPrice
number

Total price received for the items.

rxhunting:onAnimalCut

Triggered after an animal has been cut once.

RegisterNetEvent('rxhunting:onAnimalCut', function(playerId, animalData, cutWeapon) end)
playerId
number

Source of the player that cut the animal.

animalData
table

Data of the animal that has been cut.

cutWeapon
table

Data of the weapon used to cut the animal.

rxhunting:onAnimalKilled

Triggered after an animal has been killed.

RegisterNetEvent('rxhunting:onAnimalKilled', function(playerId, animalData) end)
playerId
number

Source of the player that killed the animal.

animalData
table

Data of the animal that has been killed.

rxhunting:onAnimalSpawned

Triggered when an animal is spawned in a hunting zone.

RegisterNetEvent('rxhunting:onAnimalSpawned', function(animalData, zoneName, netId) end)
animalData
table

Data of the animal that was spawned.

zoneName
string

Name of the zone where the animal spawned.

netId
number

Network ID of the spawned animal entity.

rxhunting:onXpGained

Triggered when a player gains XP.

RegisterNetEvent('rxhunting:onXpGained', function(playerId, xpGained, newTotalXP, hunter) end)
playerId
number

Source of the player that gained XP.

xpGained
number

Amount of XP gained.

newTotalXP
number

New total XP after the gain.

hunter
table

Hunter object with updated data.

rxhunting:onLevelUp

Triggered when a player levels up their hunter.

RegisterNetEvent('rxhunting:onLevelUp', function(playerId, newLevel, hunter) end)
playerId
number

Source of the player that leveled up.

newLevel
number

The new hunter level achieved.

hunter
table

Hunter object with updated data.

rxhunting:onMissionClaimed

Triggered when a player claims mission rewards.

RegisterNetEvent('rxhunting:onMissionClaimed', function(playerId, missionKey, rewards) end)
playerId
number

Source of the player that claimed the mission.

missionKey
string

Key identifier of the claimed mission.

rewards
table

Table containing the rewards (xp, money, items).

rxhunting:onBaitPlaced

Triggered when a player places a bait.

RegisterNetEvent('rxhunting:onBaitPlaced', function(playerId, baitId, baitData) end)
playerId
number

Source of the player that placed the bait.

baitId
number

Database ID of the placed bait.

baitData
table

Data of the placed bait (item, coords).

rxhunting:onBaitRemoved

Triggered when a bait is removed (expired or max attracts reached).

RegisterNetEvent('rxhunting:onBaitRemoved', function(baitId, baitData, reason) end)
baitId
number

Database ID of the removed bait.

baitData
table

Data of the removed bait.

reason
string

Reason for removal ("expired" or "max_attracts").

rxhunting:onBaitAttracted

Triggered when a bait attracts an animal.

RegisterNetEvent('rxhunting:onBaitAttracted', function(baitId, animalKey, playerId) end)
baitId
number

Database ID of the bait that attracted the animal.

animalKey
string

Key identifier of the attracted animal.

playerId
number

Source of the nearby player.

rxhunting:onVehicleRented

Triggered when a player rents a vehicle.

RegisterNetEvent('rxhunting:onVehicleRented', function(playerId, rentalName, vehicleData, totalCost) end)
playerId
number

Source of the player that rented the vehicle.

rentalName
string

Name of the rental location.

vehicleData
table

Data of the rented vehicle.

totalCost
number

Total cost paid (rental + deposit).

rxhunting:onVehicleReturned

Triggered when a player returns a rented vehicle.

RegisterNetEvent('rxhunting:onVehicleReturned', function(playerId, rentalName, vehicleData, depositReturned) end)
playerId
number

Source of the player that returned the vehicle.

rentalName
string

Name of the rental location.

vehicleData
table

Data of the returned vehicle.

depositReturned
number

Amount of deposit returned to the player.

Client Events

rxhunting:onZoneEntered

Triggered when the player enters a hunting zone.

RegisterNetEvent('rxhunting:onZoneEntered', function(zoneName) end)
zoneName
string

Name of the hunting zone that was entered.

rxhunting:onZoneLeft

Triggered when the player leaves a hunting zone.

RegisterNetEvent('rxhunting:onZoneLeft', function(zoneName) end)
zoneName
string

Name of the hunting zone that was left.