-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix+refactor:( fix spawn ped smaller rebuild)
- Loading branch information
1 parent
1d3263f
commit 22d0d99
Showing
1 changed file
with
19 additions
and
8 deletions.
There are no files selected for viewing
27 changes: 19 additions & 8 deletions
27
server-data/resources/[bpt_addons]/bpt_ped/client/main.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,20 @@ | ||
-- Digital Store | ||
Citizen.CreateThread(function() | ||
|
||
local ped = CreatePed(4, GetHashKey("s_f_y_clubbar_01"), 383.762634, -826.681335, 28.300000, false, true) | ||
FreezeEntityPosition(ped, true) | ||
SetEntityHeading(ped, 260.0 ) | ||
SetEntityInvincible(ped, true) | ||
SetBlockingOfNonTemporaryEvents(ped, true) | ||
Citizen.CreateThread(function() -- Example | ||
|
||
local ped_hash = 0x5B3BD90D -- Ped Hash | ||
local ped_coords = { x = 383.762634, y = -826.681335, z = 28.300000, h = 260.0 } -- Ped Coords | ||
|
||
RequestModel(ped_hash) | ||
while not HasModelLoaded(ped_hash) do | ||
Citizen.Wait(1) | ||
end | ||
|
||
ped_info = CreatePed(1, ped_hash, ped_coords.x, ped_coords.y, ped_coords.z, ped_coords.h, false, true) | ||
SetBlockingOfNonTemporaryEvents(ped_info, true) -- Don't Change | ||
SetPedDiesWhenInjured(ped_info, false) -- Can Die? | ||
SetPedCanPlayAmbientAnims(ped_info, true) -- Don't Change | ||
SetPedCanRagdollFromPlayerImpact(ped_info, false) -- Ped Fall Down | ||
SetEntityInvincible(ped_info, true) -- Ped Invincible | ||
FreezeEntityPosition(ped_info, true) -- Don't Change | ||
TaskStartScenarioInPlace(ped_info, "WORLD_HUMAN_COP_IDLES", 0, true); -- Ped Anim | ||
|
||
end) |