I'd use something like this:
Server:
local authSkin = 2
local marker = createMarker(1944, -1497, 2.5, "cylinder", 1, 255, 0, 0)
function checkSkin(_,newSkin)
if source and isElement(source) and getElementType(source) == "player" then
iprint(source)
if newSkin == authSkin then
setElementAlpha(marker,255)
else
setElementAlpha(marker,0)
end
end
end
addEventHandler("onElementModelChange",root,checkSkin)
function myFunction(element,dim)
if element and isElement(element) and getElementType(element) == "player" and getElementModel(element) == authSkin then
outputChatBox("Hello :)",element)
end
end
addEventHandler("onMarkerHit",marker,myFunction)
addEventHandler("onPlayerResourceStart",root,function ()
if source and isElement(source) then
if getElementModel(source) == authSkin then
setElementAlpha(marker,255)
else
setElementAlpha(marker,0)
end
end
end)
Since it is only an example, you should modify the script to your needs :).