Files
gta-v-chaos-mod-custom-scripts/Player/PlayerAnnoyingInvisibleRCVehicle.lua
nathan 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

40 lines
1.4 KiB
Lua

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