Jump to content

تصحيح


Recommended Posts

السلام عليكم

وين خطا في كود هدا ؟

كلنت

  
  
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
انت وش تبي تسوي بضبط ؟

تبي تسوي ترقير للنص و يظهر في الـ اليبل ول ايش ؟

يب نبي نسوي ترقير للنص يظهر يعني لم نضرب حد علي راسه يطلع في شاشه

مثلــ

headshot + 5

Link to comment

ذا مثال بسيط !

  
-- كلنت 
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
ذا مثال بسيط !
  
-- كلنت 
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
ذا مثال بسيط !
  
-- كلنت 
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
ذا مثال بسيط !
  
-- كلنت 
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) 
  

مافهمت منك شي

:roll::?:

Link to comment

ما اظنة شي يحتاج فهم ,

اعطيتك كود كان معي / مو انا مسوية !

كل شي واضح فيه ,

حدث متكرر ,

جلب احداثيات ,

كل شويه يزود 2 على اكس ,

يتحقق وصل 450

ينقص 200

يحرك اليبل على الاحداثيات !

و يستمر الوضع كذا

+

موجود كل شي له في الويكي

Link to comment

طيب اذا كلامي خطأ قول لي

اول شي :- الاستخراج انت مسوية بالتوب بار شات حق الهيد شوت , تمام

ثاني شي خلي ال

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
شو تبي بالضبط ؟

نبي ندير

لم نضرب حد علي راسه و يموت يظهر النص في شاشه و النص هدا نبيه يتحرك فوق و تحت

اظن اني اعطيتة كل الكود ,

واضحة موضحة ما اشوف اي شي جديد

Link to comment
طيب اذا كلامي خطأ قول لي

اول شي :- الاستخراج انت مسوية بالتوب بار شات حق الهيد شوت , تمام

ثاني شي خلي ال

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
طيب اذا كلامي خطأ قول لي

اول شي :- الاستخراج انت مسوية بالتوب بار شات حق الهيد شوت , تمام

ثاني شي خلي ال

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
اطرح كودك بعد التعديل .
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
اطرح كودك بعد التعديل .
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
اطرح كودك بعد التعديل .
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

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