Compare commits

...

17 Commits

Author SHA1 Message Date
45f7650477 Added File / Effect Player/PlayerInvincibleAndNoCops.lua. 2025-10-01 20:21:45 +01:00
f0508a90fd Added File / New Effect:
- Vehs/VehicleDerailTrains
2025-10-01 19:13:19 +01:00
b92c9dcbe6 Added Effect: Express Trains 2025-09-30 23:12:19 +01:00
c3ab0f1a67 Added Effects:
new file:   Peds/PedsSetEveryoneIntoRandomVehicle.lua
	new file:   Player/PlayerBankHeist.lua
	new file:   Player/PlayerTPToLastVehicle.lua
	Modified:   Weather/WeatherCanadian.lua - reversed a True/False Statement to potentially fix a bug that throws around vehicles when the ped gets a snowman spawned on them.
2025-09-28 23:24:33 +01:00
fddffdf168 Make Ped Vision Worse 2025-09-26 13:21:15 +01:00
1de3198f4d Modified Get Off Your Phone Effect 2025-09-26 12:47:21 +01:00
d36de2c28a Created New Effects and Modified Existing Ones:
modified:   Peds/PedsMillenials.lua - Their perception range gets modified too now.
	modified:   Player/PlayerAnnoyingInvisibleRCVehicle.lua - changed so the vehicle does not appear damaged
	new file:   Player/PlayerCantUseVehicles.lua New Effect, the player cant drive so they must now walk.
	modified:   Player/PlayerGetOffYourPhone.lua Implemented a new handler to pick the characters phone correctly
2025-09-26 12:42:21 +01:00
d97b2a7c2c Added Effect Get Off Your Phone 2025-09-26 02:20:46 +01:00
ce8cfdd9d9 Added Time Freeze Effect 2025-09-26 02:16:08 +01:00
8ddc0ead07 Fixed a missing variable 2025-09-24 22:11:38 +01:00
ad36f277cc Modified effects:
- I introduced a system that checks if the player is dead or mid transition to stop visual effects overlaying on unimportant user interfaces.
2025-09-24 22:08:04 +01:00
97f5056620 Added File: WeatherCanadia.lua
- This file contains the ingame effect of  snow and attaching a snowman object model to each npc.
2025-09-24 21:19:11 +01:00
0b830e5eac Added new effects, modified existing ones
new file:   Misc/MiscCleanUp.lua -- cleans up dead entities and vehicles from the world
	new file:   Player/PlayerAnnoyingInvisibleRCVehicle.lua Creates an invisible RC vehicle to track the player
	modified:   Weather/WeatherTrueSnow.lua - Added ability to see snowy footprints
2025-09-23 20:55:14 +01:00
719d11ebd0 added 3 new effects:
new file:   Peds/PedsRainingCatsAndDogs.lua
	new file:   Screen/ScreenBlind.lua
	new file:   Screen/ScreenThreeDeeGlasses.lua
2025-09-23 19:07:38 +01:00
29d8d937fb Modified Two Effects:
modified:   Player/PlayerGetOffYourPhone.lua - changed how the effect handles phone models
	modified:   Weather/WeatherTrueSnow.lua - added an effect incompatible id and removed a semi colon
2025-09-23 17:51:50 +01:00
35b48ab2f8 Added effect + Modified 'Snow Storm' Effect
Changes to be committed:
	new file:   Peds/PedsMillenials.lua
	modified:   Weather/WeatherTrueSnow.lua
2025-09-23 02:37:38 +01:00
f5084d24ae Changes to be committed:
new file:   Player/PlayerAnnoyingRCVehicle.lua
2025-09-23 02:34:38 +01:00
18 changed files with 511 additions and 4 deletions

30
Misc/MiscCleanUp.lua Normal file
View File

