How can i add this code
fuction copyright
outputChatBox ( "#FF0000Harm Script Made By : #00FF00Hussein", getRootElement(), 255, 255, 255, true )
addEventHandler ( "onResourceStart" )
to this
function OnPlayerIsDamaged(attacker, attackerweapon, bodypart, loss)
-- In this function, "source" is the player damaged.
PlayerWantedLevel = getPlayerWantedLevel(source)
AttackerTeam = getPlayerTeam(attacker)
if(PlayerWantedLevel == 0) then
if(AttackerTeam == "Police") then
setElementHealth(source, getElementHealth(source) + loss) --Health of player damaged
setElementHealth(attacker, getElementHealth(attacker) - 20) --Health of cop (who shot)
outputChatBox("Don't shot unwanted players or you will lose health!", attacker, 255, 0, 0)
end
end
end
addEventHandler("onPlayerDamage", getRootElement(), OnPlayerIsDamaged)
I want when i start the script he make outputChatBox This
outputChatBox ( "#FF0000Harm Script Made By : #00FF00Hussein", getRootElement(), 255, 255, 255, true )
That what i want
then i will test the script