Hi guys,i've over here my Headshot script which works only with team"Admins",the problem is that i tried to add 2 more teams using "and" but i failed ,Plz help me out!here is the script:
addEvent "onPlayerHeadshot"
addEventHandler("onPlayerDamage", getRootElement(),
function (attacker, weapon, bodypart, loss)
if getElementType ( attacker ) == "player" then
if bodypart == 9 and weapon == 34 then
local HSteam = getPlayerTeam(attacker)
if HSteam and getTeamName(HSteam)=="Admins" then
local result = triggerEvent("onPlayerHeadshot",source, attacker, weapon, loss)
if result == true then
killPed(source, attacker, weapon, bodypart)
setPedHeadless( source, true )
addEventHandler("onPlayerSpawn", root, function () setPedHeadless( source, false) end )
end
end
end
end
end
)
function BackUp( source )
if getElementType ( source ) == "player" then
setPedHeadless ( source, false )
end
end