Jump to content

Client checks


Drakath

Recommended Posts

Client:

function behehehe() 
    player = localPlayer 
    local kills = tonumber(getElementData(player,"Zombie kills")) 
    if kills > 12  then 
        outputChatBox("ok", 0,255,0) 
    elseif not kills > 12  then 
        outputChatBox("lol" ,255,0,0)    
        setElementFrozen ( player, true ) 
    else 
        outputChatBox("wtf", 255,0,0) 
        end 
    end 
addCommandHandler("omg", behehehe) 

So if a player has more than 12 kills it outputs "ok". But if he doesn't, nothing happens. Why?

Link to comment

Try that

function behehehe() 
    player = localPlayer 
    local kills = tonumber(getElementData(player,"Zombie kills")) 
    if kills > 12  then 
        outputChatBox("ok", 0,255,0) 
end 
    if not kills > 12  then 
        outputChatBox("lol" ,255,0,0)    
        setElementFrozen ( player, true ) 
    else 
        outputChatBox("wtf", 255,0,0) 
       end 
    end 
addCommandHandler("omg", behehehe) 

Link to comment
function behehehe() 
    player = localPlayer 
    kills = tonumber(getElementData(player,"Zombie kills")) 
    if kills > 12  then 
        outputChatBox("ok", 0,255,0) 
end 
    if not kills > 12  then 
        outputChatBox("lol" ,255,0,0)   
        setElementFrozen ( player, true ) 
    else 
        outputChatBox("wtf", 255,0,0) 
       end 
    end 
addCommandHandler("omg", behehehe) 

Link to comment
function behehehe() 
    player = localPlayer 
    kills = getElementData(player,"Zombie kills") 
    if kills > 12  then 
        outputChatBox("ok", 0,255,0) 
else 
     
        outputChatBox("lol" ,255,0,0)   
        setElementFrozen ( player, true) 
       end 
    end 
addCommandHandler("omg", behehehe) 

Link to comment
function behehehe() 
    player = localPlayer 
    local kills = tonumber(getElementData(player,"Zombie kills")) or 0 
    if kills > 12  then 
        outputChatBox("ok", 0,255,0) 
    elseif kills < 12  then 
        outputChatBox("lol" ,255,0,0)    
        setElementFrozen ( player, true ) 
    else 
        outputChatBox("wtf", 255,0,0) 
        end 
    end 
addCommandHandler("omg", behehehe) 

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...