@@ -0,0 +1,30 @@
EffectInfo = {
Name = "Clean Up Dead Stuff",
EffectId = "misc_cleanup",
TimedType = "None",
EffectGroup = "None",
EffectCategory = "None"
}
function OnStart()
for _, vehicle in ipairs(GetAllVehicles()) do
if GET_VEHICLE_ENGINE_HEALTH(vehicle) <= -4000 then
DELETE_ENTITY(Holder(vehicle))
end
end
for _, ped in ipairs(GetAllPeds()) do
if ped ~= PLAYER_PED_ID() and IS_PED_DEAD_OR_DYING(ped, false) then
DELETE_ENTITY(Holder(ped))
end
end
end
function OnStop()
end
function OnTick()
end

24
Peds/PedsMillenials.lua Normal file
View File

@@ -0,0 +1,24 @@
EffectInfo = {
Name = "Millenials",
EffectId = "peds_millenials",
TimedType = "Normal",
EffectGroup = "None",
EffectCategory = "None"
}
function OnStart()
end
function OnStop()
end
function OnTick()
for _, ped in ipairs(GetAllPeds()) do
if ped ~= PLAYER_PED_ID() and IS_PED_RUNNING_MOBILE_PHONE_TASK(ped) == false and IS_PED_IN_ANY_VEHICLE(ped, false) == false then
TASK_USE_MOBILE_PHONE(ped, 1, 2)
SET_PED_HIGHLY_PERCEPTIVE(ped, false)
SET_PED_SEEING_RANGE(ped, 0)
end
end
end

View File

