Hello everyone, Sorry for disturbing you, but I made a new script when a crim enter to a col A sound will play, but it play for the whole server,i want it to be play only for cops. This is my script,
function PlayMusic(element,sound)
if element and getElementType(element) == "player" then
local team = getPlayerTeam(element)
if team and not (copTeams[getTeamName(team)]) then -- the player who entered jail area isn't a cop
triggerClientEvent("playMyMusic", getRootElement(), copTeams)
end
end
end
addEventHandler("onColShapeLeave", prisonCol, PlayMusic)
As you can see when a crim hits the col the sound will play, but when the cop hits the col nothing will happen, the problem is that i want to lock the sound to copTeams only. I really need help, thanks for reading. Cheers.