[FREE][ESX][QBCore] Wasabi's Halloween Event [UPDATED 10/10/23]

I’d call that a sync feature rather than problem.

Yeah got the same Problem. Is there anyway to change that?

No but tbh I now like the way it is. Gives people something to fight over lmao.

1 Like

I’ve added more housing for people loot if you want to use them. In vinewood hills

[46] = vec3(-824.6912, 422.1172, 92.12418),
	[47] = vec3(-762.098, 430.988, 100.1969),
	[48] = vec3(-784.3112, 459.0379, 100.1791),
	[49] = vec3(-717.9176, 449.0835, 106.9091),
	[50] = vec3(-721.6775, 490.0913, 109.3855),
	[51] = vec3(-678.9091, 511.6914, 113.526),
	[52] = vec3(-667.1612, 471.8701, 114.1365),
	[53] = vec3(-640.8442, 519.7015, 109.6878),
	[54] = vec3(-622.8088, 489.1974, 108.8573),
	[55] = vec3(-595.4384, 530.1559, 107.7552),
	[56] = vec3(-580.4532, 491.8499, 108.9029),
	[57] = vec3(-526.9787, 517.4584, 112.9416),
	[58] = vec3(-554.582, 540.9244, 110.7071),
	[59] = vec3(-537.0079, 477.4941, 103.1936),
	[60] = vec3(-560.9957, 402.8458, 101.8053),
	[61] = vec3(-595.6108, 393.3641, 101.8825),
	[62] = vec3(-615.3188, 398.5717, 101.6268),
	[63] = vec3(-516.9315, 433.2578, 97.80772),
	[64] = vec3(-476.5466, 412.8358, 103.1219),
	[65] = vec3(-469.4184, 329.2477, 104.7472),
	[66] = vec3(-444.2829, 343.6735, 105.4383),
	[67] = vec3(-409.4959, 341.3977, 108.9074),
	[68] = vec3(-371.8014, 343.744, 109.9427),
	[69] = vec3(-328.2601, 370.1221, 110.0171),
	[70] = vec3(-297.7348, 379.9143, 112.0954),
	[71] = vec3(-305.0964, 379.0832, 109.9168),
	[72] = vec3(-239.5455, 381.6348, 112.4278),
	[73] = vec3(-214.2698, 400.5247, 111.1085),
	[74] = vec3(-305.2688, 431.8569, 110.3089),
	[75] = vec3(-400.6251, 427.3238, 112.3414),
	[76] = vec3(-519.8761, 594.4243, 120.8367),
	[77] = vec3(-474.7575, 585.9112, 128.6834),
	[78] = vec3(-500.6234, 552.4281, 120.5914),
	[79] = vec3(-459.1504, 537.3895, 121.4578),
	[80] = vec3(-418.2967, 568.7051, 125.06),
	[81] = vec3(-386.7951, 504.3611, 120.4127),
	[82] = vec3(-378.0353, 548.3048, 123.8508),
	[83] = vec3(-230.3321, 488.2676, 128.7681),
	[84] = vec3(-174.6284, 502.7007, 137.4206),
	[85] = vec3(-109.8777, 502.0844, 143.4788),
	[86] = vec3(-66.46829, 490.5186, 144.6903),
	[87] = vec3(-74.34037, 494.8591, 144.0917),
	[88] = vec3(-7.803519, 468.208, 145.8632),
	[89] = vec3(43.06358, 468.7275, 148.0959),
	[90] = vec3(57.83124, 450.0096, 147.0314),
	[91] = vec3(79.86884, 486.19, 148.2017),
	[92] = vec3(-126.4057, 588.9896, 204.5169),
	[93] = vec3(-188.9572, 591.556, 197.8231),
	[94] = vec3(-189.4451, 618.1754, 199.6612),
	[95] = vec3(-199.5043, 612.2956, 195.6473),
	[96] = vec3(-232.5994, 588.4175, 190.5363),
	[97] = vec3(-293.4847, 600.9558, 181.5756),
	[98] = vec3(-307.8946, 643.337, 176.1312),
	[99] = vec3(-339.8918, 668.7012, 172.7842),
	[100] = vec3(-400.0835, 665.0366, 163.8303),