@@ -0,0 +1,45 @@
EffectInfo = {
Name = "Its Raining Cats And Dogs",
EffectId = "peds_rainingcatsanddogs",
TimedType = "Normal",
EffectGroup = "_group_spawngeneric",
EffectCategory = "None"
}
function OnStart()
DisplayHelpText("No animals were harmed in this effect.", 8)
test = {"g", "y"}
spawned_animals = {}
end
function OnStop()
end
function OnTick()
animals = {"a_c_cat_01", "a_c_chop", "a_c_husky", "a_c_poodle", "a_c_pug", "a_c_rottweiler_02", "a_c_retriever", "a_c_westy", "a_c_shepherd", "a_c_rottweiler"}
animalModel = GET_HASH_KEY(random_choice(animals))
playerPed = PLAYER_PED_ID()
heading = GET_ENTITY_HEADING(playerPed)
coords = GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, math.random(75), math.random(75), math.random(75))
animal = CreatePoolPed(0, animalModel, coords.x, coords.y, coords.z, heading)
SET_ENTITY_INVINCIBLE(animal, true)
TASK_REACT_AND_FLEE_PED(animal, playerPed)
SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(animal, true)
table.insert(spawned_animals, animal)
WAIT(math.random(1500, 6000))
if #spawned_animals > 50 then
for animal in spawned_animals do
if DOES_ENTITY_EXIST(animal) then
DELETE_ENTITY(Holder(animal))
table.remove(spawned_animals, animal)
end
end
end
end
function random_choice(p1)
choice = p1[math.random(#p1)]
return choice
end

View File

@@ -0,0 +1,31 @@
EffectInfo = {
Name = "Set Everyone Into Random Vehicle",
EffectId = "peds_seteveryoneintorandom",
HideRealNameOnStart = true,
TimedType = "None",
EffectGroup = "_group_trafficspawner",
EffectCategory = "TrafficSpawner"
}
function OnStart()
vehicles = {}
for _, model in ipairs(GetAllVehicleModels()) do
table.insert(vehicles, model)
end
randomVehicle = random_choice(vehicles)
vehicleHash = randomVehicle
SetSurroundingPedsInVehicles(vehicleHash, 0)
end
function OnStop()
end
function OnTick()
end
function random_choice(p1)
choice = p1[math.random(#p1)]
return choice
end

View File

@@ -0,0 +1,39 @@
EffectInfo = {
Name = "Spawn Invisible Annoying RC Vehicle",
EffectId = "player_invisannoyingrcvehicle",
TimedType = "None",
EffectGroup = "None",
EffectCategory = "None"
}
function OnStart()
rcModelHash = GET_HASH_KEY("rcbandito")
driverModelHash = GET_HASH_KEY("A_M_Y_Skater_01")
playerPed = PLAYER_PED_ID()
heading = GET_ENTITY_HEADING(playerPed)
coords = GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0, -75, 0)
rc = CreatePoolVehicle(rcModelHash, coords.x, coords.y, coords.z, heading)
driver = CreatePoolPed(1, driverModelHash, coords.x, coords.y, coords.z+50, heading)
SET_NETWORK_ID_EXISTS_ON_ALL_MACHINES(PED_TO_NET(driver), true)
SET_NETWORK_ID_EXISTS_ON_ALL_MACHINES(VEH_TO_NET(rc), true)
SET_PED_INTO_VEHICLE(driver, rc, -1)
SET_ENTITY_LOAD_COLLISION_FLAG(driver, true, 1)
SET_ENTITY_INVINCIBLE(driver, true, false)
SET_ENTITY_ALPHA(driver, 0, 0)
SET_ENTITY_ALPHA(rc, 0, 0)
SET_VEHICLE_IS_CONSIDERED_BY_PLAYER(rc, false)
SET_VEHICLE_CAN_BE_VISIBLY_DAMAGED(rc, false)
SET_VEHICLE_DOORS_LOCKED_FOR_ALL_PLAYERS(rc, true)
SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(driver, true)
TASK_VEHICLE_MISSION_PED_TARGET(driver, rc, playerPed, 6, 500.0, 786988, 0.0, 0.0, true)
SET_PED_CAN_BE_KNOCKED_OFF_VEHICLE(driver, 1)
SET_MODEL_AS_NO_LONGER_NEEDED(rcModelHash)
SET_MODEL_AS_NO_LONGER_NEEDED(driverModelHash)
end
function OnStop()
end
function OnTick()
end

View File

@@ -0,0 +1,37 @@
EffectInfo = {
Name = "Spawn Annoying RC Vehicle",
EffectId = "player_annoyingrcvehicle",
TimedType = "None",
EffectGroup = "None",
EffectCategory = "None"
}
function OnStart()
rcModelHash = GET_HASH_KEY("rcbandito")
driverModelHash = GET_HASH_KEY("A_M_Y_Skater_01")
playerPed = PLAYER_PED_ID()
heading = GET_ENTITY_HEADING(playerPed)
coords = GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0, -75, 0)
rc = CreatePoolVehicle(rcModelHash, coords.x, coords.y, coords.z, heading)
driver = CreatePoolPed(1, driverModelHash, coords.x, coords.y, coords.z+50, heading)
SET_NETWORK_ID_EXISTS_ON_ALL_MACHINES(PED_TO_NET(driver), true)
SET_NETWORK_ID_EXISTS_ON_ALL_MACHINES(VEH_TO_NET(rc), true)
SET_PED_INTO_VEHICLE(driver, rc, -1)
SET_ENTITY_LOAD_COLLISION_FLAG(driver, true, 1)
SET_ENTITY_INVINCIBLE(driver, true, false)
SET_ENTITY_ALPHA(driver, 0, 0)
SET_VEHICLE_IS_CONSIDERED_BY_PLAYER(vehicle, false)
SET_VEHICLE_DOORS_LOCKED_FOR_ALL_PLAYERS(vehicle, true)
SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(driver, true)
TASK_VEHICLE_MISSION_PED_TARGET(driver, rc, playerPed, 6, 500.0, 786988, 0.0, 0.0, true)
SET_PED_CAN_BE_KNOCKED_OFF_VEHICLE(driver, 1)
SET_MODEL_AS_NO_LONGER_NEEDED(rcModelHash)
SET_MODEL_AS_NO_LONGER_NEEDED(driverModelHash)
end
function OnStop()
end
function OnTick()
end

View File

@@ -0,0 +1,44 @@
EffectInfo = {
Name = "The Big Score",
EffectId = "player_tptoheistlocation",
TimedType = "None",
EffectGroup = "None",
EffectCategory = "None"
}
function OnStart()
EnableScriptThreadBlock()
bankLoc = {22.70556, -744.3594, 43.93562}
vanModel = "burrito4"
vanHash = GET_HASH_KEY(vanModel)
van = CreatePoolVehicle(vanHash, bankLoc[1], bankLoc[2], bankLoc[3], -61) -- translates the table into coords using a simple method
gunManModel = "hc_gunman"
hackerModel = "hc_hacker"
gunManModelHash = GET_HASH_KEY(gunManModel)
hackerModelHash = GET_HASH_KEY(hackerModel)
gunMan = CreatePoolPed(0, gunManModelHash, bankLoc[1], bankLoc[2], bankLoc[3]+20, 0)
SET_PED_INTO_VEHICLE(gunMan, van, -2)
hackerMan = CreatePoolPed(0, hackerModelHash, bankLoc[1], bankLoc[2], bankLoc[3]+20, 0)
SET_PED_INTO_VEHICLE(hackerMan, van, -2)
SET_PED_INTO_VEHICLE(PLAYER_PED_ID(), van, -1)
if GET_PLAYER_WANTED_LEVEL(PLAYER_ID()) < 3 then
SET_PLAYER_WANTED_LEVEL(PLAYER_ID(), 3, 0)
SET_PLAYER_WANTED_LEVEL_NOW(PLAYER_ID(), 0)
end
DisableScriptThreadBlock()
end
function OnStop()
end
function OnTick()
end

View File

@@ -0,0 +1,31 @@
EffectInfo = {
Name = "Guess im walking then",
EffectId = "player_cantusevehicles",
TimedType = "Normal",
EffectGroup = "None",
EffectCategory = "None"
}
function OnStart()
end
function OnStop()
for _, vehicle in ipairs(GetAllVehicles()) do
SET_VEHICLE_IS_CONSIDERED_BY_PLAYER(vehicle, true)
SET_VEHICLE_DOORS_LOCKED_FOR_ALL_PLAYERS(vehicle, false)
end
end
function OnTick()
playerPed = PLAYER_PED_ID()
for _, vehicle in ipairs(GetAllVehicles()) do
SET_VEHICLE_IS_CONSIDERED_BY_PLAYER(vehicle, false)
SET_VEHICLE_DOORS_LOCKED_FOR_ALL_PLAYERS(vehicle, true)
end
if IS_PED_SITTING_IN_ANY_VEHICLE(playerPed, false) then
playerVeh = GET_VEHICLE_PED_IS_USING(playerPed)
TASK_LEAVE_VEHICLE(playerPed, playerVeh, 16)
end
end

View File

@@ -11,10 +11,21 @@ function OnStart()
end
function OnStop()
if IS_MOBILE_PHONE_CALL_ONGOING() then return end
DESTROY_MOBILE_PHONE()
end
function OnTick()
playerPed = PLAYER_PED_ID()
if IS_PAUSE_MENU_ACTIVE() or IS_PLAYER_SWITCH_IN_PROGRESS() or IS_PLAYER_DEAD(PLAYER_ID()) or DOES_ENTITY_EXIST(playerPed) ~= true then return end
CREATE_MOBILE_PHONE(0)
if not DOES_ENTITY_EXIST(playerPed) or IS_PLAYER_SWITCH_IN_PROGRESS() or IS_PED_DEAD_OR_DYING(playerPed,0) then return end
phoneType = 0
if IS_PED_MODEL(playerPed, GET_HASH_KEY("player_two")) then
phoneType = 1
end
if IS_PED_MODEL(playerPed, GET_HASH_KEY("player_one")) then
phoneType = 2
end
CREATE_MOBILE_PHONE(phoneType)
end

View File

@@ -0,0 +1,25 @@
EffectInfo = {
Name = "Invincible And No Wanted Level",
EffectId = "player_invincandnocops",
TimedType = "Normal",
EffectGroup = "None",
EffectCategory = "None"
}
function OnStart()
end
function OnStop()
SET_MAX_WANTED_LEVEL(5)
SET_PLAYER_INVINCIBLE(0, false)
end
function OnTick()
playerPed = PLAYER_PED_ID()
if DOES_ENTITY_EXIST(playerPed) and not IS_PED_DEAD_OR_DYING(playerPed,0) then
SET_MAX_WANTED_LEVEL(0)
SET_PLAYER_INVINCIBLE(0, true)
end
end

View File

@@ -0,0 +1,22 @@
EffectInfo = {
Name = "Teleport to last used vehicle",
EffectId = "player_tptolastveh",
TimedType = "None",
EffectGroup = "None",
EffectCategory = "None"
}
function OnStart()
playerPed = PLAYER_PED_ID()
vehicle = GET_LAST_DRIVEN_VEHICLE()
if DOES_ENTITY_EXIST(vehicle) and IS_PED_DEAD_OR_DYING(playerPed,0) then
SET_PED_INTO_VEHICLE(playerPed, vehicle, -1)
end
end
function OnStop()
end
function OnTick()
end

20
Screen/ScreenBlind.lua Normal file
View File

@@ -0,0 +1,20 @@
EffectInfo = {
Name = "Blindness",
EffectId = "screen_blindness",
TimedType = "Short",
EffectGroup = "_group_shader",
EffectCategory = "Shader",
}
function OnStart()
end
function OnStop()
end
function OnTick()
playerPed = PLAYER_PED_ID()
if not DOES_ENTITY_EXIST(playerPed) or IS_PLAYER_SWITCH_IN_PROGRESS() or IS_PED_DEAD_OR_DYING(playerPed,0) then return end
DRAW_RECT(0.5, 0.5, 1.0, 1.0, 0, 0, 0, 255)
end

View File

@@ -0,0 +1,23 @@
EffectInfo = {
Name = "3D Glasses",
EffectId = "screen_threedeeglasses",
TimedType = "Normal",
EffectGroup = "_group_shader",
EffectCategory = "Shader",
}
function OnStart()
end
function OnStop()
SET_FOLLOW_PED_CAM_VIEW_MODE(1)
end
function OnTick()
playerPed = PLAYER_PED_ID()
if not DOES_ENTITY_EXIST(playerPed) or IS_PLAYER_SWITCH_IN_PROGRESS() or IS_PED_DEAD_OR_DYING(playerPed,0) then return end
DRAW_RECT(1.0, 0.5, 1.0, 1.0, 0, 0, 255, 168)
DRAW_RECT(0.0, 0.5, 1.0, 1.0, 255, 0, 0, 168)
SET_FOLLOW_PED_CAM_VIEW_MODE(4)
end

21
Time/TimeFreeze.lua Normal file
View File

@@ -0,0 +1,21 @@
EffectInfo = {
Name = "Freeze Clock Time",
EffectId = "time_freezeclock",
TimedType = "Normal",
EffectGroup = "None",
EffectCategory = "None"
}
function OnStart()
end
function OnStop()
PAUSE_CLOCK(false)
end
function OnTick()
PAUSE_CLOCK(true)
end

View File

@@ -0,0 +1,31 @@
EffectInfo = {
Name = "Derail Trains",
EffectId = "vehs_derailtrains",
TimedType = "Normal",
EffectGroup = "_group_trafficspawner",
EffectCategory = "None"
IncompatibleIds = {
"vehs_expresstrains",
}
}
function OnStart()
end
function OnStop()
for _, vehicle in ipairs(GetAllVehicles()) do
if GET_VEHICLE_CLASS(vehicle) == 21 then
SET_RENDER_TRAIN_AS_DERAILED(vehicle, false)
end
end
end
function OnTick()
SET_RANDOM_TRAINS(true)
for _, vehicle in ipairs(GetAllVehicles()) do
if GET_VEHICLE_CLASS(vehicle) == 21 then
SET_TRAIN_SPEED(vehicle, 0.0)
SET_RENDER_TRAIN_AS_DERAILED(vehicle, true)
end
end
end

View File

@@ -0,0 +1,23 @@
EffectInfo = {
Name = "Express Trains",
EffectId = "vehs_expresstrains",
TimedType = "Normal",
EffectGroup = "_group_trafficspawner",
EffectCategory = "None"
}
function OnStart()
end
function OnStop()
end
function OnTick()
SET_RANDOM_TRAINS(true)
for _, vehicle in ipairs(GetAllVehicles()) do
if GET_VEHICLE_CLASS(vehicle) == 21 then
SET_TRAIN_SPEED(vehicle, 9999.0)
end
end
end

View File

@@ -0,0 +1,42 @@
EffectInfo = {
Name = "Welcome to Canada eh?",
EffectId = "weather_canadian",
TimedType = "Normal",
EffectGroup = "_group_weatherchange",
EffectCategory = "None",
IncompatibleIds = {
"world_snow",
"weather_snowstorm"
}
}
function OnStart()
snowMen = {}
snowManModel = "prop_prlg_snowpile"
snowManModelhash = GET_HASH_KEY(snowManModel)
LoadModel(snowManModelhash)
end
function OnStop()
SetSnowState(false)
USE_SNOW_FOOT_VFX_WHEN_UNSHELTERED(false)
end
function OnTick()
SetSnowState(true)
for _, ped in ipairs(GetAllPeds()) do
if DOES_ENTITY_EXIST(ped) and not IS_PED_DEAD_OR_DYING(ped, false) and snowMen[ped] ~= true then
--
coords = GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(ped, 0, 0, 50)
snowManProp = CreatePoolProp(snowManModelhash, coords.x, coords.y, coords.z, false)
SET_ENTITY_COLLISION(snowManProp, false, false)
ATTACH_ENTITY_TO_ENTITY(snowManProp, ped, GET_PED_BONE_INDEX(ped, 0x0), 0, 0, 0, 0, 0, 0, false, false, false, false, 0, true)
snowMen[ped] = true -- allows me to internally track which ped has a snowman attached to them to prevent spawning duplicates and causing a memory crash
end
end
USE_SNOW_FOOT_VFX_WHEN_UNSHELTERED(true)
end

View File

@@ -3,12 +3,18 @@ EffectInfo = {
EffectId = "weather_snowstorm",
TimedType = "Normal",
EffectGroup = "_group_weatherchange",
EffectCategory = "Shader"
EffectCategory = "Shader",
IncompatibleIds = {
"world_snow",
"weather_canadian"
}
}
function OnStart()
REQUEST_CLIP_SET("move_f@injured")
snowyaseaHash = GET_HASH_KEY("asea2")
SetSurroundingPedsInVehicles(snowyaseaHash, 0)
end
function OnStop()
@@ -16,6 +22,7 @@ function OnStop()
SET_TIMECYCLE_MODIFIER_STRENGTH(1.0) -- reset the timecycle strength for any effects that require it but do not modify the strength by themselves.
CLEAR_TIMECYCLE_MODIFIER()
SET_WEATHER_TYPE_NOW("CLEAR")
USE_SNOW_FOOT_VFX_WHEN_UNSHELTERED(false)
end
function OnTick()
@@ -25,7 +32,8 @@ function OnTick()
SET_TIMECYCLE_MODIFIER_STRENGTH(0.6)
for _, ped in ipairs(GetAllPeds()) do
if ped ~= PLAYER_PED_ID() then
SET_PED_MOVEMENT_CLIPSET(ped, "move_f@injured", 1.0);
SET_PED_MOVEMENT_CLIPSET(ped, "move_f@injured", 1.0)
end
end
USE_SNOW_FOOT_VFX_WHEN_UNSHELTERED(true)
end