Skip to content
H@mer edited this page Sep 12, 2024 · 3 revisions

Big Banner image

  • Parameter
    • title string Text of title
    • subtitle string Text of sub title
    • waitTime integer 1-inf How long show on screen in second
    • playSound boolean Play sound?
  • Call by event no return value
    TriggerEvent("CSform.banner", "~y~Test Banner~s~.", "You ~g~can ~r~use ~y~colors ~b~here ~s~too.", 5, true)
  • Call by class, return class value
    local showBanner = CSform:ShowBanner("~y~Test Banner~s~.", "You ~g~can ~r~use ~y~colors ~b~here ~s~too.", 5, true)
    Citizen.Wait(1000) -- Wait 1 second
    showBanner:Stop() -- Stop CSform:ShowBanner immediately

Mission Quit Low opacity black background with title and subtitle. image

  • Parameter
    • title string Text of title
    • subtitle string Text of sub title
    • waitTime integer 1-inf How long show on screen in second
    • playSound boolean Play sound?
  • Call by event no return value
    TriggerEvent("CSform.missionQuit", "~y~Test Scaleform~s~.", "You ~g~can ~r~use ~y~colors ~b~here ~s~too.", 5, true)
  • Call by class, return class value
    local showMissionQuit = CSform:ShowMissionQuit("~y~Test Scaleform~s~.", "You ~g~can ~r~use ~y~colors ~b~here ~s~too.", 5, true)
    Citizen.Wait(1000)
    showMissionQuit:Stop()

Splash Text This is a simple text in the middle of the scree, with cursive font. image

  • Parameter
    • title string Text of title
    • waitTime integer 1-inf How long show on screen in second
    • playSound boolean Play sound?
  • Call by event no return value
    TriggerEvent("CSform.SplashText", "~y~Test Scaleform~s~.", 5, true)
  • Call by class, return class value
    local showSplashText = CSform:ShowSplashText("~y~Test Scaleform~s~.", 5, true)
    Citizen.Wait(1000)
    showSplashText:Stop()

Popup Warning Opaque black background, with Title, subtitle and an "error text" on the bottom left. image

  • Parameter
    • title string Text of title
    • subtitle string Text of sub title
    • errorCode string
    • waitTime integer 1-inf How long show on screen in second
  • Call by event no return value
    TriggerEvent("CSform.PopupWarning", "~y~Test Scaleform~s~.", "You ~g~can ~r~use ~y~colors ~b~here ~s~too.", "ERROR 420: Scaleforms too hot.", 5, true)
  • Call by class, return class value
    local showPopupWarning = CSform:ShowPopupWarning("~y~Test Scaleform~s~.", "You ~g~can ~r~use ~y~colors ~b~here ~s~too.", "ERROR 420: Scaleforms too hot.", 5, true)
    Citizen.Wait(1000)
    showPopupWarning:Stop()

Race Countdown WaitTime is also the starting number. Plays sound only at the start. image

  • Parameter
    • red integer Red 0-255
    • green integer Green 0-255
    • blue integer Blue 0-255
    • waitTime integer 1-inf How long show on screen in second
    • playSound boolean Play sound?
  • Call by event no return value
    TriggerEvent("CSform.Countdown", 0, 150, 200, 10, true)
  • Call by class, return class value
    local countdown = CSform:Countdown(0, 150, 200, 10, true)
    Citizen.Wait(1000)
    countdown:Stop()

Midsize Banner Same as big banner, but midsized. image

  • Parameter
  • Call by event no return value
    TriggerEvent("CSform.MidsizeBanner", "~y~Test Scaleform~s~.", "You ~g~can ~r~use ~y~colors ~b~here ~s~too.", 2, 9, true)
  • Call by class, return class value
    local showMidsizeBanner = CSform:ShowMidsizeBanner("~y~Test Scaleform~s~.", "You ~g~can ~r~use ~y~colors ~b~here ~s~too.", 2, 9, true)
    Citizen.Wait(1000)
    showMidsizeBanner:Stop()

