Jump to content

مشكلة في سكربتي


mustang

Recommended Posts

السلام عليكم

في عندي مشكلة والله ماني عارف كيف ازبطها

 

function engineT() 
  
window8 = guiCreateWindow(466, 175, 411, 234, " ", false) 
vid =  guiCreateEdit(180, 31, 84, 25, "", false, window8) 
combobox = guiCreateComboBox(144, 70, 229, 109, "Engine 4 (Golden Feathers)", false, window8) 
  
button1 = guiCreateButton(52, 190, 115, 31, "Install", false, window8) 
addEventHandler("onClientGUIClick", button1, installe, false) 
  
  
end 
addCommandHandler ( "engineworks", engineT )     
  
  
  
function installe() 
  
  
local vehid = guiGetText(vid) 
local enginen = guiComboBoxGetSelected(comboBox)   
  
  
  
local result = exports.mysql:query_free("UPDATE vehicles SET HD = " .. vehid .. " WHERE id = ".. enginen ) 
  
  
  
end   

WARRNING: ****/***.lua:59Bad argument @ 'guiGetText' [Expected gui-element at argument 1, go nil]

WARRNING: ****/***.lua:59Bad argument @ 'guiComboBoxGetSelected' [Expected gui-element at argument 1, go nil]

و شكرا

Edited by Guest
Link to comment

هذا إلكود معدل على طريقة عاشق

    function engineT() 
      
    window8 = guiCreateWindow(466, 175, 411, 234, " ", false) 
    vid =  guiCreateEdit(180, 31, 84, 25, "", false, window8) 
    combobox = guiCreateComboBox(144, 70, 229, 109, "Engine 4 (Golden Feathers)", false, window8) 
      
    button1 = guiCreateButton(52, 190, 115, 31, "Install", false, window8) 
    addEventHandler("onClientGUIClick", button1, installe, false) 
      
      
    end 
    addCommandHandler ( "engineworks", engineT )     
      
      
      
    function installe() 
      
    local vehid = guiComboBoxGetItemText( vid, guiGetText( vid ) )  
    local enginen = guiComboBoxGetItemText( combobox, guiComboBoxGetSelected( combobox ) )  
      
      
    local result = exports.mysql:query_free("UPDATE vehicles SET HD = " .. vehid .. " WHERE id = ".. enginen ) 
      
      
      
    end   

Link to comment

-- Client Side # 
window8 = guiCreateWindow(466, 175, 411, 234, " ", false) 
vid =  guiCreateEdit(180, 31, 84, 25, "", false, window8) 
combobox = guiCreateComboBox(144, 70, 229, 109, "Engine 4 (Golden Feathers)", false, window8) 
button1 = guiCreateButton(52, 190, 115, 31, "Install", false, window8) 
guiSetVisible(window8,false) 
     
function engineT() 
     guiSetVisible(window8,not guiGetVisible(window8)) 
     showCursor(guiGetVisible(window8)) 
end 
addCommandHandler ( "engineworks", engineT )  
  
addEventHandler("onClientGUIClick", button1, installe, false) 
      
     
      
addEventHandler("onClientGUIClick", button1,function () 
        local vehid =  guiGetText( vid ) 
        local enginen = guiComboBoxGetItemText( combobox, guiComboBoxGetSelected( combobox ) ) 
        local result = exports.mysql:query_free("UPDATE vehicles SET HD = " .. vehid .. " WHERE id = ".. enginen ) 
    end ,false 
) 

لو ما اشتغل اطرح اكوادك كامله عشان نقدر نساعدك !

Link to comment
-- Client Side # 
window8 = guiCreateWindow(466, 175, 411, 234, " ", false) 
vid =  guiCreateEdit(180, 31, 84, 25, "", false, window8) 
combobox = guiCreateComboBox(144, 70, 229, 109, "Engine 4 (Golden Feathers)", false, window8) 
button1 = guiCreateButton(52, 190, 115, 31, "Install", false, window8) 
guiSetVisible(window8,false) 
     
function engineT() 
     guiSetVisible(window8,not guiGetVisible(window8)) 
     showCursor(guiGetVisible(window8)) 
end 
addCommandHandler ( "engineworks", engineT )  
  
addEventHandler("onClientGUIClick", button1, installe, false) 
      
     
      
addEventHandler("onClientGUIClick", button1,function () 
        local vehid =  guiGetText( vid ) 
        local enginen = guiComboBoxGetItemText( combobox, guiComboBoxGetSelected( combobox ) ) 
        local result = exports.mysql:query_free("UPDATE vehicles SET HD = " .. vehid .. " WHERE id = ".. enginen ) 
    end ,false 
) 

لو ما اشتغل اطرح اكوادك كامله عشان نقدر نساعدك !

إلايرور بطل يطلع ، بس إلمشكله الآن إنه إلقيمة ما بتتغير بال database

كمان هذا تقريبا كل إلكود الباقي tables فيهم تعديل handling ماله دخل

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