Hi, Im new in scripting. I would know how to count how many players in a marker (if its possible)..
And I have a taser script, i want it when i hit someone with tazer, it doesn't make damage to him..
Thanks for help.
Server Side:
local time = 1
addEvent("onShot", true)
addEventHandler("onShot", root,
function(hitElement)
setElementFrozen(hitElement, true)
setPedAnimation(hitElement, "ped", "KO_shot_stom")
setTimer(setElementFrozen, time*3000, 1, hitElement, false)
setTimer(setPedAnimation, time*3000, 1, hitElement)
end)
Client Side
local eTeams = {
["Police Officers"] = true,
["SWAT"] = true,
["FBI"] = true,
["SAAF"] = true
}
addEventHandler("onClientPlayerWeaponFire", root,
function(weapon, _, _, _, _, _, hitElement)
if (hitElement) and (getElementType(hitElement) == "player") and (weapon == 23) then
local Team = getPlayerTeam(source)
local TeamName = Team and getTeamName(Team) or ""
if (eTeams[TeamName]) then
outputChatBox("You have tazed "..getPlayerName(hitElement), 255, 0, 0)
triggerServerEvent("onShot", localPlayer, hitElement)
end
end
end)