ich habe mal eine Frage !

Wie kann ich es einstellen das nur der Admin CT wählen kann?
Also sollte einer CT wählen, wird er als Terrorists respawnt.


cts = {16434} --Ersetz das durch die Admin USGN
addhook("team","AdminJoin")
function AdminJoin(id,team)
index = #cts
if team == 2 then -- If the player choos CT team
while index < #cts +1 and index > 0 do -- Indef of the table
if player(id,"usgn")==cts[index] then -- Check if the USGN correspond to a value in the table
return 0 -- If yes accept the changeteam
else
index = index -1
end
end
msg2(id,"You cant join CT team because you are not Admin on this server !")
return 1 -- Else return 1
end
end
AdminIDs = {51028,1423456879486453454} -- USGN IDS
addhook("team","teamchange")
function teamchange(id,t)
for _, Admin in ipairs(AdminIDs)
if t==2 and player(id,"usgn")~=Admin then
return 1
elseif t==2 and player(id,"usgn")==Admin then
return 0
end
end
end