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
This commit is contained in:
@@ -22,8 +22,9 @@ function OnStart()
|
||||
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_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)
|
||||
|
31
Player/PlayerCantUseVehicles.lua
Normal file
31
Player/PlayerCantUseVehicles.lua
Normal 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
|
@@ -16,7 +16,14 @@ 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
|
||||
if not IS_PED_RUNNING_MOBILE_PHONE_TASK(playerPed) then
|
||||
TASK_USE_MOBILE_PHONE_TIMED(playerPed, 60)
|
||||
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
|
||||
|
Reference in New Issue
Block a user