Jump to content

problem with zombie kills


Chaos

Recommended Posts

client side:

  
GUIEditor = {  
button = {},  
window = {},  
label = {}  
}  
  
  
  
addEventHandler("onClientResourceStart", resourceRoot,  
function()  
okno = guiCreateWindow(553, 303, 493, 466, "Skin System || Copyright by Ciastko", false)  
guiWindowSetSizable(okno, false)  
guiWindowSetMovable(okno, false)  
  
cj = guiCreateButton(36, 201, 126, 66, "CJ", false, okno)  
guiSetProperty(cj, "NormalTextColour", "FFAAAAAA")  
  
addEventHandler ( "onClientGUIClick", cj, cjj,false) 
  
end  
)  
  
  
function gui()  
if (guiGetVisible (okno) == false) then  
guiSetVisible(okno, true)  
showCursor(true)  
else  
guiSetVisible(okno, false)  
showCursor(false)  
end  
end  
bindKey ("F2", "down", gui)  
  
  
function cjj()  
  
triggerServerEvent ("cj", getLocalPlayer()) 
end 
  

server side :

    addEvent ( "cj", true ) 
    addEventHandler ( "cj", getRootElement(), 
        function () 
        local zombiekills = getElementData(source,"Zombie kills") 
        if (zombiekills >= 20) then 
        setElementModel ( source, 0)  
    else 
    outputChatBox ( "get level 2 first !", source, 255, 0, 0 ) 
        end 
end 
    ) 

well im trying to make when the player kills 20 zombies and more then he can select cj skin button but it's working only 1 time then if i change my skin and press the button again will not works

Edited by Guest
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...