2 Likes

Nice script , I see you can only loot houses one time , any chance you can do it so after so long it adds the houses back like a hour cooldown on each house?

Also a nice feature to add would be for a change to get a Halloween ticket , where they can redeem the Halloween tickets for items , vehicles for how many tickets you set the items or vehicles you add to a npc ticket vender.

This is great! It’d be funny if there was a random chance for a dog to randomly attack you ahahhaha

Update (Version 1.0.3) - 10/21/2022

  • 54 more default houses added to config (Thanks Lennya94)
  • Option to let everyone trick-or-treat every house(See new config)
  • One of the peds causing error in ox_lib patched
  • Formatting of updater.lua
1 Like

Grove Street Houses Config

[101] = vec3(-34.035636901855, -1847.2677001953, 26.193517684937),
[102] = vec3(-20.66693687439, -1858.7166748047, 25.408672332764),
[103] = vec3(21.013378143311, -1844.4187011719, 24.601734161377),
[104] = vec3(-4.8931722640991, -1872.109375, 24.151016235352),
[105] = vec3(5.0542683601379, -1884.2237548828, 23.697267532349),
[106] = vec3(45.982795715332, -1864.2603759766, 23.278301239014),
[107] = vec3(23.289144515991, -1896.6623535156, 22.965877532959),
[108] = vec3(39.174945831299, -1911.7375488281, 21.953496932983),
[109] = vec3(56.710884094238, -1922.6340332031, 21.911066055298),
[110] = vec3(72.294219970703, -1938.9985351563, 21.369119644165),
[111] = vec3(76.244407653809, -1948.2615966797, 21.174133300781),
[112] = vec3(85.894096374512, -1959.4940185547, 21.121673583984),
[113] = vec3(114.35620880127, -1961.0100097656, 21.334175109863),
[114] = vec3(126.81433105469, -1929.8228759766, 21.382415771484),
[115] = vec3(126.81433105469, -1929.8228759766, 21.382415771484),
[116] = vec3(118.23268127441, -1920.9901123047, 21.323425292969),
[117] = vec3(100.98261260986, -1912.2362060547, 21.407423019409),
2 Likes

Nice one mate. <3

I’ll add them now to main thank you so much.

1 Like

Couple extra features for QOL added

@wasabirobby i send a pull request for fix a little sintaxe error you have left

I looked and don’t see a PR. But thank you, if you send the PR, I will merge.

Check now… I thought i did made the pull request yesterday lol

Hello,ive updates the script recently & now getting this error

