HU/getCameraGoggleEffect

From Multi Theft Auto: Wiki
Revision as of 20:59, 28 August 2018 by Surge (talk | contribs) (→‎Visszatérési érték)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function returns what goggle effect is currently affecting the camera.

Szintaxis

string getCameraGoggleEffect (  )

OOP Syntax Help! I don't understand this!

Method: Camera.getGoggleEffect(...)
Variable: .goggleEffect
Counterpart: setCameraGoggleEffect


Visszatérési érték

  • Egy string, mely jelzi a pillanatnyi kamera effectjét. Ezek jelentését lentebb láthatja.
  • normal: No camera goggle effect
  • nightvision: Nightvision camera
  • thermalvision: Infrared camera

Példa

Ez a pálda egy parancsot ad az éjjellátó effect engedélyezéséhez, vagy letiltásához.

function nightvision()
    if (getCameraGoggleEffect() == "normal") then
        setCameraGoggleEffect("nightvision")
    elseif (getCameraGoggleEffect() == "nightvision") then
        setCameraGoggleEffect("normal")
    end
end

addCommandHandler("nightvision", nightvision)

Lásd még

Fordította