Hello guys, I'm new to the moon, I come from another plant and I'm used to programming in pawn, moon is very new to me.
I would like some help, I am not able to use the "isObjectInACLGroup" function on the client.Lua side, I should use it on server.Lua but I have no idea how to use it.
Can anybody help me ?
Thanks in advance.
Client.Lua
function FomeRepeat()
if isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup ("Staff")) then -- This check does not work
if getElementData ( localPlayer, "afkdate" ) == true then return end
if getElementData ( localPlayer, "Fome:Logado" ) == true then
Fome = getElementData ( localPlayer, "AirNew:Fome" ) -1
SetarFome = setElementData ( localPlayer, "AirNew:Fome", Fome )
if Fome <= 0 then
setElementData ( localPlayer, "AirNew:Fome", 10 )
setElementHealth ( localPlayer, 0 )
outputChatBox ( "[ Fome ] - Você Morreu de Fome", 255, 255, 255, true )
outputChatBox ( "[ Fome ] - Vá Até uma Lanchonete e Coma Algo, ou Você Vai Morrer Novamente", 255, 255, 255, true )
end
if Fome == 5 then
outputChatBox ( "[ Fome ] - Você Esta com Fome e Precisa Comer", 255, 255, 255, true )
outputChatBox ( "[ Fome ] - Vá Até uma Lanchonete e Coma Algo, ou Você Vai Morrer de Fome", 255, 255, 255, true )
playSoundFrontEnd ( 45 )
end
end
end
end
setTimer(FomeRepeat,FomeTempo,0)