Ahmed Ly Posted March 15, 2016 Posted March 15, 2016 السلام عليكم وين خطا في كود هدا ؟ كلنت GUIEditor = { label = {}, } GUIEditor.label[1] = guiCreateLabel(288, 306, 158, 45, "Head_Shot + 5", false) local font_0 = guiCreateFont("Dragon.ttf",13) guiSetFont(GUIEditor.label[1], font_0) guiLabelSetColor(GUIEditor.label[1], 24, 49, 230) guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) guiSetVisible(GUIEditor.label[1],false) function head() sound = playSound("HeadShot.mp3", false) setSoundVolume(sound, 1.0) guiSetVisible(GUIEditor.label[1],true) x,y = guiGetPosition(GUIEditor.label[1] ,false) xN,xY = x + 1 , y if xN >= 700 then xN = 100 guiSetPosition(GUIEditor.label[1] ,xN,xY,false) setTimer(closewin, 3000, 1) end end addEvent("text", true) addEventHandler("text", getRootElement(), head) function closewin() guiSetVisible(GUIEditor.label[1],false) end سيرفر function playerDamage ( attacker, bodypart ) if (attacker and attacker ~= source and isElement(attacker)) and bodypart == 9 then exports["topbarchat"]:sendClientMessage ( "[server-Dragon] Head Shot",attacker, 255, 170, 0 ) triggerClientEvent(attacker,"text",attacker) end end addEventHandler("onPlayerWasted",root,playerDamage)
MrSAUD1 Posted March 15, 2016 Posted March 15, 2016 انت وش تبي تسوي بضبط ؟ تبي تسوي ترقير للنص و يظهر في الـ اليبل ول ايش ؟
Ahmed Ly Posted March 15, 2016 Author Posted March 15, 2016 انت وش تبي تسوي بضبط ؟تبي تسوي ترقير للنص و يظهر في الـ اليبل ول ايش ؟ يب نبي نسوي ترقير للنص يظهر يعني لم نضرب حد علي راسه يطلع في شاشه مثلــ headshot + 5
Abdul KariM Posted March 15, 2016 Posted March 15, 2016 طبعا راجع بارتمنز الحدث وراح تعرف خطأك شوف البارتمنز الاول وش وشوف انت وش حاط
MrSAUD1 Posted March 15, 2016 Posted March 15, 2016 ذا مثال بسيط ! -- كلنت function msg(Tab, Text) if Tab == "text1" then guiSetText(GUIEditor.label[1], tostring(Text)) setTimer(function() guiSetText(GUIEditor.label[1], "") end,3500,1) end end addEvent("text",true) addEventHandler("text",getRootElement(),msg) -- سيرفر addEventHandler ( "onPlayerSpawn", root, function() triggerClientEvent(source,"text",getRootElement(),"text1"," سباون !") end )
Ahmed Ly Posted March 15, 2016 Author Posted March 15, 2016 ذا مثال بسيط ! -- كلنت function msg(Tab, Text) if Tab == "text1" then guiSetText(GUIEditor.label[1], tostring(Text)) setTimer(function() guiSetText(GUIEditor.label[1], "") end,3500,1) end end addEvent("text",true) addEventHandler("text",getRootElement(),msg) -- سيرفر addEventHandler ( "onPlayerSpawn", root, function() triggerClientEvent(source,"text",getRootElement(),"text1"," سباون !") end ) شكرا لك + كيف نحرك GUIEditor.label[1] ?? نستعمل guiGetPosition كيف ؟
MrSAUD1 Posted March 15, 2016 Posted March 15, 2016 ذا مثال بسيط ! -- كلنت function msg(Tab, Text) if Tab == "text1" then guiSetText(GUIEditor.label[1], tostring(Text)) setTimer(function() guiSetText(GUIEditor.label[1], "") end,3500,1) end end addEvent("text",true) addEventHandler("text",getRootElement(),msg) -- سيرفر addEventHandler ( "onPlayerSpawn", root, function() triggerClientEvent(source,"text",getRootElement(),"text1"," سباون !") end ) شكرا لك + كيف نحرك GUIEditor.label[1] ?? نستعمل guiGetPosition كيف ؟ addEventHandler("onClientRender",getRootElement(),function() x,y = guiGetPosition(GUIEditor.label[1],false) xN,xY = x + 2 , y if xN >= 450 then xN = -200 end guiSetPosition(GUIEditor.label[1],xN,xY,false) end)
Ahmed Ly Posted March 15, 2016 Author Posted March 15, 2016 ذا مثال بسيط ! -- كلنت function msg(Tab, Text) if Tab == "text1" then guiSetText(GUIEditor.label[1], tostring(Text)) setTimer(function() guiSetText(GUIEditor.label[1], "") end,3500,1) end end addEvent("text",true) addEventHandler("text",getRootElement(),msg) -- سيرفر addEventHandler ( "onPlayerSpawn", root, function() triggerClientEvent(source,"text",getRootElement(),"text1"," سباون !") end ) شكرا لك + كيف نحرك GUIEditor.label[1] ?? نستعمل guiGetPosition كيف ؟ addEventHandler("onClientRender",getRootElement(),function() x,y = guiGetPosition(GUIEditor.label[1],false) xN,xY = x + 2 , y if xN >= 450 then xN = -200 end guiSetPosition(GUIEditor.label[1],xN,xY,false) end) مافهمت منك شي
MrSAUD1 Posted March 15, 2016 Posted March 15, 2016 ما اظنة شي يحتاج فهم , اعطيتك كود كان معي / مو انا مسوية ! كل شي واضح فيه , حدث متكرر , جلب احداثيات , كل شويه يزود 2 على اكس , يتحقق وصل 450 ينقص 200 يحرك اليبل على الاحداثيات ! و يستمر الوضع كذا + موجود كل شي له في الويكي
Ahmed Ly Posted March 15, 2016 Author Posted March 15, 2016 شو تبي بالضبط ؟ نبي ندير لم نضرب حد علي راسه و يموت يظهر النص في شاشه و النص هدا نبيه يتحرك فوق و تحت
MohamedWaheed Posted March 15, 2016 Posted March 15, 2016 طيب اذا كلامي خطأ قول لي اول شي :- الاستخراج انت مسوية بالتوب بار شات حق الهيد شوت , تمام ثاني شي خلي ال label فوق راس اللاعب الى قتل واستخدم local sX, sY = guiGetScreenSize() GUIEditor = { label = {}, } GUIEditor.label[1] = guiCreateLabel(sX/288,sY/306, 158, 45, "Head_Shot + 5", false) local font_0 = guiCreateFont("Dragon.ttf",13) guiSetFont(GUIEditor.label[1], font_0) guiLabelSetColor(GUIEditor.label[1], 24, 49, 230) guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) guiSetVisible(GUIEditor.label[1],false) function head() sound = playSound("HeadShot.mp3", false) setSoundVolume(sound, 1.0) guiSetVisible(GUIEditor.label[1],true) x,y = guiGetPosition(GUIEditor.label[1] ,false) xN,xY = x + 1 , y if xN >= 700 then xN = 100 guiSetPosition(GUIEditor.label[1] ,xN,xY,false) setTimer(closewin, 3000, 1) end end addEvent("text", true) addEventHandler("text", getRootElement(), head) function closewin() guiSetVisible(GUIEditor.label[1],false) end جرب :]
MrSAUD1 Posted March 15, 2016 Posted March 15, 2016 شو تبي بالضبط ؟ نبي ندير لم نضرب حد علي راسه و يموت يظهر النص في شاشه و النص هدا نبيه يتحرك فوق و تحت اظن اني اعطيتة كل الكود , واضحة موضحة ما اشوف اي شي جديد
Ahmed Ly Posted March 15, 2016 Author Posted March 15, 2016 طيب اذا كلامي خطأ قول لياول شي :- الاستخراج انت مسوية بالتوب بار شات حق الهيد شوت , تمام ثاني شي خلي ال label فوق راس اللاعب الى قتل واستخدم local sX, sY = guiGetScreenSize() GUIEditor = { label = {}, } GUIEditor.label[1] = guiCreateLabel(sX/288,sY/306, 158, 45, "Head_Shot + 5", false) local font_0 = guiCreateFont("Dragon.ttf",13) guiSetFont(GUIEditor.label[1], font_0) guiLabelSetColor(GUIEditor.label[1], 24, 49, 230) guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) guiSetVisible(GUIEditor.label[1],false) function head() sound = playSound("HeadShot.mp3", false) setSoundVolume(sound, 1.0) guiSetVisible(GUIEditor.label[1],true) x,y = guiGetPosition(GUIEditor.label[1] ,false) xN,xY = x + 1 , y if xN >= 700 then xN = 100 guiSetPosition(GUIEditor.label[1] ,xN,xY,false) setTimer(closewin, 3000, 1) end end addEvent("text", true) addEventHandler("text", getRootElement(), head) function closewin() guiSetVisible(GUIEditor.label[1],false) end جرب :] طيب كيف اخلي label فوق راس لاعب ؟
Ahmed Ly Posted March 15, 2016 Author Posted March 15, 2016 استعمل dxDrawTextOnElement وفك نفسك من اللحسة شكرا لك + ممكن تصلح ليا كود
MohamedWaheed Posted March 15, 2016 Posted March 15, 2016 طيب اذا كلامي خطأ قول لياول شي :- الاستخراج انت مسوية بالتوب بار شات حق الهيد شوت , تمام ثاني شي خلي ال label فوق راس اللاعب الى قتل واستخدم local sX, sY = guiGetScreenSize() GUIEditor = { label = {}, } GUIEditor.label[1] = guiCreateLabel(sX/288,sY/306, 158, 45, "Head_Shot + 5", false) local font_0 = guiCreateFont("Dragon.ttf",13) guiSetFont(GUIEditor.label[1], font_0) guiLabelSetColor(GUIEditor.label[1], 24, 49, 230) guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) guiSetVisible(GUIEditor.label[1],false) function head() sound = playSound("HeadShot.mp3", false) setSoundVolume(sound, 1.0) guiSetVisible(GUIEditor.label[1],true) x,y = guiGetPosition(GUIEditor.label[1] ,false) xN,xY = x + 1 , y if xN >= 700 then xN = 100 guiSetPosition(GUIEditor.label[1] ,xN,xY,false) setTimer(closewin, 3000, 1) end end addEvent("text", true) addEventHandler("text", getRootElement(), head) function closewin() guiSetVisible(GUIEditor.label[1],false) end جرب :] طيب كيف اخلي label فوق راس لاعب ؟ سهله هات شخصيه سي حي وقف ع زاويه 90 وخلي اللاعب وجهه للامام وصمم فوق راسه
MrSAUD1 Posted March 15, 2016 Posted March 15, 2016 الرجال يقصد يكون فوق الاعب في العالم نفسة , مو في الشاشة , استخدم / getDistanceBetweenPoints3D
Ahmed Ly Posted March 16, 2016 Author Posted March 16, 2016 اطرح كودك بعد التعديل . addEventHandler("onPlayerWasted",root, function ( _,attacker,bodypart ) if (attacker and attacker ~= source and isElement(attacker)) and bodypart == 9 ) then exports["topbarchat"]:sendClientMessage ( "[server-Dragon] Head Shot",attacker, 0, 255, 0 ) triggerClientEvent(attacker,"text",attacker) end end )
Me[Z]oO Posted March 16, 2016 Posted March 16, 2016 اطرح كودك بعد التعديل . addEventHandler("onPlayerWasted",root, function ( _,attacker,bodypart ) if (attacker and attacker ~= source and isElement(attacker)) and bodypart == 9 ) then exports["topbarchat"]:sendClientMessage ( "[server-Dragon] Head Shot",attacker, 0, 255, 0 ) triggerClientEvent(attacker,"text",attacker) end end ) م في خطأ اطرح التريقر للكلنت
Me[Z]oO Posted March 16, 2016 Posted March 16, 2016 ي معلم sendClientMassage كيف كلنت بدلها ب sendServerMessage
Ahmed Ly Posted March 16, 2016 Author Posted March 16, 2016 اطرح كودك بعد التعديل . addEventHandler("onPlayerWasted",root, function ( _,attacker,bodypart ) if (attacker and attacker ~= source and isElement(attacker)) and bodypart == 9 ) then exports["topbarchat"]:sendClientMessage ( "[server-Dragon] Head Shot",attacker, 0, 255, 0 ) triggerClientEvent(attacker,"text",attacker) end end ) م في خطأ اطرح التريقر للكلنت GUIEditor = { label = {}, } GUIEditor.label[1] = guiCreateLabel(288, 306, 158, 45, "Head_Shot + 5", false) local font_0 = guiCreateFont("Dragon.ttf",13) guiSetFont(GUIEditor.label[1], font_0) guiLabelSetColor(GUIEditor.label[1], 24, 49, 230) guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) guiSetVisible(GUIEditor.label[1],false) function head() sound = playSound("HeadShot.mp3", false) setSoundVolume(sound, 1.0) guiSetVisible(GUIEditor.label[1],true) x,y = guiGetPosition(GUIEditor.label[1] ,false) xN,xY = x + 1 , y if xN >= 700 then xN = 100 guiSetPosition(GUIEditor.label[1] ,xN,xY,false) setTimer(closewin, 3000, 1) end end addEvent("text", true) addEventHandler("text", getRootElement(), head) function closewin() guiSetVisible(GUIEditor.label[1],false) end
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