[PAID] Pistol Event

About my resource

  • Open Source
  • No ip lock
  • Automated Event
  • It runs 0.3 ms while active and 0.5ms max with killcounter
  • Easy to setup
  • Tons of configurable features
  • Can be pretty nice on standalone as well
  • Can enable esx features for better experience
  • Can be used in Roleplay and PvP servers
  • Configurable teleport and spawn points
  • On kill Heals
  • Spawnpoints editable through client.lua

Script preview : Watch pistoleventpreview | Streamable
You can buy it from here https://fuegoscripts.tebex.io/package/4872338 (8 €)

After Buying this, editing and reselling of this resource is strictly prohibited

Config Preview

Config                        	= {}

Config.NPCHash = 866411749 -- NPC Model you can search https://wiki.■■■■■■■■■■■/index.php/Peds here to change it

Config.ThreadCheckingForPistol = 7 --How many miliseconds does the loop wait between checks for pistol. Dont touch if you dont know please! !!!!!FOR DEVELOPERS, THIS IS MULTIPLIED BY 100!!!!!!

Config.EventGuyLocation	= { x = -295.99, y = -1900.4, z = 29.95, h = 173.2} --The location of the npc

Config.EventLocation = vector3(520.1642,-2980.963,6.0668) -- The location of the event

Config.EventZone = 550.0 --How big the zone of the event is. Keep the .0 at the end

Config.Weapons = {453432689,1593441988,-1716589765,-1076751822,-771403250} --Weapons that the player can have. You can find the weapon hashes here : https://wiki.■■■■■■■■■■■/index.php?title=Weapons_Models

Config.Marker = true --Shows a marker under the bot and looks pretty nice but can be tricky inside mlos

Config.EventTime = 25 --How many minutes the event lasts

Config.TimeBeforeStart = 5 --Minutes passed for the event to actually start after the announce message

Config.EventRevive = true --If this is set on true, if there are no other scripts messing around with player's respawn it will spawn the players to the spawn points you set on client.lua

Config.InvisibleTime = 2 --Seconds that the player is invisble on the teleport and at the revive, leave this on 2 its perfect trust me

Config.Hours = {"12","13","14","15","16","17","18","19"} -- Configure at what hours the event starts --Maximum 10-11 times in 24 hours because the thread is checking the pin every 5 seconds in a minute

Config.GivePistolToPlayer = true  --Gives a pistol to the player that teleports to the event

Config.teleportBack = true -- Teleports the player back to the npc when the event ends

-------------------------------------------Messages------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

-- You can find more about text formating in fivem here : https://forum.cfx.re/t/chat-formatting-colors-bold-underline/67641

Config.AnnounceMessage = "^* ^0[ ^4PISTOL EVENT ^0] ^1The ^5^_PISTOL EVENT^r ^1 is starting in ^7"..Config.TimeBeforeStart.." ^1minute(s)" --Announce Message before event starts

Config.StartMessage = "^* ^0[ ^4PISTOL EVENT ^0] ^1The ^5^_PISTOL EVENT^r ^1 has started" --Message when the event starts

Config.EndMessage = "^* ^0[ ^4PISTOL EVENT ^0] ^1The ^5^_PISTOL EVENT^r ^1 has just ended" --Message when the event ends

-------------------------------------------Messages------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

--[[ESX DEPENTED]] Config.HealOnKill = false --When the player kills an opponent player he instantly heals for the values you set

--[[ESX DEPENTED]] Config.HealHealth = 200 --If HealOnKill is true then the player that kills the oppontent heals for how much you write here, TIP: Should be integer

--[[ESX DEPENTED]] Config.HealArmor = 50 --If HealOnKill is true then the player that kills the oppontent gets armor for how much you write here, TIP: Should be integer

--[[ESX DEPENTED]] Config.Killcounter = true --Can be toggled-untoggled, if in event it displays a counter at the right middle of you screen that counts all your kills, it resets every event

--[[ESX DEPENTED]] Config.ToggleKillCounterName = 'togglekillcounter' --Toggle Counter Command Name

--[[OTHER SCRIPT DEPENTED]] Config.progressbar = false --if you have the progressBars script on your server, everytime you die or teleport to the event, while you are loading you have a progressbar 
--displaying your state of loading
--You can find the progressBars script here https://forum.cfx.re/t/release-progress-bars-1-0-standalone/526287

Updates

  • Added an extra option on config that when the event ends, all people that were in the event
    will be teleported back to the npc.
    Check it out here : Streamable
  • Fixed the bug where all player could start the event
  • Fixed the bug where if the event was automatically started
    an admin could start it again while event was running

I Have updated the file in tebex, if you have trouble finding the download feel free to contact me on discord with your receipt
Discord Name : Fuego#1111

5 Likes

This works like a charm. Thanks!

1 Like

getting this error esx legacy

SCRIPT ERROR: @f_pistolEvent/server/server.lua:34: attempt to index a nil value (local ‘killerPlayer’)

support qbcore ?

link not working