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
This commit is contained in:
2025-09-23 20:55:14 +01:00
parent 719d11ebd0
commit 0b830e5eac
4 changed files with 71 additions and 1 deletions

View File

@@ -0,0 +1,38 @@
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(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