Results Panel _slots argument needs to be a table. slots[i].state can be 0 or 2 for "not selected" and 1 or 3 for "selected". image

  • Parameter
    • subtitle string Text of sub title
    • slots table Argument needs to be a table. slots[i].state can be 0 or 2 for "not selected" and 1 or 3 for "selected".
    • waitTime integer 1-inf How long show on screen in second
    • playSound boolean Play sound?
  • Call by event no return value
    local slots = {
       {name = "test1", state = 0},
       {name = "test2", state = 1},
       {name = "test3", state = 2},
       {name = "test4", state = 3},
    }
    TriggerEvent("CSform.resultsPanel", "~y~Test Scaleform~s~.", "You ~g~can ~r~use ~y~colors ~b~here ~s~too.", slots, 5, true)
  • Call by class, return class value
    local slots = {
       {name = "test1", state = 0},
       {name = "test2", state = 1},
       {name = "test3", state = 2},
       {name = "test4", state = 3},
    }
    local showResultsPanel = CSform:ShowResultsPanel("~y~Test Scaleform~s~.", "You ~g~can ~r~use ~y~colors ~b~here ~s~too.", slots, 5, true)
    Citizen.Wait(1000)
    showResultsPanel:Stop()

Mission Info Panel image

  • Parameter
    • data table<string, string, string, boolean, string, integer, integer, string>: { name, type, percentage, rockstarVerified, playersRequired, rp, cash, time }
    • x integer X position on screen
    • y integer X position on screen
    • width integer Screen resolution width
    • height integer Screen resolution width
    • waitTime integer 1-inf How long show on screen in second
    • playSound boolean Play sound?
  • Prepare
    local data = {
       name = "Mission name",
       type = "Mission type",
       percentage = "15",
       rockstarVerified = true,
       playersRequired = "3",
       rp = 0,
       cash = 0,
       time = ""
    }
  • Call by event no return value
    TriggerEvent("CSform.missionInfo", data, 100, 300, 600, 500, 5, true)
  • Call by class, return class value
    local showMissionInfoPanel = CSform:ShowMissionInfoPanel(data, 100, 300, 600, 500, 5, true)
    Citizen.Wait(1000)
    showMissionInfoPanel:Stop()

Heist image

  • Parameter
    • initialText table<string, string, string>: { missionTextLabel, passFailTextLabel, messageLabel }
    • dataTable table
    • money table startMoney, finishMoney, topText, bottomText, rightHandStat, rightHandStatIcon
    • xp table xpGained, xpBeforeGain, minLevelXP, maxLevelXP, currentRank, nextRank, rankTextSmall, rankTextBig
    • playSound boolean Play sound?
    • cb function|nil
  • Prepare
    --All 4 tables are required in order to proprer syncronize the scaleform.
    local _initialText = { --first slide. Consists of 3 text lines.
       missionTextLabel = "~y~BANK HEIST~s~", 
       passFailTextLabel = "PASSED.",
       messageLabel = "I don't even know why we have a third message.",
    }
    local _table = { --second slide. You can add as many "stats" as you want. They will appear from botton to top, so keep that in mind.
       {stat = "1", value = "1"},
       {stat = "2", value = "2"},
       {stat = "3", value = "3"},
       {stat = "4", value = "4"},
       {stat = "5", value = "5"},
       {stat = "6", value = "6"},
       {stat = "7", value = "7"},
       {stat = "8", value = "8"},
       {stat = "9", value = "9"},
       {stat = "10", value = "10"},
       {stat = "11", value = "11"},
       {stat = "12", value = "12"},
    }
    local _money = { --third slide. Incremental money. It will start from startMoney and increment to finishMoney. top and bottom text appear above/below the money string.
       startMoney = 3000,
       finishMoney = 53000,
       topText = "",
       bottomText = "",
       rightHandStat = "woah",
       rightHandStatIcon = 0, --0 or 1 = checked, 2 = X, 3 = no icon
    }
    local _xp = { --fourth and final slide. XP Bar slide. Will start with currentRank and a xp bar filled with (xpBeforeGain - minLevelXP) and will add xpGained. If you rank up, it goes to "Level Up" slide.
       xpGained = 8000,
       xpBeforeGain = 0,
       minLevelXP = 0,
       maxLevelXP = 0,
       currentRank = 0,
       nextRank = 0,
       rankTextSmall = "LEVEL UP.",
       rankTextBig = "~b~Nice.~s~",
    }
  • Call by event no return value
    TriggerEvent("CSform.HeistFinale", _initialText, _table, _money, _xp, true)
  • Call by class, return class value
    local showHeist = CSform:ShowHeist(_initialText, _table, _money, _xp, true)
    Citizen.Wait(1000)
    showHeist:Stop()

