manawydan Posted January 6, 2013 Posted January 6, 2013 counter. how to use? when a zombie attacks a player, the player receives a counter. when the counters reach three, the player becomes zumbie. onClientPlayerDamage "Querer não é poder, mas tentar é avançar"!
myonlake Posted January 6, 2013 Posted January 6, 2013 You are asking us to tell you the first step of everything in the whole scripting world? Man. You should probably read some manuals first. To make a simple counter, use variables. Since this is a client-side script, it will only be triggered for the damaged player. Perhaps this might help.. Client-side counter = 0; addEventHandler("onClientPlayerDamage", root, function(attacker, weapon, bodypart, loss) if (attacker and getElementType(attacker) == "ped") then if (counter ~= 3) then counter = counter+1; else outputChatBox("You became a zombie.", 245, 40, 40, false); end end end ) If I helped you, please click the like button on the right Thanks!
manawydan Posted January 7, 2013 Author Posted January 7, 2013 Thank you. My doubt was an counter "Querer não é poder, mas tentar é avançar"!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now