File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -67,17 +67,18 @@ AddEventHandler('msk_enginetoggle:Engine', function(isAdmin)
67
67
break
68
68
end
69
69
end
70
- Wait (0 )
71
70
72
71
-- The below is simply to generate a timer for requesting control of entity
73
72
local netTime = 15
74
73
NetworkRequestControlOfEntity (veh )
75
74
while not NetworkHasControlOfEntity (veh ) and netTime > 0 do
76
75
NetworkRequestControlOfEntity (veh )
77
76
Wait (1 )
78
- netTime = netTime - 1
77
+ netTime = netTime - 1
79
78
end
80
79
80
+ if not veh or not DoesEntityExist (veh ) then return end
81
+
81
82
if Config .VehicleKeyChain and (GetResourceState (" VehicleKeyChain" ) == " started" ) then
82
83
local isVehicle , isPlate = false , false
83
84
local isVehicleOrKeyOwner = exports [" VehicleKeyChain" ]:IsVehicleOrKeyOwner (veh )
You can’t perform that action at this time.
0 commit comments