Skip to content

Commit

Permalink
Merge pull request #120 from NeenGame/master
Browse files Browse the repository at this point in the history
Fix native and update native names
  • Loading branch information
Bob74 committed Jan 10, 2023
2 parents 3849820 + b2c0671 commit 9ea2c5d
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 43 deletions.
4 changes: 2 additions & 2 deletions dlc_afterhours/nightclubs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ AfterHoursNightclubs = {

Enable = function(trophy, state, color, refresh)
SetIplPropState(AfterHoursNightclubs.interiorId, trophy, state, refresh)
SetInteriorPropColor(AfterHoursNightclubs.interiorId, trophy, color)
SetInteriorEntitySetColor(AfterHoursNightclubs.interiorId, trophy, color)
end
},
DryIce = {
Expand Down Expand Up @@ -291,7 +291,7 @@ AfterHoursNightclubs = {
end

for key, emitter in pairs(AfterHoursNightclubs.Interior.DryIce.Emitters) do
UseParticleFxAssetNextCall("scr_ba_club")
UseParticleFxAsset("scr_ba_club")
StartParticleFxLoopedAtCoord("scr_ba_club_smoke_machine", emitter.pos.x, emitter.pos.y, emitter.pos.z, emitter.rot.x, emitter.rot.y, emitter.rot.z, AfterHoursNightclubs.Interior.DryIce.scale, false, false, false, true)
end
else
Expand Down
4 changes: 2 additions & 2 deletions dlc_bikers/clubhouse1.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ BikerClubhouse1 = {
BikerClubhouse1.Walls.Clear(false)

SetIplPropState(BikerClubhouse1.interiorId, walls, true, refresh)
SetInteriorPropColor(BikerClubhouse1.interiorId, walls, color)
SetInteriorEntitySetColor(BikerClubhouse1.interiorId, walls, color)
end,
Clear = function(refresh)
SetIplPropState(BikerClubhouse1.interiorId, {
Expand All @@ -63,7 +63,7 @@ BikerClubhouse1 = {
BikerClubhouse1.Furnitures.Clear(false)

SetIplPropState(BikerClubhouse1.interiorId, furn, true, refresh)
SetInteriorPropColor(BikerClubhouse1.interiorId, furn, color)
SetInteriorEntitySetColor(BikerClubhouse1.interiorId, furn, color)
end,
Clear = function(refresh)
SetIplPropState(BikerClubhouse1.interiorId, {
Expand Down
6 changes: 3 additions & 3 deletions dlc_bikers/clubhouse2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ BikerClubhouse2 = {
BikerClubhouse2.Walls.Clear(false)

SetIplPropState(BikerClubhouse2.interiorId, walls, true, refresh)
SetInteriorPropColor(BikerClubhouse2.interiorId, walls, color)
SetInteriorEntitySetColor(BikerClubhouse2.interiorId, walls, color)
end,
Clear = function(refresh)
SetIplPropState(BikerClubhouse2.interiorId, {
Expand All @@ -55,7 +55,7 @@ BikerClubhouse2 = {

SetColor = function(color, refresh)
SetIplPropState(BikerClubhouse2.interiorId, BikerClubhouse2.LowerWalls.default, true, refresh)
SetInteriorPropColor(BikerClubhouse2.interiorId, BikerClubhouse2.LowerWalls.default, color)
SetInteriorEntitySetColor(BikerClubhouse2.interiorId, BikerClubhouse2.LowerWalls.default, color)
end,
},
Furnitures = {
Expand Down Expand Up @@ -83,7 +83,7 @@ BikerClubhouse2 = {
BikerClubhouse2.Furnitures.Clear(false)

SetIplPropState(BikerClubhouse2.interiorId, furn, true, refresh)
SetInteriorPropColor(BikerClubhouse2.interiorId, furn, color)
SetInteriorEntitySetColor(BikerClubhouse2.interiorId, furn, color)
end,
Clear = function(refresh)
SetIplPropState(BikerClubhouse2.interiorId, {
Expand Down
22 changes: 11 additions & 11 deletions dlc_bikers/gang.lua
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ BikerGang = {
ReleaseNamedRendertarget(GetHashKey(BikerGang.Clubhouse.ClubName.target))
end

if HasNamedScaleformMovieLoaded(BikerGang.Clubhouse.ClubName.movieId) then
if HasScaleformMovieFilenameLoaded(BikerGang.Clubhouse.ClubName.movieId) then
SetScaleformMovieAsNoLongerNeeded(BikerGang.Clubhouse.ClubName.movieId)
end

Expand Down Expand Up @@ -356,25 +356,25 @@ BikerGang = {
SelectMission = function(position)
if BikerGang.Clubhouse.MissionsWall.movieId ~= -1 then
BeginScaleformMovieMethod(BikerGang.Clubhouse.MissionsWall.movieId, "SET_SELECTED_MISSION")
PushScaleformMovieMethodParameterInt(position) -- Mission index 0 to 2 (-1 = no mission)
ScaleformMovieMethodAddParamInt(position) -- Mission index 0 to 2 (-1 = no mission)
EndScaleformMovieMethod()
end
end,
SetMission = function(position, title, desc, textDict, x, y)
if BikerGang.Clubhouse.MissionsWall.needToLoad then
if not HasNamedScaleformMovieLoaded(BikerGang.Clubhouse.MissionsWall.movieId) then
if not HasScaleformMovieFilenameLoaded(BikerGang.Clubhouse.MissionsWall.movieId) then
BikerGang.Clubhouse.MissionsWall.movieId = LoadScaleform("BIKER_MISSION_WALL")
end

if BikerGang.Clubhouse.MissionsWall.movieId ~= -1 then
if position > -1 then
BeginScaleformMovieMethod(BikerGang.Clubhouse.MissionsWall.movieId, "SET_MISSION")
PushScaleformMovieMethodParameterInt(position) -- Mission index 0 to 2 (-1 = no mission)
PushScaleformMovieMethodParameterString(title)
PushScaleformMovieMethodParameterString(desc)
PushScaleformMovieMethodParameterButtonName(textDict)
PushScaleformMovieMethodParameterFloat(x) -- Mission 0: world coordinates X
PushScaleformMovieMethodParameterFloat(y) -- Mission 0: world coordinates Y
ScaleformMovieMethodAddParamInt(position) -- Mission index 0 to 2 (-1 = no mission)
ScaleformMovieMethodAddParamTextureNameString(title)
ScaleformMovieMethodAddParamTextureNameString(desc)
ScaleformMovieMethodAddParamPlayerNameString(textDict)
ScaleformMovieMethodAddParamFloat(x) -- Mission 0: world coordinates X
ScaleformMovieMethodAddParamFloat(y) -- Mission 0: world coordinates Y
EndScaleformMovieMethod()
else
-- Remove all missions
Expand All @@ -389,7 +389,7 @@ BikerGang = {
end,
RemoveMission = function(position)
BeginScaleformMovieMethod(BikerGang.Clubhouse.MissionsWall.movieId, "HIDE_MISSION")
PushScaleformMovieMethodParameterInt(position)
ScaleformMovieMethodAddParamInt(position)
EndScaleformMovieMethod()
end,
Clear = function()
Expand All @@ -402,7 +402,7 @@ BikerGang = {
ReleaseNamedRendertarget(GetHashKey(BikerGang.Clubhouse.MissionsWall.prop))
end

if HasNamedScaleformMovieLoaded(BikerGang.Clubhouse.MissionsWall.movieId) then
if HasScaleformMovieFilenameLoaded(BikerGang.Clubhouse.MissionsWall.movieId) then
SetScaleformMovieAsNoLongerNeeded(BikerGang.Clubhouse.MissionsWall.movieId)
end

Expand Down
16 changes: 8 additions & 8 deletions dlc_doomsday/facility.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ DoomsdayFacility = {
},
Walls = {
SetColor = function(color, refresh)
SetInteriorPropColor(DoomsdayFacility.interiorId, "set_int_02_shell", color)
SetInteriorEntitySetColor(DoomsdayFacility.interiorId, "set_int_02_shell", color)

if refresh then
RefreshInterior(DoomsdayFacility.interiorId)
Expand Down Expand Up @@ -104,7 +104,7 @@ DoomsdayFacility = {
DoomsdayFacility.Lounge.Clear(false)

SetIplPropState(DoomsdayFacility.interiorId, lounge, true, refresh)
SetInteriorPropColor(DoomsdayFacility.interiorId, lounge, color)
SetInteriorEntitySetColor(DoomsdayFacility.interiorId, lounge, color)
end,
Clear = function(refresh)
SetIplPropState(DoomsdayFacility.interiorId, {
Expand All @@ -124,7 +124,7 @@ DoomsdayFacility = {
DoomsdayFacility.Sleeping.Clear(false)

SetIplPropState(DoomsdayFacility.interiorId, sleep, true, refresh)
SetInteriorPropColor(DoomsdayFacility.interiorId, sleep, color)
SetInteriorEntitySetColor(DoomsdayFacility.interiorId, sleep, color)
end,
Clear = function(refresh)
SetIplPropState(DoomsdayFacility.interiorId, {
Expand All @@ -143,7 +143,7 @@ DoomsdayFacility = {
DoomsdayFacility.Security.Clear(false)

SetIplPropState(DoomsdayFacility.interiorId, security, true, refresh)
SetInteriorPropColor(DoomsdayFacility.interiorId, security, color)
SetInteriorEntitySetColor(DoomsdayFacility.interiorId, security, color)
end,
Clear = function(refresh)
SetIplPropState(DoomsdayFacility.interiorId, {
Expand All @@ -160,7 +160,7 @@ DoomsdayFacility = {
DoomsdayFacility.Cannon.Clear(false)

SetIplPropState(DoomsdayFacility.interiorId, cannon, true, refresh)
SetInteriorPropColor(DoomsdayFacility.interiorId, cannon, color)
SetInteriorEntitySetColor(DoomsdayFacility.interiorId, cannon, color)
end,
Clear = function(refresh)
SetIplPropState(DoomsdayFacility.interiorId, {
Expand Down Expand Up @@ -188,7 +188,7 @@ DoomsdayFacility = {
local privacyGlass = CreateObject(model, 367.99, 4827.745, -59.0, false, false, false)

SetEntityAsMissionEntity(privacyGlass, true, 0)
SetEntityCollision_2(privacyGlass, false, 0)
SetEntityCompletelyDisableCollision(privacyGlass, false, 0)
SetEntityInvincible(privacyGlass, true)
SetEntityAlpha(privacyGlass, 254, false)
end
Expand Down Expand Up @@ -275,7 +275,7 @@ DoomsdayFacility = {
local privacyGlass = CreateObject(glass.modelHash, glass.entityPos.x, glass.entityPos.y, glass.entityPos.z, false, false, false)

SetEntityAsMissionEntity(privacyGlass, true, false)
SetEntityCollision_2(privacyGlass, false, 0)
SetEntityCompletelyDisableCollision(privacyGlass, false, 0)
SetEntityInvincible(privacyGlass, true)
SetEntityAlpha(privacyGlass, 254, false)
AttachEntityToEntity(privacyGlass, entityToAttach, -1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 2, 1)
Expand Down Expand Up @@ -366,7 +366,7 @@ DoomsdayFacility = {
submarine = "set_int_02_trophy_sub",

SetColor = function(color, refresh)
SetInteriorPropColor(DoomsdayFacility.interiorId, "set_int_02_trophy_sub", color)
SetInteriorEntitySetColor(DoomsdayFacility.interiorId, "set_int_02_trophy_sub", color)

if refresh then
RefreshInterior(DoomsdayFacility.interiorId)
Expand Down
2 changes: 1 addition & 1 deletion dlc_finance/organization.lua
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ FinanceOrganization = {
ReleaseNamedRendertarget(GetHashKey(FinanceOrganization.Office.target))
end

if HasNamedScaleformMovieLoaded(FinanceOrganization.Office.movieId) then
if HasScaleformMovieFilenameLoaded(FinanceOrganization.Office.movieId) then
SetScaleformMovieAsNoLongerNeeded(FinanceOrganization.Office.movieId)
end

Expand Down
12 changes: 6 additions & 6 deletions dlc_smuggler/hangar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ SmugglerHangar = {

SetColor = function(color, refresh)
SetIplPropState(SmugglerHangar.interiorId, SmugglerHangar.Walls.default, true, refresh)
SetInteriorPropColor(SmugglerHangar.interiorId, SmugglerHangar.Walls.default, color)
SetInteriorEntitySetColor(SmugglerHangar.interiorId, SmugglerHangar.Walls.default, color)
end,
},
Floor = {
Expand Down Expand Up @@ -73,7 +73,7 @@ SmugglerHangar = {
SmugglerHangar.Floor.Decals.Clear(false)

SetIplPropState(SmugglerHangar.interiorId, decal, true, refresh)
SetInteriorPropColor(SmugglerHangar.interiorId, decal, color)
SetInteriorEntitySetColor(SmugglerHangar.interiorId, decal, color)
end,
Clear = function(refresh)
SetIplPropState(SmugglerHangar.interiorId, {
Expand All @@ -99,7 +99,7 @@ SmugglerHangar = {

if crane ~= "" then
SetIplPropState(SmugglerHangar.interiorId, crane, true, refresh)
SetInteriorPropColor(SmugglerHangar.interiorId, crane, color)
SetInteriorEntitySetColor(SmugglerHangar.interiorId, crane, color)
else
if refresh then
RefreshInterior(SmugglerHangar.interiorId)
Expand All @@ -123,7 +123,7 @@ SmugglerHangar = {

if mod ~= "" then
SetIplPropState(SmugglerHangar.interiorId, mod, true, refresh)
SetInteriorPropColor(SmugglerHangar.interiorId, mod, color)
SetInteriorEntitySetColor(SmugglerHangar.interiorId, mod, color)
else
if refresh then
RefreshInterior(SmugglerHangar.interiorId)
Expand Down Expand Up @@ -173,7 +173,7 @@ SmugglerHangar = {

if bed ~= "" then
SetIplPropState(SmugglerHangar.interiorId, bed, true, refresh)
SetInteriorPropColor(SmugglerHangar.interiorId, "set_bedroom_tint", color)
SetInteriorEntitySetColor(SmugglerHangar.interiorId, "set_bedroom_tint", color)
else
if refresh then
RefreshInterior(SmugglerHangar.interiorId)
Expand Down Expand Up @@ -223,7 +223,7 @@ SmugglerHangar = {

if light ~= "" then
SetIplPropState(SmugglerHangar.interiorId, "set_lighting_tint_props", true, refresh)
SetInteriorPropColor(SmugglerHangar.interiorId, "set_lighting_tint_props", light)
SetInteriorEntitySetColor(SmugglerHangar.interiorId, "set_lighting_tint_props", light)
else
if refresh then
RefreshInterior(SmugglerHangar.interiorId)
Expand Down
20 changes: 10 additions & 10 deletions lib/common.lua
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ function SetIplPropState(interiorId, props, state, refresh)
end
else
if state then
if not IsInteriorPropEnabled(interiorId, props) then
EnableInteriorProp(interiorId, props)
if not IsInteriorEntitySetActive(interiorId, props) then
ActivateInteriorEntitySet(interiorId, props)
end
else
if IsInteriorPropEnabled(interiorId, props) then
DisableInteriorProp(interiorId, props)
if IsInteriorEntitySetActive(interiorId, props) then
DeactivateInteriorEntitySet(interiorId, props)
end
end
end
Expand Down Expand Up @@ -167,15 +167,15 @@ function SetupScaleform(movieId, scaleformFunction, parameters)
local p = parameters["p" .. tostring(i)]

if p.type == "bool" then
PushScaleformMovieMethodParameterBool(p.value)
ScaleformMovieMethodAddParamBool(p.value)
elseif p.type == "int" then
PushScaleformMovieMethodParameterInt(p.value)
ScaleformMovieMethodAddParamInt(p.value)
elseif p.type == "float" then
PushScaleformMovieMethodParameterFloat(p.value)
ScaleformMovieMethodAddParamFloat(p.value)
elseif p.type == "string" then
PushScaleformMovieMethodParameterString(p.value)
ScaleformMovieMethodAddParamTextureNameString(p.value)
elseif p.type == "buttonName" then
PushScaleformMovieMethodParameterButtonName(p.value)
ScaleformMovieMethodAddParamPlayerNameString(p.value)
end
end
end
Expand All @@ -189,7 +189,7 @@ function LoadStreamedTextureDict(texturesDict)
local timeout = 5 * 1000
local currentTime = 0

RequestStreamedTextureDict(texturesDict, 0)
RequestStreamedTextureDict(texturesDict, false)
while not HasStreamedTextureDictLoaded(texturesDict) do
Citizen.Wait(step)

Expand Down

0 comments on commit 9ea2c5d

Please sign in to comment.