E-mail Posted August 17, 2011 Posted August 17, 2011 Hi All i start Script dont work col = {} col.black = tocolor(0,0,0,200) col.npctitle = tocolor(142,196,131,255) newsMsg = { "آهلا بكم في سيرفر كلآن هآو", "سجل في السيرفر ليتم حفظ نقآطك", "BaseMode1.1" } text = newsMsg[1] local start = getTickCount() function drawInfoBox() --[[dxDrawRectangle(0,sh-24,sw,sh,col.black) dxDrawText(test, 10,sh-20,sw,sh,col.npctitle, 1,"default")]] local now = getTickCount() local time = now - start local scale = 0.6 local font = "bankgothic" local duration = 30000 local width = dxGetTextWidth(text, scale, font) dxDrawRectangle(0, sh-24, sw, sh, col.black) if time > duration then start = now text = newsMsg[math.random(1, table.getn(newsMsg))] end dxDrawText(text, math.mod(time, duration) / duration * (sw + width) - width, sh-20, sw, sh, col.npctitle, scale, font) end addEventHandler("onClientPreRender", drawInfoBox) Please Fix
will briggs Posted August 17, 2011 Posted August 17, 2011 Ok, Use /debugscript 3 and tell us what errors you are getting... if any Regards Founder of SAUR - Founder/Owner of ARC RPG
Kenix Posted August 17, 2011 Posted August 17, 2011 (edited) Where is variable sw,sh this is not full code maybe show full code ? col = {} col.black = tocolor(0,0,0,200) col.npctitle = tocolor(142,196,131,255) newsMsg = { "آهلا بكم في سيرفر كلآن هآو", "سجل في السيرفر ليتم حفظ نقآطك", "BaseMode1.1" } text = newsMsg[1] local start = getTickCount() function drawInfoBox() local now = getTickCount() local time = now - start local scale = 0.6 local font = "bankgothic" local duration = 30000 local width = dxGetTextWidth(text, scale, font) dxDrawRectangle(0, sh-24, sw, sh, col.black) if time > duration then start = now text = newsMsg[math.random(1, table.getn(newsMsg))] end dxDrawText(text, math.mod(time, duration) / duration * (sw + width) - width, sh-20, sw, sh, col.npctitle, scale, font) end addEventHandler("onClientRender",root, drawInfoBox) Edited August 17, 2011 by Guest http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
E-mail Posted August 17, 2011 Author Posted August 17, 2011 Hi debug script give me This a.lua:15:unexpcted symbol near "]"
will briggs Posted August 17, 2011 Posted August 17, 2011 Ok then try this... col = {} col.black = tocolor(0,0,0,200) col.npctitle = tocolor(142,196,131,255) newsMsg = { "آهلا بكم في سيرفر كلآن هآو", "سجل في السيرفر ليتم حفظ نقآطك", "BaseMode1.1" } text = newsMsg[1] local start = getTickCount() function drawInfoBox() local now = getTickCount() local time = now - start local scale = 0.6 local font = "bankgothic" local duration = 30000 local width = dxGetTextWidth(text, scale, font) dxDrawRectangle(0, sh-24, sw, sh, col.black) if time > duration then start = now text = newsMsg[math.random(1, table.getn(newsMsg))] end dxDrawText(text, math.mod(time, duration) / duration * (sw + width) - width, sh-20, sw, sh, col.npctitle, scale, font) end addEventHandler("onClientPreRender", drawInfoBox) Founder of SAUR - Founder/Owner of ARC RPG
Kenix Posted August 17, 2011 Posted August 17, 2011 E-mail, read my upper post please. http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
will briggs Posted August 17, 2011 Posted August 17, 2011 THat would be advisable im more of a C++ person me, or a bit of Blitz Basic Founder of SAUR - Founder/Owner of ARC RPG
CapY Posted August 17, 2011 Posted August 17, 2011 If that is Welcome Msg, why should be "onClientPreRender" Why not "onClientResourceStart" ?
will briggs Posted August 17, 2011 Posted August 17, 2011 Number one you wouldnt use on client resource start, It would have to be onplayer join. Which is server side. He's using on client pre render, So when you download all the files, the first thing you will see is that message. Thats why But a good shot at it capy, Your getting better and off topic, Sorry about before... Founder of SAUR - Founder/Owner of ARC RPG
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