Spawn System
Here you can find the installation for cas-spawn script.
About Spawn System
📄 VORP Core Integration Instructions
✏️ Steps
TriggerEvent("vorp:initCharCustom", coords, heading, isdead)🛠️ Example: Full Modified vorp:initCharacter
vorp:initCharacterRegisterNetEvent('vorp:initCharacter')
AddEventHandler('vorp:initCharacter', function(coords, heading, isdead)
CoreAction.Player.TeleportToCoords(coords, heading)
if isdead then
if not Config.CombatLogDeath then
if Config.Loadinscreen then
Citizen.InvokeNative(0x1E5B70E53DB661E5, 0, 0, 0, T.forcedrespawn, T.forced, T.Almost)
end
SetEntityCanBeDamaged(PlayerPedId(), true)
CoreAction.Player.RespawnPlayer()
Wait(Config.LoadinScreenTimer)
Wait(1000)
ShutdownLoadingScreen()
Wait(5000)
else
if Config.Loadinscreen then
Citizen.InvokeNative(0x1E5B70E53DB661E5, 0, 0, 0, T.Holddead, T.Loaddead, T.Almost)
end
Wait(10000)
TriggerEvent("vorp_inventory:CloseInv")
Wait(4000)
SetEntityCanBeDamaged(PlayerPedId(), true)
SetEntityHealth(PlayerPedId(), 0, 0)
Citizen.InvokeNative(0xC6258F41D86676E0, PlayerPedId(), 0, -1)
ShutdownLoadingScreen()
end
else
local PlayerId = PlayerId()
if Config.Loadinscreen then
if Config.LoadingScreenPlayerInfo then
Citizen.InvokeNative(0x1E5B70E53DB661E5, 0, 0, 0, LocalPlayer.state.Character.FirstName .. " " .. LocalPlayer.state.Character.LastName, "Job: " .. LocalPlayer.state.Character.JobLabel)
else
Citizen.InvokeNative(0x1E5B70E53DB661E5, 0, 0, 0, T.Hold, T.Load, T.Almost)
end
Wait(Config.LoadinScreenTimer)
Wait(1000)
ShutdownLoadingScreen()
end
if not Config.HealthRecharge.enable then
Citizen.InvokeNative(0x8899C244EBCF70DE, PlayerId, 0.0)
else
Citizen.InvokeNative(0x8899C244EBCF70DE, PlayerId, Config.HealthRecharge.multiplier)
multiplierHealth = Citizen.InvokeNative(0x22CD23BB0C45E0CD, PlayerId)
end
if not Config.StaminaRecharge.enable then
Citizen.InvokeNative(0xFECA17CF3343694B, PlayerId, 0.0)
else
Citizen.InvokeNative(0xFECA17CF3343694B, PlayerId, Config.StaminaRecharge.multiplier)
multiplierStamina = Citizen.InvokeNative(0x617D3494AD58200F, PlayerId)
end
SetEntityCanBeDamaged(PlayerPedId(), true)
if Config.SavePlayersStatus then
TriggerServerEvent("vorp:GetValues")
Wait(200)
if HealthData then
local player = PlayerPedId()
Citizen.InvokeNative(0xC6258F41D86676E0, player, 0, HealthData.hInner or 600)
SetEntityHealth(player, (HealthData.hOuter and HealthData.hOuter > 0 and HealthData.hOuter or 600) + (HealthData.hInner and HealthData.hInner > 0 and HealthData.hInner or 600), 0)
Citizen.InvokeNative(0xC6258F41D86676E0, player, 1, HealthData.sInner or 600)
Citizen.InvokeNative(0x675680D089BFA21F, player, (HealthData.sOuter or (1065353215 * 100)) / 1065353215 * 100)
end
HealthData = {}
else
CoreAction.Admin.HealPlayer()
end
end
SetTimeout(2000, function()
DoScreenFadeIn(4000)
repeat Wait(500) until IsScreenFadedIn()
end)
-- 🧩 ADD THIS LINE AT THE END
TriggerEvent("vorp:initCharCustom", coords, heading, isdead)
end)📌 Important Notes
Installation
Configuration

Last updated
