Hi there,
I've got a client-side function that I export to other resources. Everything is fine, until I need this function to be triggered by serverside event.
When I want to export this clientside function to clientside resource, I simply use this:
exports["text"]:showText("My text", "4000", 20 )
But what should I do if I want to "showText" to "thePlayer", by serverside?
function getPosition(thePlayer, commandName)
local x, y, z = getElementPosition(thePlayer)
local rotation = getPedRotation(thePlayer)
local dimension = getElementDimension(thePlayer)
local interior = getElementInterior(thePlayer)
outputChatBox("Position: " .. x .. ", " .. y .. ", " .. z, thePlayer, 255, 194, 14)
outputChatBox("Rotation: " .. rotation, thePlayer, 255, 194, 14)
outputChatBox("Dimension: " .. dimension, thePlayer, 255, 194, 14)
outputChatBox("Interior: " .. interior, thePlayer, 255, 194, 14)
end
addCommandHandler("getpos", getPosition, false, false)
I want to use my exported clientside function inside the function above. In what way exactly can I do this?