Electro88 Posted February 3, 2016 Share Posted February 3, 2016 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")) Link to comment
KariiiM Posted February 3, 2016 Share Posted February 3, 2016 Hey first off it's okay, but what's wrong with this code? Link to comment
Electro88 Posted February 3, 2016 Author Share Posted February 3, 2016 İ added : guiSetText(Level, "LEVEL ATLADIN ! "..getElementData(localPlayer, "Level")) but no work Link to comment
1LoL1 Posted February 3, 2016 Share Posted February 3, 2016 İ added : guiSetText(Level, "LEVEL ATLADIN ! "..getElementData(localPlayer, "Level")) but no work Because "Level" label it is not in the code. Link to comment
Electro88 Posted February 3, 2016 Author Share Posted February 3, 2016 i add local LevelUp= guiCreateLabel ( 0.45, 0.48, 0.10, 0.04, true ) ? Link to comment
Bonus Posted February 3, 2016 Share Posted February 3, 2016 Is Level equal LevelUp? Two differenr names ... Link to comment
Electro88 Posted February 3, 2016 Author Share Posted February 3, 2016 i again edit but no work 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")) Link to comment
Bonus Posted February 3, 2016 Share Posted February 3, 2016 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 Link to comment
KariiiM Posted February 3, 2016 Share Posted February 3, 2016 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). Link to comment
Electro88 Posted February 3, 2016 Author Share Posted February 3, 2016 İ open debugscript and full errors 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 ] Link to comment
KariiiM Posted February 3, 2016 Share Posted February 3, 2016 İ open debugscript and full errors 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? Link to comment
Electro88 Posted February 3, 2016 Author Share Posted February 3, 2016 i acces for script ? Link to comment
KariiiM Posted February 3, 2016 Share Posted February 3, 2016 i acces for script ? No access needed as far as you're Admin and you're able to check the debugscript log. Link to comment
Electro88 Posted February 3, 2016 Author Share Posted February 3, 2016 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 ] Link to comment
Bonus Posted February 3, 2016 Share Posted February 3, 2016 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 ] Link to comment
KariiiM Posted February 3, 2016 Share Posted February 3, 2016 I suggest you to make a trigger to server side for money Link to comment
Electro88 Posted February 3, 2016 Author Share Posted February 3, 2016 İ 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 ? Link to comment
KariiiM Posted February 3, 2016 Share Posted February 3, 2016 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 () Link to comment
Electro88 Posted February 3, 2016 Author Share Posted February 3, 2016 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 Link to comment
ViRuZGamiing Posted February 3, 2016 Share Posted February 3, 2016 change; local ups= guiCreateLabel ( 0.45, 0.48, 0.10, 0.04, true ) To; local ups= guiCreateLabel ( 0.45, 0.48, 0.10, 0.04, "", true) Link to comment
Electro88 Posted February 3, 2016 Author Share Posted February 3, 2016 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 Link to comment
ViRuZGamiing Posted February 3, 2016 Share Posted February 3, 2016 addEvent("Zomb_Jump") has to be addEvent("Zomb_Jump", true) If not already Link to comment
Electro88 Posted February 3, 2016 Author Share Posted February 3, 2016 Now again error why give error ? ERROR: client (Electro88) triggered serverside event onPlayerCheckForHexCodes, but event is not added serverside Link to comment
Electro88 Posted February 3, 2016 Author Share Posted February 3, 2016 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 Link to comment
1LoL1 Posted February 3, 2016 Share Posted February 3, 2016 Now again error why give error ? ERROR: client (Electro88) triggered serverside event onPlayerCheckForHexCodes, but event is not added serverside It's other function. Post the code. Link to comment
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