Jump to content

Level


Electro88

Recommended Posts

Posted

Hello i find in forum zombie level script i request level skip on the screen tell. in the meantime, I'm sorry for asking for help, for everything I'm new in the script :(

function levelup ( ) 
    if isElement ( expLabel ) then 
        destroyElement ( expLabel ) 
        givePlayerMoney ( source, math.random(6500) ) 
    end 
  
    local Exp = getElementData ( localPlayer, "ExP" ) or 0 
    local Level = getElementData ( localPlayer, "Level" ) or 0 
    expLabel = guiCreateLabel ( 0.777, 0.22, 0.1708, 0.0963, "\nToplam Exp: ".. tostring ( Exp ) .."\nLevel: ".. tostring ( Level ), true ) 
    guiLabelSetColor ( expLabel, 0, 255, 0 ) 
    guiLabelSetVerticalAlign ( expLabel, "top" ) 
    guiLabelSetHorizontalAlign ( expLabel, "left", false ) 
    guiSetFont ( expLabel, "clear-normal" ) 
    setTimer ( levelup, 2000, 1 ) 
end 
setTimer ( levelup, 2000, 1 ) 
  
guiSetText(Level, "LEVEL ATLADIN ! "..getElementData(localPlayer, "Level")) 

Posted
İ added :
guiSetText(Level, "LEVEL ATLADIN ! "..getElementData(localPlayer, "Level")) 

but no work

Because "Level" label it is not in the code.

Posted

i again edit but no work :oops:

function levelup ( ) 
    if isElement ( expLabel ) then 
        destroyElement ( expLabel ) 
        givePlayerMoney ( source, math.random(6500) ) 
    end 
  
    local ups= guiCreateLabel ( 0.45, 0.48, 0.10, 0.04,  true ) 
    guiSetVisible(ups, true) 
    setTimer(guiSetVisible, 5000, 1, ups, false) 
    local Exp = getElementData ( localPlayer, "ExP" ) or 0 
    local Level = getElementData ( localPlayer, "Level" ) or 0 
    expLabel = guiCreateLabel ( 0.777, 0.22, 0.1708, 0.0963, "\nToplam Exp: ".. tostring ( Exp ) .."\nLevel: ".. tostring ( Level ), true ) 
    guiLabelSetColor ( expLabel, 0, 255, 0 ) 
    guiLabelSetVerticalAlign ( expLabel, "top" ) 
    guiLabelSetHorizontalAlign ( expLabel, "left", false ) 
    guiSetFont ( expLabel, "clear-normal" ) 
    setTimer ( levelup, 2000, 1 ) 
end 
setTimer ( levelup, 2000, 1 ) 
  
guiSetText(ups, "LEVEL ATLADIN ! "..getElementData(localPlayer, "Level")) 

Posted

Use debugscript, there's an error.

Even if it worked ups would be local, cant use it somewhere else out of the function, where it got created

Posted

Your code is totally messy, GO in-game and Type:in mainchat /debugscript 3 or Press F8 and Type debugscript 3

Note: You must be logged in as "Admin" or change this access in ACL to default (everyone).

Posted

İ open debugscript and full errors xD

error bad argument guisetvisable [Expected gui -element at argument 1 got boolen ]

error bad argument guiCreateLabel [Expected string at argument 5 got boolen]

error bad argument givePlayerMoney Expected gui -element at argument 1 got nil ]

Posted
İ open debugscript and full errors xD

error bad argument guisetvisable

error bad argument guiCreateLabel

error bad argument givePlayerMoney

Yes I told you, can you know explain what you want to do?

Posted

here

WARNİNG :level/client.lua:8 error bad argument @ 'guisetvisable' [Expected gui- element at argument 1 got boolen ]

WARNİNG :level/client.lua:9 error bad argument @ 'guisetvisable' [Expected gui- element at argument 1 got boolen ]

WARNİNG :level/client.lua:7error bad argument @ ' guiCreateLabel' [Expected string at argument 5 got boolen]

WARNİNG :level/client.lua:4:error bad argument @ 'givePlayerMoney' Expected number element at argument 1 got nil ]

Posted

First fix these two:

error bad argument guiCreateLabel [Expected string at argument 5 got boolen]

error bad argument givePlayerMoney Expected gui -element at argument 1 got nil ]

Posted

İ Delete money. now again edit

