Jump to content

تعديل


shwaeki

Recommended Posts

Posted

السلام عليكم و رحمة الله و بركاتة

Occupation انا ظفت اسم في تاب هو

بس المشكلة لما ادخل داتا ما بيحط اسمها في هاد الحز يلي في تاب

اكوادي

اكلنت

  
GUIEditor = { 
    button = {}, 
    window = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(489, 146, 324, 257, "", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        GUIEditor.button[1] = guiCreateButton(32, 48, 98, 69, "", false, GUIEditor.window[1]) 
        GUIEditor.button[2] = guiCreateButton(203, 48, 98, 69, "", false, GUIEditor.window[1]) 
        GUIEditor.button[3] = guiCreateButton(32, 161, 98, 69, "", false, GUIEditor.window[1]) 
        GUIEditor.button[4] = guiCreateButton(203, 161, 98, 69, "", false, GUIEditor.window[1])     
    end 
) 
  
  
  
  
  
  addEventHandler('onClientGUIClick', root,  
   function ( ) 
    if ( source == GUIEditor.button[1] ) then  
    setElementData(localPlayer,"Occupation",taxi) 
   end 
end  
) 
  
  
  addEventHandler('onClientGUIClick', root,  
   function ( ) 
    if ( source == GUIEditor.button[2] ) then  
    setElementData(localPlayer,"Occupation",iron)  
   end 
end  
) 
  
  
  addEventHandler('onClientGUIClick', root,  
   function ( ) 
    if ( source == GUIEditor.button[3] ) then  
    setElementData(localPlayer,"Occupation",farmer)  
   end 
end  
) 
  
  
  
  addEventHandler('onClientGUIClick', root,  
   function ( ) 
    if ( source == GUIEditor.button[4] ) then  
    setElementData(localPlayer,"Occupation",police)  
   end 
end  
) 

سيرفر

exports.scoreboard:addScoreboardColumn("Occupation") 

Posted
السلام عليكم و رحمة الله و بركاتة

Occupation انا ظفت اسم في تاب هو

بس المشكلة لما ادخل داتا ما بيحط اسمها في هاد الحز يلي في تاب

اكوادي

اكلنت

  
GUIEditor = { 
    button = {}, 
    window = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(489, 146, 324, 257, "", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        GUIEditor.button[1] = guiCreateButton(32, 48, 98, 69, "", false, GUIEditor.window[1]) 
        GUIEditor.button[2] = guiCreateButton(203, 48, 98, 69, "", false, GUIEditor.window[1]) 
        GUIEditor.button[3] = guiCreateButton(32, 161, 98, 69, "", false, GUIEditor.window[1]) 
        GUIEditor.button[4] = guiCreateButton(203, 161, 98, 69, "", false, GUIEditor.window[1])     
    end 
) 
  
  
  
  
  
  addEventHandler('onClientGUIClick', root,  
   function ( ) 
    if ( source == GUIEditor.button[1] ) then  
    setElementData(localPlayer,"Occupation",taxi) 
   end 
end  
) 
  
  
  addEventHandler('onClientGUIClick', root,  
   function ( ) 
    if ( source == GUIEditor.button[2] ) then  
    setElementData(localPlayer,"Occupation",iron)  
   end 
end  
) 
  
  
  addEventHandler('onClientGUIClick', root,  
   function ( ) 
    if ( source == GUIEditor.button[3] ) then  
    setElementData(localPlayer,"Occupation",farmer)  
   end 
end  
) 
  
  
  
  addEventHandler('onClientGUIClick', root,  
   function ( ) 
    if ( source == GUIEditor.button[4] ) then  
    setElementData(localPlayer,"Occupation",police)  
   end 
end  
) 

سيرفر

exports.scoreboard:addScoreboardColumn("Occupation") 

طبعاً ماراح يحطها لانك تحط داتا بدون معرف او شيء يعرف القيمة مثل :

police

taxi

اذا تبيه يظهرضيف لهم سترنق .. [ علامات التنصيص ] للتوضيح فقط ..

وحاول تختصر اكوادك ي بطل .

Posted

يعني هيك

  
GUIEditor = { 
    button = {}, 
    window = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(489, 146, 324, 257, "", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        GUIEditor.button[1] = guiCreateButton(32, 48, 98, 69, "", false, GUIEditor.window[1]) 
        GUIEditor.button[2] = guiCreateButton(203, 48, 98, 69, "", false, GUIEditor.window[1]) 
        GUIEditor.button[3] = guiCreateButton(32, 161, 98, 69, "", false, GUIEditor.window[1]) 
        GUIEditor.button[4] = guiCreateButton(203, 161, 98, 69, "", false, GUIEditor.window[1])     
    end 
) 
  
  
  
  
  
  addEventHandler('onClientGUIClick', root, 
   function ( ) 
    elseif ( source == GUIEditor.button[1] ) then 
    setElementData(localPlayer,"Occupation",[taxi]) 
    elseif ( source == GUIEditor.button[2] ) then 
    setElementData(localPlayer,"Occupation",[iron]) 
    elseif ( source == GUIEditor.button[3] ) then 
    setElementData(localPlayer,"Occupation",[farmer]) 
    elseif ( source == GUIEditor.button[4] ) then 
    setElementData(localPlayer,"Occupation",[police]) 
   end 
end 
) 

Posted
GUIEditor = { 
    button = {}, 
    window = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(489, 146, 324, 257, "", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        GUIEditor.button[1] = guiCreateButton(32, 48, 98, 69, "", false, GUIEditor.window[1]) 
        GUIEditor.button[2] = guiCreateButton(203, 48, 98, 69, "", false, GUIEditor.window[1]) 
        GUIEditor.button[3] = guiCreateButton(32, 161, 98, 69, "", false, GUIEditor.window[1]) 
        GUIEditor.button[4] = guiCreateButton(203, 161, 98, 69, "", false, GUIEditor.window[1])     
    end 
) 
  
DataValues = { 
    [1] = { 'taxi' }, 
    [2] = { 'iron' }, 
    [3] = { 'farmer' }, 
    [4] = { 'police' } 
} 
  
addEventHandler ( 'onClientGUIClick',root, 
    function (      ) 
        for Key = 1,#GUIEditor.button do 
            if source == GUIEditor.button[ Key ] then 
                setElementData ( localPlayer,'Occupation',DataValues [ Key ] [ 1 ] ) 
            end 
        end 
    end 
) 

Posted

انا ما بدي اسوي جدول بدي من دون جدول لانو هاد بس عشين انزل علية موضوع يعني تجربة انا يلي عندي زر واحد مو محتاجة كل هاد الشي لو في طريقة اسهل و اسرع

Posted

اذا اكثر من زر او زرين اشوف اللي عطيتك انسب طريقة لكن بـ كودك يصير كذا :

addEventHandler('onClientGUIClick', GUIEditor.button[3], 
   function ( ) 
        setElementData ( localPlayer,'Occupation','farmer' ) 
    end,false 
) 

Posted

اها

يعني لو اسوي هيك

ما يحتاج احط فلس

عشين عندي زر للداتا و زر اغلاق

GUIEditor = { 
    button = {}, 
    window = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(489, 146, 324, 257, "", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        GUIEditor.button[1] = guiCreateButton(32, 48, 98, 69, "", false, GUIEditor.window[1]) 
        GUIEditor.button[2] = guiCreateButton(203, 48, 98, 69, "", false, GUIEditor.window[1]) 
  
    end 
) 
  
  
  
  
  addEventHandler('onClientGUIClick', root, 
   function ( ) 
    if ( source == GUIEditor.button[1] ) then 
    setElementData ( localPlayer,'Occupation','farmer' ) 
    elseif ( source == GUIEditor.button[2] ) then 
   guiSetVisible (GUIEditor.window[1], false) 
    showCursor (false) 
   end 
end 
) 

Posted

طيب الحين انا عندي نقول 20 وظيفة

ابية اذا دخل واحدة ما يكون الى فيها

يعني ما يكون الى في وظيفة واحدة

لازم اسوي 20 من

removeElementData 

عشين يشيلة من الوظيفة

لانو يمكن يكون من اي واحدة من ال 20 وظيفة

Posted
طيب الحين انا عندي نقول 20 وظيفة

ابية اذا دخل واحدة ما يكون الى فيها

يعني ما يكون الى في وظيفة واحدة

لازم اسوي 20 من

removeElementData 

عشين يشيلة من الوظيفة

لانو يمكن يكون من اي واحدة من ال 20 وظيفة

اذا كانت داتا وحدة اللي هي 'Occupation' ..

مايحتاج لانة هو يعين نفس الداتا بتغيير القيمة مثلاً القيمة الحاليه :

false

تسوي أمر يحطها

farmer

بيتغير الفولس لـ فارمر ..

أتمنى وضحت اللي تبية .

Posted

يب مشكوررر

انا اخت المود و جربت اذا دخلت داتا بطلعني من التانية

هاد يلي بدي اياه

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...