Jump to content

مساعدة


Maksoud

Recommended Posts

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

سويت مود

المود عبارة عن : 
اكتب شئ بالايدت و اضغط على زر اقوم باضافة رو

يتم حفظ الرو فى xml

المشكلة :

حفظت الرو | حاولت امسحه | يتمسح بس لما اقفل اللوحة و افتحها القى الرو المسحته موجود

الرجاء المساعدة 

محاولتي لمسح الرو : 

addEventHandler("onClientGUIClick",root,
function ( )
local sel = guiGridListGetSelectedItem(gridLinks)	
    if ( source == btnDelete ) then
	if sel ~= -1 then
      local veh = xmlLoadFile ( 'Songs1.xml' )
        if veh then
            for k,v in ipairs ( xmlNodeGetChildren ( veh ) ) do
                if xmlNodeGetAttributes ( v ).SongNamea == guiGridListGetSelectedItemText ( gridLinks, 1 ) then 
                    xmlNodeSetAttribute ( v, 'SongNamea', nil )
                        xmlNodeSetAttribute ( v, 'SongLinka', nil )
                            xmlDestroyNode ( v )
            end
        end
            xmlSaveFile ( veh )
                xmlUnloadFile ( veh )
                    guiGridListRemoveRow(gridLinks,guiGridListGetSelectedItem(gridLinks))
				end
            end
		end
end
)	

ارجوا الرد السريع

شكرا مقدما

Link to comment
addEventHandler("onClientGUIClick",root,
function ( )
    if ( source == btnDelete ) then
		local sel = guiGridListGetSelectedItem(gridLinks)	
		if sel ~= -1 then
			local veh = xmlLoadFile ( 'Songs1.xml' )
			if veh then
				for k,v in ipairs ( xmlNodeGetChildren ( veh ) ) do
					if xmlNodeGetAttributes ( v ).SongNamea == guiGridListGetItemText ( gridLinks, sel ,1) then 
						xmlDestroyNode ( v )
						xmlSaveFile ( veh )
						xmlUnloadFile ( veh )
						guiGridListRemoveRow(gridLinks,sel)
						break
					end
				end
			end
		end
	end
end
)	

 

Link to comment
2 hours ago, NssoR said:

addEventHandler("onClientGUIClick",root,
function ( )
    if ( source == btnDelete ) then
		local sel = guiGridListGetSelectedItem(gridLinks)	
		if sel ~= -1 then
			local veh = xmlLoadFile ( 'Songs1.xml' )
			if veh then
				for k,v in ipairs ( xmlNodeGetChildren ( veh ) ) do
					if xmlNodeGetAttributes ( v ).SongNamea == guiGridListGetItemText ( gridLinks, sel ,1) then 
						xmlDestroyNode ( v )
						xmlSaveFile ( veh )
						xmlUnloadFile ( veh )
						guiGridListRemoveRow(gridLinks,sel)
						break
					end
				end
			end
		end
	end
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...