function levelup ( ) 
    if isElement ( expLabel ) then 
        destroyElement ( expLabel )  
    end 
  
    local Exp = getElementData ( localPlayer, "ExP" ) or 0 
    local Level = getElementData ( localPlayer, "Level" ) or 0 
    expLabel = guiCreateLabel ( 0.777, 0.22, 0.1708, 0.0963, "\nToplam Exp: ".. tostring ( Exp ) .."\nLevel: ".. tostring ( Level ), true ) 
    guiLabelSetColor ( expLabel, 0, 255, 0 ) 
    guiLabelSetVerticalAlign ( expLabel, "top" ) 
    guiLabelSetHorizontalAlign ( expLabel, "left", false ) 
    guiSetFont ( expLabel, "clear-normal" ) 
    setTimer ( levelup, 2000, 1 ) 
end 
setTimer ( levelup, 2000, 1 ) 
  
  
  
  
  
  function guiCreateLabel () 
    local ups= guiCreateLabel ( 0.45, 0.48, 0.10, 0.04,  true ) 
    guiSetVisible(ups, true) 
    setTimer(guiSetVisible, 5000, 1, ups, false) 
    guiSetText(ups, "LEVEL ATLADIN ! "..getElementData(localPlayer, "Level")) 
end 

this time :23: stack overflow what ? :P

Posted

I have edited your code abit, try that now

function levelup ( ) 
    local expLabel = guiCreateLabel ( 0.777, 0.22, 0.1708, 0.0963, "\nToplam Exp: ".. tostring ( Exp ) .."\nLevel: ".. tostring ( Level ), true ) 
    if isElement ( expLabel ) then 
        destroyElement ( expLabel ) 
    end 
    local Exp = getElementData ( localPlayer, "ExP" ) or 0 
    local Level = getElementData ( localPlayer, "Level" ) or 0 
    guiLabelSetColor ( expLabel, 0, 255, 0 ) 
    guiLabelSetVerticalAlign ( expLabel, "top" ) 
    guiLabelSetHorizontalAlign ( expLabel, "left", false ) 
    guiSetFont ( expLabel, "clear-normal" ) 
end 
setTimer ( levelup, 2000, 1 ) 
  
function onlabelCreate () 
    local ups= guiCreateLabel ( 0.45, 0.48, 0.10, 0.04,  true ) 
    if not guiGetVisible(ups) then  
        guiSetVisible(ups, true)  
        setTimer(guiSetVisible, 5000, 1, ups, false) 
        guiSetText(ups, "LEVEL ATLADIN ! "..getElementData(localPlayer, "Level")) 
    end 
end 
onlabelCreate () 

Posted

WARNİNG: level/client.lua:16: bad argument @ 'guiCreateLabel' [Expected string at argument 5, got boolen]

WARNİNG :level/client.lua:17 error bad argument @ 'guiGetVisable' [Expected gui- element at argument 1 got boolen ]

WARNİNG :level/client.lua:18 error bad argument @ 'guiSetVisable' [Expected gui- element at argument 1 got boolen ]

WARNİNG :level/client.lua:20error bad argument @ 'guiSetText' [Expected gui- element at argument 1 got boolen ]

WARNİNG :level/client.lua:8error bad argument @ 'guiLabelSetColor' [Expected gui- element at argument 1 ]

WARNİNG :level/client.lua:9error bad argument @ ' guiLabelSetVerticalAlign' [Expected gui- element at argument 1 ]

WARNİNG :level/client.lua:10error bad argument @ ' guiLabelSetHorizontalAlign' [Expected gui- element at argument 1 ]

WARNİNG :level/client.lua:11error bad argument @ ' guiSetFont' [Expected gui- element at argument 1 ]

WARNİNG :level/client.lua:19error bad argument @ ' guiSetVisible' [Expected gui- element at argument 1 got boolen ]

wow :o

Posted

Now script working but no comming level up screen and have 1 error debug

ERROR: Server triggered clientside event Zomb_Jump, but event is not marked as remotly triggerable

Posted

not worked addEvent("Zomb_Jump", true)

ERROR: Server triggered clientside event Zomb_Jump, but event is not marked as remotly triggerable

and

ERROR: client (Electro88) triggered serverside event onPlayerCheckForHexCodes, but event is not added serverside

WHY give error please help me

:(

Posted
Now again error why give error ? :x

ERROR: client (Electro88) triggered serverside event onPlayerCheckForHexCodes, but event is not added serverside

It's other function. Post the code.

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