Events
This events can be triggered from your own resource to interact with the Laptop script.
av_laptop:close
This event is client side and works for closing the laptop UI.
-- client side: TriggerEvent('av_laptop:close') -- server side: TriggerClientEvent('av_laptop:close', playerId)
av_laptop:closed
This client event is triggered when laptop is closed, use it in your own scripts as listener:
AddEventHandler('av_laptop:closed', function() -- laptop is closed do something end
av_laptop:closeApp
Close an specific app by sending the app name as argument, this event is client side.
-- client side: TriggerEvent('av_laptop:closeApp', "business") -- server side: TriggerClientEvent('av_laptop:closeApp', playerId, "business")
Use this event to trigger a notification to the user, if the user is using the laptop it will use the UI notification component, otherwise it will use the regular ox_lib notification.
params:
title:
string
Notification headermessage:
string
The message to displaytype:
string
Type can be "error", "success" or "inform"-- client side TriggerEvent('av_laptop:notificationUI', "AV Scripts", "Hello world!", "success" -- server side TriggerClientEvent('av_laptop:notificationUI', playerId, "AV Scripts", "Hello World!", "success"
av_laptop:tablet
Toggle the tablet animation, it doesn't do anything else just an animation.
params:
state:
boolean
Toggle the tablet animation-- client side TriggerEvent('av_laptop:tablet', true) -- or false to stop animation -- server side TriggerClientEvent('av_laptop:tablet', playerId, true) -- or false to stop animation
Last updated