Jump to content

Counter


manawydan

Recommended Posts

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 
) 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...