Client Events

Camera

lb-phone:toggleHud

-- show: boolean
RegisterNetEvent("lb-phone:toggleHud", function(show)
    print("Phone HUD is now " .. (show and "visible" or "hidden"))
end)

Battery

lb-phone:phoneDied

Triggered when the phone runs out of battery

RegisterNetEvent("lb-phone:phoneDied", function()
    print("Phone died")
end)

Settings

lb-phone:settingsUpdated

Triggered when the phone settings are updated

RegisterNetEvent("lb-phone:settingsUpdated", function(newSettings)
    print(json.encode(newSettings, { indent = true }))
end)

Social media

lb-phone:birdy:newPost

-- post: { id: string, username: string, content: string, attachments?: string, reply_to?: string, timestamp: number, replyToAuthor: string, display_name: string, profile_image?: string, verified?: boolean }
RegisterNetEvent("lb-phone:birdy:newPost", function(post)
    print(json.encode(post, { indent = true }))
end)

lb-phone:trendy:newPost

-- post: { id: string, username: string, caption?: string, videoUrl: string }
RegisterNetEvent("lb-phone:trendy:newPost", function(post)
    print(json.encode(post, { indent = true }))
end)

lb-phone:instapic:newPost

-- post: { id: string, username: string, media: string[], caption: string, location?: string }
RegisterNetEvent("lb-phone:instapic:newPost", function(post)
    print(json.encode(post, { indent = true }))
end)

lb-phone:pages:newPost

-- post: { id: string, number: string, title: string, description: string, attachment?: string, price?: number }
RegisterNetEvent("lb-phone:pages:newPost", function(post)
    print(json.encode(post, { indent = true }))
end)

lb-phone:marketplace:newPost

-- post: { id: string, number: string, title: string, description: string, attachments: string[], price: number }
RegisterNetEvent("lb-phone:marketplace:newPost", function(post)
    print(json.encode(post, { indent = true }))
end)