New Player & Anti troll
Here you can find the installation for cas-newplayer script.
About Script
With our New Player Limit Script, fresh players will have restrictions preventing them from shooting or taking hostile actions against others until theyβve spent enough time in the game. This ensures a fair and safe environment for everyone, especially newcomers.
π VORP Core Integration Instructions
To integrate with vorp_core
, you need to modify the vorp_core/client/spawnplayer.lua
file.
Specifically, you must extend the existing vorp:initCharacter
event to include the custom character initialization.
Hereβs how to do it properly:
βοΈ Steps
Locate the
vorp:initCharacter
event handler insidevorp_core/client/spawnplayer.lua
.At the very end of the
vorp:initCharacter
function, add the following trigger:
TriggerEvent("vorp:initCharCustom", coords, heading, isdead)
This ensures your custom initialization runs after the player has fully loaded.
π οΈ Example: Full Modified vorp:initCharacter
vorp:initCharacter
RegisterNetEvent('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
Do not replace the existing
vorp:initCharacter
logic.Only add
TriggerEvent("vorp:initCharCustom", coords, heading, isdead)
at the very end of the handler.This ensures compatibility with VORP Core and adds your custom handling without breaking the default flow.
Installation
Plug & play
Configuration

Last updated