[Trigger] Camera zoom system for 1.29 or classic

function gg_trg_CameraZoom_Conditions takes nothing returns boolean
local real r
local string s
if GetLocalPlayer() == GetTriggerPlayer() then
set s = SubString(GetEventPlayerChatString(), 6, StringLength(GetEventPlayerChatString()))
set r = S2R(s)

if s == "def" then
set r = 1650
endif

if s == "med" then
set r = 2075
endif

if s == "high" then
set r = 2500
endif

call SetCameraField(CAMERA_FIELD_TARGET_DISTANCE, r, 0.00)
call SetCameraField(CAMERA_FIELD_FARZ, 100000000.00, 0)
endif
return false
endfunction

//===========================================================================
function InitTrig_CameraZoom takes nothing returns nothing
local trigger trig = CreateTrigger()
local integer i = 0
loop
exitwhen i == bj_MAX_PLAYERS
call TriggerRegisterPlayerChatEvent(trig, Player(i), "-zoom ", false)
set i = i + 1
endloop
call TriggerAddCondition(trig, Condition(function gg_trg_CameraZoom_Conditions))

call SetTerrainFogExBJ( 0, 10000000.00, 1000000.00, 0.5, 100, 100, 100 )
endfunction
 
i found a system camera zoom but it's in gui, also maybe you guys can do it with gui also please remove number enter from these camera system, just keep def, med and high key word for changing zoom, also please change it something like when we use mouse's wheel, the zoom comes back to what we set.
 
Back
Top