السلآلآم عليكم ورحمة الله وبركاته
Useful function
رحلة العناء
يحطون كود ومايشرحونه : (
,, ابيكم تساعدوني في الكود هذا ., بس بعرف وين الخطأ
function isPlayerInTeam(player, team)
assert(isElement(player) and getElementType(player) == "player", "Bad argument 1 @ isPlayerInTeam [player expected, got " .. tostring(player) .. "]")
assert((not team) or type(team) == "string" or (isElement(team) and getElementType(team) == "team"), "Bad argument 2 @ isPlayerInTeam [nil/string/team expected, got " .. tostring(team) .. "]")
return getPlayerTeam(player) == (type(team) == "string" and getTeamFromName(team) or (type(team) == "userdata" and team or (getPlayerTeam(player) or true)))
end
addEventHandler("onClientGUIClick", root,
function (player, team)
if ( source == Button ) then
if isPlayerInTeam(player, "MyTeam") then
setElementPosition
guiSetVisible(
showCursor
else
outputChatBox
end
end
end
)
Wiki --
isPlayerInTeam