Jump to content

تصحيح كود الـ Info


Recommended Posts

Client Side :

  
-- # Client Side 
  
GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Grid = {} 
  
GUIEditor_Window[1] = guiCreateWindow(202,125,624,564,"Show gta3.img Files",false) 
guiSetAlpha(GUIEditor_Window[1],1) 
guiWindowSetSizable(GUIEditor_Window[1],false) 
GUIEditor_Grid[1] = guiCreateGridList(9,20,606,493,false,GUIEditor_Window[1]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
c1 = guiGridListAddColumn(GUIEditor_Grid[1],"Name",0.2) 
c = guiGridListAddColumn(GUIEditor_Grid[1],"the Info",0.9) 
GUIEditor_Button[1] = guiCreateButton(18,526,237,29,"Copy",false,GUIEditor_Window[1]) 
GUIEditor_Button[2] = guiCreateButton(413,519,202,36,"close Window",false,GUIEditor_Window[1]) 
  
  
  
guiSetVisible(GUIEditor_Window[1], false) 
showWindow = function() 
if (guiGetVisible(GUIEditor_Window[1]) == false) then 
guiSetVisible(GUIEditor_Window[1], true) 
showCursor( true ) 
else 
guiSetVisible(GUIEditor_Window[1], false) 
showCursor( false ) 
   end 
end 
bindKey("F6","down",showWindow) 
addEvent("addInfo", true) 
addEventHandler("addInfo", root, 
function( line, theName ) 
local row = guiGridListAddRow( GUIEditor_Grid[1] ) 
guiGridListSetItemText ( GUIEditor_Grid[1], row, c1, theName, false, false ) 
guiGridListSetItemText ( GUIEditor_Grid[1], row, c, line, false, false ) 
   end 
) 
  
addEventHandler("onClientGUIClick", root, 
function() 
if (source == GUIEditor_Button[2]) then 
guiSetVisible(GUIEditor_Window[1], false) 
showCursor( false ) 
elseif (source == GUIEditor_Button[1]) then 
theCopy = guiGridListGetItemText ( GUIEditor_Grid[1], guiGridListGetSelectedItem ( GUIEditor_Grid[1] ), c ) 
cop = setClipboard( theCopy ) 
if cop == true then 
 outputChatBox("Information has been copied 
", 255, 255, 0, false)  
 else 
outputChatBox("Please select that you want to copy 
", 255, 0, 0, false) 
end 
end 
end 
) 

Server Side :

  
-- # Server Side 
function handleOnPlayerModInfo(filename, modList) 
    local theName = getPlayerName(source):gsub("#%x%x%x%x%x%x","") 
    for idx, mod in ipairs(modList) do 
        local line = tostring(idx)..") "..tostring(mod.name) 
        triggerClientEvent(root, "addInfo", root, line, theName) 
    end 
end 
addEventHandler("onPlayerModInfo", root, handleOnPlayerModInfo) 
addEventHandler ( "onPlayerConnect", getRootElement(), handleOnPlayerModInfo ) 

الكود لـ :

KING-ABADY

من تعديل :

TAPL

فيه اخطاء ابيكم تصلحونها

Link to comment

اوك شكرا

الكلنت سايد بعد التعديل

  
-- # Client Side 
  
GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Grid = {} 
  
GUIEditor_Window[1] = guiCreateWindow(202,125,624,564,"Show gta3.img Files",false) 
guiSetAlpha(GUIEditor_Window[1],1) 
guiWindowSetSizable(GUIEditor_Window[1],false) 
GUIEditor_Grid[1] = guiCreateGridList(9,20,606,493,false,GUIEditor_Window[1]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
c1 = guiGridListAddColumn(GUIEditor_Grid[1],"Name",0.2) 
c = guiGridListAddColumn(GUIEditor_Grid[1],"the Info",0.9) 
GUIEditor_Button[1] = guiCreateButton(18,526,237,29,"Copy",false,GUIEditor_Window[1]) 
GUIEditor_Button[2] = guiCreateButton(413,519,202,36,"close Window",false,GUIEditor_Window[1]) 
  
  
  
guiSetVisible(GUIEditor_Window[1], false) 
showWindow = function() 
if (guiGetVisible(GUIEditor_Window[1]) == false) then 
guiSetVisible(GUIEditor_Window[1], true) 
showCursor( true ) 
else 
guiSetVisible(GUIEditor_Window[1], false) 
showCursor( false ) 
   end 
end 
bindKey("F6","down",showWindow) 
addEvent("addInfo", true) 
addEventHandler("addInfo", root, 
function( line, theName ) 
local row = guiGridListAddRow( GUIEditor_Grid[1] ) 
guiGridListSetItemText ( GUIEditor_Grid[1], row, c1, theName, false, false ) 
guiGridListSetItemText ( GUIEditor_Grid[1], row, c, line, false, false ) 
   end 
) 
  
addEventHandler("onClientGUIClick", root, 
function() 
if (source == GUIEditor_Button[2]) then 
guiSetVisible(GUIEditor_Window[1], false) 
showCursor( false ) 
elseif (source == GUIEditor_Button[1]) then 
theCopy = guiGridListGetItemText ( GUIEditor_Grid[1], guiGridListGetSelectedItem ( GUIEditor_Grid[1] ), c ) 
cop = setClipboard( theCopy ) 
if cop == true then 
outputChatBox("Information has been copied", 255, 255, 0, false) 
 else 
outputChatBox("Please select that you want to copy 
", 255, 0, 0, false) 
end 
end 
end 
end 
) 

صح ولا خطا ؟

Link to comment

! غير مجرب

  
-- # Client Side 
  
GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Grid = {} 
  
GUIEditor_Window[1] = guiCreateWindow(202,125,624,564,"Show gta3.img Files",false) 
guiSetAlpha(GUIEditor_Window[1],1) 
guiWindowSetSizable(GUIEditor_Window[1],false) 
guiSetVisible(GUIEditor_Window[1], false) 
GUIEditor_Grid[1] = guiCreateGridList(9,20,606,493,false,GUIEditor_Window[1]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
c1 = guiGridListAddColumn(GUIEditor_Grid[1],"Name",0.2) 
c = guiGridListAddColumn(GUIEditor_Grid[1],"the Info",0.9) 
GUIEditor_Button[1] = guiCreateButton(18,526,237,29,"Copy",false,GUIEditor_Window[1]) 
GUIEditor_Button[2] = guiCreateButton(413,519,202,36,"close Window",false,GUIEditor_Window[1]) 
  
function showWindow( ) 
    guiSetVisible( GUIEditor_Window[1], not guiGetVisible( GUIEditor_Window[1] ) ) 
    showCursor( guiGetVisible( GUIEditor_Window[1] ) ) 
end 
bindKey("F6","down",showWindow) 
  
addEvent("addInfo", true) 
addEventHandler("addInfo", root, 
    function( line, theName ) 
        local row = guiGridListAddRow( GUIEditor_Grid[1] ) 
        guiGridListSetItemText ( GUIEditor_Grid[1], row, c1, theName, false, false ) 
        guiGridListSetItemText ( GUIEditor_Grid[1], row, c, line, false, false ) 
   end 
) 
  
addEventHandler("onClientGUIClick", root, 
    function() 
        if (source == GUIEditor_Button[2]) then 
            guiSetVisible(GUIEditor_Window[1], false) 
            showCursor( false ) 
        elseif (source == GUIEditor_Button[1]) then 
            local r = guiGridListGetSelectedItem ( GUIEditor_Grid[1] ) 
            if r and r ~= -1 then 
                local theCopy = guiGridListGetItemText ( GUIEditor_Grid[1], r, c ) 
                setClipboard( theCopy ) 
                outputChatBox("Information has been copied", 255, 255, 0, false) 
            else 
                outputChatBox("Please select that you want to copy", 255, 0, 0, false) 
            end 
        end 
    end 
) 

  
-- # Server Side 
function handleOnPlayerModInfo(filename, modList) 
    local theName = getPlayerName(source):gsub("#%x%x%x%x%x%x","") 
    for idx, mod in ipairs(modList) do 
        local line = tostring(idx)..") "..tostring(mod.name) 
        triggerClientEvent(root, "addInfo", root, line, theName) 
    end 
end 
addEventHandler("onPlayerModInfo", root, handleOnPlayerModInfo) 

Link to comment
! غير مجرب
  
-- # Client Side 
  
GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Grid = {} 
  
GUIEditor_Window[1] = guiCreateWindow(202,125,624,564,"Show gta3.img Files",false) 
guiSetAlpha(GUIEditor_Window[1],1) 
guiWindowSetSizable(GUIEditor_Window[1],false) 
guiSetVisible(GUIEditor_Window[1], false) 
GUIEditor_Grid[1] = guiCreateGridList(9,20,606,493,false,GUIEditor_Window[1]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
c1 = guiGridListAddColumn(GUIEditor_Grid[1],"Name",0.2) 
c = guiGridListAddColumn(GUIEditor_Grid[1],"the Info",0.9) 
GUIEditor_Button[1] = guiCreateButton(18,526,237,29,"Copy",false,GUIEditor_Window[1]) 
GUIEditor_Button[2] = guiCreateButton(413,519,202,36,"close Window",false,GUIEditor_Window[1]) 
  
function showWindow( ) 
    guiSetVisible( GUIEditor_Window[1], not guiGetVisible( GUIEditor_Window[1] ) ) 
    showCursor( guiGetVisible( GUIEditor_Window[1] ) ) 
end 
bindKey("F6","down",showWindow) 
  
addEvent("addInfo", true) 
addEventHandler("addInfo", root, 
    function( line, theName ) 
        local row = guiGridListAddRow( GUIEditor_Grid[1] ) 
        guiGridListSetItemText ( GUIEditor_Grid[1], row, c1, theName, false, false ) 
        guiGridListSetItemText ( GUIEditor_Grid[1], row, c, line, false, false ) 
   end 
) 
  
addEventHandler("onClientGUIClick", root, 
    function() 
        if (source == GUIEditor_Button[2]) then 
            guiSetVisible(GUIEditor_Window[1], false) 
            showCursor( false ) 
        elseif (source == GUIEditor_Button[1]) then 
            local r = guiGridListGetSelectedItem ( GUIEditor_Grid[1] ) 
            if r and r ~= -1 then 
                local theCopy = guiGridListGetItemText ( GUIEditor_Grid[1], r, c ) 
                setClipboard( theCopy ) 
                outputChatBox("Information has been copied", 255, 255, 0, false) 
            else 
                outputChatBox("Please select that you want to copy", 255, 0, 0, false) 
            end 
        end 
    end 
) 

  
-- # Server Side 
function handleOnPlayerModInfo(filename, modList) 
    local theName = getPlayerName(source):gsub("#%x%x%x%x%x%x","") 
    for idx, mod in ipairs(modList) do 
        local line = tostring(idx)..") "..tostring(mod.name) 
        triggerClientEvent(root, "addInfo", root, line, theName) 
    end 
end 
addEventHandler("onPlayerModInfo", root, handleOnPlayerModInfo) 

يعطيك الف عافية

تمت الافادة

#

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