Ahmed Ly Posted March 15, 2016 Share 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) Link to comment
MrSAUD1 Posted March 15, 2016 Share Posted March 15, 2016 انت وش تبي تسوي بضبط ؟ تبي تسوي ترقير للنص و يظهر في الـ اليبل ول ايش ؟ Link to comment
Ahmed Ly Posted March 15, 2016 Author Share Posted March 15, 2016 انت وش تبي تسوي بضبط ؟تبي تسوي ترقير للنص و يظهر في الـ اليبل ول ايش ؟ يب نبي نسوي ترقير للنص يظهر يعني لم نضرب حد علي راسه يطلع في شاشه مثلــ headshot + 5 Link to comment
Abdul KariM Posted March 15, 2016 Share Posted March 15, 2016 طبعا راجع بارتمنز الحدث وراح تعرف خطأك شوف البارتمنز الاول وش وشوف انت وش حاط Link to comment
MrSAUD1 Posted March 15, 2016 Share 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 ) Link to comment
Ahmed Ly Posted March 15, 2016 Author Share 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 كيف ؟ Link to comment
MrSAUD1 Posted March 15, 2016 Share 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) Link to comment
Ahmed Ly Posted March 15, 2016 Author Share 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) مافهمت منك شي Link to comment
MrSAUD1 Posted March 15, 2016 Share Posted March 15, 2016 ما اظنة شي يحتاج فهم , اعطيتك كود كان معي / مو انا مسوية ! كل شي واضح فيه , حدث متكرر , جلب احداثيات , كل شويه يزود 2 على اكس , يتحقق وصل 450 ينقص 200 يحرك اليبل على الاحداثيات ! و يستمر الوضع كذا + موجود كل شي له في الويكي Link to comment
Ahmed Ly Posted March 15, 2016 Author Share Posted March 15, 2016 شو تبي بالضبط ؟ نبي ندير لم نضرب حد علي راسه و يموت يظهر النص في شاشه و النص هدا نبيه يتحرك فوق و تحت Link to comment
MohamedWaheed Posted March 15, 2016 Share 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 جرب :] Link to comment
MrSAUD1 Posted March 15, 2016 Share Posted March 15, 2016 شو تبي بالضبط ؟ نبي ندير لم نضرب حد علي راسه و يموت يظهر النص في شاشه و النص هدا نبيه يتحرك فوق و تحت اظن اني اعطيتة كل الكود , واضحة موضحة ما اشوف اي شي جديد Link to comment
Ahmed Ly Posted March 15, 2016 Author Share 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 فوق راس لاعب ؟ Link to comment
HassoN Posted March 15, 2016 Share Posted March 15, 2016 استعمل dxDrawTextOnElement وفك نفسك من اللحسة Link to comment
Ahmed Ly Posted March 15, 2016 Author Share Posted March 15, 2016 استعمل dxDrawTextOnElement وفك نفسك من اللحسة شكرا لك + ممكن تصلح ليا كود Link to comment
MohamedWaheed Posted March 15, 2016 Share 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 وخلي اللاعب وجهه للامام وصمم فوق راسه Link to comment
MrSAUD1 Posted March 15, 2016 Share Posted March 15, 2016 الرجال يقصد يكون فوق الاعب في العالم نفسة , مو في الشاشة , استخدم / getDistanceBetweenPoints3D Link to comment
Ahmed Ly Posted March 16, 2016 Author Share 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 ) Link to comment
Me[Z]oO Posted March 16, 2016 Share 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 ) م في خطأ اطرح التريقر للكلنت Link to comment
Me[Z]oO Posted March 16, 2016 Share Posted March 16, 2016 ي معلم sendClientMassage كيف كلنت بدلها ب sendServerMessage Link to comment
Ahmed Ly Posted March 16, 2016 Author Share 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 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