Think this is the remaining Mirror Park houses. Going to do some more around the city tomorrow.

	-- Mirror Park
	[101] = vec3(1229.5832519531,-725.26434326172,60.956657409668),
	[102] = vec3(1220.8118896484,-689.466796875,61.103145599365),
	[103] = vec3(1221.5697021484,-669.27984619141,63.690830230713),
	[104] = vec3(1207.3731689453,-620.27484130859,66.438583374023),
	[105] = vec3(1203.5927734375,-598.47418212891,68.063537597656),
	[106] = vec3(1200.9366455078,-575.50549316406,69.139083862305),
	[107] = vec3(1204.8616943359,-557.66741943359,69.615173339844),
	[108] = vec3(1241.2969970703,-566.19866943359,69.657348632813),
	[109] = vec3(1240.6032714844,-601.66009521484,69.782669067383),
	[110] = vec3(1250.8636474609,-620.89782714844,69.571441650391),
	[111] = vec3(1265.7038574219,-648.37408447266,67.921478271484),
	[112] = vec3(1270.9562988281,-683.58239746094,66.031585693359),
	[113] = vec3(1265.0379638672,-702.83325195313,64.707984924316),
	[114] = vec3(1250.9078369141,-515.38348388672,69.348937988281), 
	[115] = vec3(1251.4597167969,-494.19158935547,69.906852722168),
	[116] = vec3(1259.6677246094,-480.28167724609,70.188758850098),
	[117] = vec3(1265.6547851563,-458.16033935547,70.516960144043),
	[118] = vec3(1262.3498535156,-429.87109375,70.015113830566),
	--MIRROR PARK MLO HOUSES (Take these out if you have the culdesac MLOS)
	[119] = vec3(1303.1251220703,-527.36126708984,71.460662841797),
	[120] = vec3(1328.552734375,-536.01501464844,72.440811157227),
	[121] = vec3(1348.3588867188,-546.794921875,73.891609191895),
	[122] = vec3(1373.2170410156,-555.75177001953,74.685646057129),
	[123] = vec3(1388.9946289063,-569.3818359375,74.496490478516),
	[124] = vec3(1386.2288818359,-593.45086669922,74.485397338867),
	[125] = vec3(1367.3099365234,-606.63177490234,74.710884094238),
	[126] = vec3(1341.3173828125,-597.40454101563,74.70092010498),
	[127] = vec3(1323.5322265625,-583.22033691406,73.246482849121),
	[128] = vec3(1301.1005859375,-574.24920654297,71.732231140137),

Hello, would it be possible to give a player a cooldown after he can go to the next house?

Hello, I have added a cooldown feature for you. To implement it, you need to make the following changes:

  1. In your client.lua, add the following code snippet at the end:
RegisterNetEvent('wasabi_halloween:addBlip')
AddEventHandler('wasabi_halloween:addBlip', function(house)
    -- Code to re-add the blip for the specified house
    blips[house] = CreateBlip(Config.Houses[house], 40, 81, Strings.blip_string, 0.65)
end)
  1. In your server.lua, at the top, below local framework = nil, add the line:
local isBlipadded = false
  1. Modify the wasabi_halloween:canKnock callback as follows:
lib.callback.register('wasabi_halloween:canKnock', function(source, house)
    local currentTime = os.time()

    if Config.onePlayerPerHouse then
        if houses[house] and (currentTime - houses[house].lastKnocked <= Config.knockCooldown) then
            return false
        else
            houses[house] = { lastKnocked = currentTime }
            return true
        end
    else
        local license = getRockstarLicense(source)
        if houses[house] and houses[house][license] and (currentTime - houses[house][license].lastKnocked <= Config.knockCooldown) then
            return false
        else
            if not houses[house] then houses[house] = {} end
            houses[house][license] = { lastKnocked = currentTime }
            return true
        end
    end
end)
  1. Add the following function and thread right below the framework check:
CreateThread(function()
    while true do
        Wait(5000)  -- Check every 5 seconds
        local currentTime = os.time()
        for house, data in pairs(houses) do
            local lastKnocked = data.lastKnocked
            if lastKnocked and currentTime - lastKnocked >= Config.knockCooldown and not isBlipadded then
                -- Cooldown has expired, re-add the blip
                TriggerClientEvent('wasabi_halloween:addBlip', -1, house)
                isBlipadded = true  -- Optional, remove the timestamp
            end
        end
    end
end)

-- Function to check and update knock status
function canKnock(houseId)
    local currentTime = os.time()

    -- Check if the house is in the list and the time has elapsed
    if houses[houseId] and (currentTime - houses[houseId].lastKnocked > 300) then
        houses[houseId].canKnock = true
    end

    -- Check if knocking is allowed
    if not houses[houseId] or houses[houseId].canKnock then
        -- Update time and status
        houses[houseId] = { lastKnocked = currentTime, canKnock = false }
        return true
    else
        return false
    end
end
  1. Finally, add this line to your config.lua:
Config.knockCooldown = 900; -- Cooldown in seconds

Now, the cooldown you set in the config will work as expected.

2 Likes

thx dude! <3 Top

1 Like