Credit Block You can add a role, and how many people you want. 8 _waitTimeSeconds should be the standard. image

  • Parameter
    • role string
    • nameString string
    • x integer X position on screen
    • y integer X position on screen
    • waitTime integer 1-inf How long show on screen in second
    • playSound boolean Play sound?
  • Call by event no return value
    --If you want more names in the namesString field, separate them with \n like in the example
    Citizen.CreateThread(function()
       TriggerEvent("CSform.Credits", "Test Role", "Name1 \n   Name 2", 0.4, 0.5, 8, true)
       Citizen.Wait(10*1000)
       TriggerEvent("CSform.Credits", "Decompiled scaleforms provided by", "Vespura", 0.7, 0.2, 8, false)
       Citizen.Wait(10*1000)
       TriggerEvent("CSform.Credits", "Third Credit Block", "Just for looks", 1.0, 0.15, 8, false)
    end)
  • Call by class, return class value
    Citizen.CreateThread(function()
       local credit1 = CSform:ShowCredits("Test Role", "Name1 \n   Name 2", 0.4, 0.5, 8, true)
       Citizen.Wait(10*1000)
       local credit2 = CSform:ShowCredits("Decompiled scaleforms provided by", "Vespura", 0.7, 0.2, 8, false)
       Citizen.Wait(10*1000)
       local credit3 = CSform:ShowCredits("Third Credit Block", "Just for looks", 1.0, 0.15, 8, false)
    
       Citizen.Wait(1000)
    
       credit1:Stop()
       credit2:Stop()
       credit3:Stop()
    end)

Title image

  • Parameter
    • title string Text of title
  • Call by event no return value
    TriggerEvent("CSform.ChangePauseMenuTitle", "Please type a name after ~y~/title~s~.")
  • Call by class
    CSform:ChangePauseMenuTitle("Please type a name after ~y~/title~s~.")

Save image image

  • Parameter
    • subtitle string Text of sub title
    • saveType integer 1-2
    • waitTime integer 1-inf How long show on screen in second
    • playSound boolean Play sound?
  • Call by event no return value
    TriggerEvent("CSform.Saving", "_message", 1, 7, true) --type 1 = scalefrom. 2 or other = non-scaleform.
  • Call by class, return class value
    local showSaving = CSform:ShowSaving("_message", 2, 7, true)
    Citizen.Wait(1000)
    showSaving:Stop()

Shutter image

  • Parameter
    • waitTime integer 1-inf How long show on screen in second
    • playSound boolean Play sound?
  • Call by event no return value
    TriggerEvent("CSform.Shutter", 7, true)
  • Call by class, return class value
    local showShutter = CSform:ShowShutter(7, true)
    Citizen.Wait(1000)
    showShutter:Stop()

Ware House image

  • Parameter
    • waitTime integer 1-inf How long show on screen in second
    • playSound boolean Play sound?
  • Call by event no return value
    TriggerEvent("CSform.Warehouse", 20, true)
  • Call by class, return class value
    local showWarehouse = CSform:ShowWarehouse(20, true)
    Citizen.Wait(1000)
    showWarehouse:Stop()

Music Studio Monitor image

  • Parameter
    • state integer 0 = OFF, 1 = EDIT, 2 = PLAY
    • waitTime integer 1-inf How long show on screen in second
  • Call by event no return value
    TriggerEvent("CSform.MusicStudioMonitor", 0, 20) --STATE (0 = OFF | 1 = EDIT | 2 = PLAY)
  • Call by class, return class value
    local showMusicStudioMonitor = CSform:ShowMusicStudioMonitor(1, 20)
    Citizen.Wait(1000)
    showMusicStudioMonitor:Stop()

Game Feed image

  • Parameter
    • title string Text of title
    • subtitle string Text of sub title
    • textblock string
    • textureDirectory string
    • textureName string
    • rightAlign boolean
    • waitTime integer 1-inf How long show on screen in second
    • playSound boolean Play sound?
  • Call by event no return value
    TriggerEvent("CSform.GameFeed", "_title", "_subtitle", "_textblock", "v_73_fib01_txd", "xj_v_fibscreen", false, 7, true)
  • Call by class, return class value
    local showGameFeed = CSform:ShowGameFeed("_title", "_subtitle", "_textblock", "v_73_fib01_txd", "xj_v_fibscreen", false, 7, true)
    Citizen.Wait(1000)
    showGameFeed:Stop()

Clone this wiki locally