mirror of
https://github.com/citizenfx/cfx-server-data.git
synced 2025-12-12 06:14:09 +01:00
initial
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
-- triggers an event when the local network player becomes active
|
||||
AddEventHandler('sessionInitialized', function()
|
||||
local playerId = GetPlayerId()
|
||||
|
||||
-- create a looping thread
|
||||
CreateThread(function()
|
||||
-- wait until the player becomes active
|
||||
while not IsNetworkPlayerActive(playerId) do
|
||||
Wait(0)
|
||||
end
|
||||
|
||||
-- set some defaults
|
||||
AllowGameToPauseForStreaming(true)
|
||||
|
||||
SetMaxWantedLevel(6)
|
||||
SetWantedMultiplier(0.9999999)
|
||||
SetCreateRandomCops(true)
|
||||
SetDitchPoliceModels(false)
|
||||
|
||||
DisplayPlayerNames(true)
|
||||
NetworkSetHealthReticuleOption(true)
|
||||
|
||||
-- trigger an event on both the local client and the server
|
||||
TriggerEvent('playerActivated')
|
||||
TriggerServerEvent('playerActivated')
|
||||
end)
|
||||
end)
|
||||
Reference in New Issue
Block a user