Hello! I made a admin area and script for it. It checks if the player who enter the area is in "Admins" team.
So here is the problem: it kicks the player out of the area even if the player is in the Admins team, it doesnt give any errors or anything relating to errors. Code:
function detectorDetect(thePlayer)
if(getPlayerTeam" class="kw2">getPlayerTeam(thePlayer) == "Admins")then
outputChatBox("Welcome!", thePlayer, 0, 255, 0)
else
setElementPosition(thePlayer, 247, 1833, 5)
setElementRotation(thePlayer, 269)
outputChatBox("You are not allowed to come here!", thePlayer, 255, 0, 0)
end
end
addEventHandler("onColShapeHit", detector, detectorDetect)
I hope someone can help me.