Jump to content

بالله شوفو الخطا


Recommended Posts

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

بدايتي فالبرمجه

هه بالموضوع علطول

سويت كود يجيب البلاير للقريد ليست

جبته من الويكي

وحاولت كثير ماظبط يصير

كذا

p_143yjna1.png

الكود

function clientsideResourceStart () 
        local playerList = guiCreateGridList ( 0.80, 0.10, 0.15, 0.60, true )  
        local column = guiGridListAddColumn( playerList, "اللاعبين", 0.85 )  
        if ( column ) then  
                for id, playeritem in ipairs(getElementsByType("player")) do  
                 
                        local row = guiGridListAddRow ( playerList ) 
                        guiGridListSetItemText ( playerList, row, column, getPlayerName ( playeritem ), false, false ) 
                end 
        end 
end 
addEventHandler ( "onClientResourceStart", getRootElement(), clientsideResourceStart ) 

واسم القريد ليست حقي

اللاعبين وانا اخاف امسح شي يصير خطا

واول مره اجيب كود من الويكي ويصير صح

Link to comment
GUIEditor = { 
    button = {}, 
    edit = {}, 
    window = {}, 
    gridlist = {}, 
    label = {}, 
} 
GUIEditor.window[1] = guiCreateWindow(210, 134, 374, 394, "لوحة - ارسال المال", false) 
guiWindowSetSizable(GUIEditor.window[1], false) 
  
GUIEditor.label[2] = guiCreateLabel(22, 342, 198, 44, "Created By Iphone", false, GUIEditor.window[1]) 
guiLabelSetColor(GUIEditor.label[2], 255, 0, 0) 
GUIEditor.gridlist[2] = guiCreateGridList(9, 20, 129, 320, false, GUIEditor.window[1]) 
guiGridListAddColumn(GUIEditor.gridlist[2], "اللاعبين", 0.9) 
GUIEditor.button[3] = guiCreateButton(243, 21, 122, 45, "ارسال", false, GUIEditor.window[1]) 
GUIEditor.edit[1] = guiCreateEdit(245, 76, 120, 30, "", false, GUIEditor.window[1]) 
GUIEditor.label[7] = guiCreateLabel(208, 85, 79, 43, " : المبلغ", false, GUIEditor.window[1]) 
guiLabelSetColor(GUIEditor.label[7], 125, 253, 0) 

Link to comment
GUIEditor = { 
    button = {}, 
    edit = {}, 
    window = {}, 
    gridlist = {}, 
    label = {}, 
} 
GUIEditor.window[1] = guiCreateWindow(210, 134, 374, 394, "لوحة - ارسال المال", false) 
guiWindowSetSizable(GUIEditor.window[1], false) 
  
GUIEditor.label[2] = guiCreateLabel(22, 342, 198, 44, "Created By Iphone", false, GUIEditor.window[1]) 
guiLabelSetColor(GUIEditor.label[2], 255, 0, 0) 
GUIEditor.gridlist[2] = guiCreateGridList(9, 20, 129, 320, false, GUIEditor.window[1]) 
local column = guiGridListAddColumn(GUIEditor.gridlist[2], "اللاعبين", 0.9) 
--- 
if ( column ) then 
for i, p in ipairs(getElementsByType("player")) do         
local row = guiGridListAddRow ( GUIEditor.gridlist[2]) 
guiGridListSetItemText ( GUIEditor.gridlist[2], row, column, getPlayerName ( p), false, false ) 
end 
end 
--- 
GUIEditor.button[3] = guiCreateButton(243, 21, 122, 45, "ارسال", false, GUIEditor.window[1]) 
GUIEditor.edit[1] = guiCreateEdit(245, 76, 120, 30, "", false, GUIEditor.window[1]) 
GUIEditor.label[7] = guiCreateLabel(208, 85, 79, 43, " : المبلغ", false, GUIEditor.window[1]) 
guiLabelSetColor(GUIEditor.label[7], 125, 253, 0) 

Link to comment
addEventHandler ("onClientGUIClick",buttonName, 
function () 
local selected = guiGridListGetSelectedItem (gridName) 
if selected ~= -1 and tonumber(guiGetText(editName)) then 
local plrName = guiGridListGetItemText (gridName,selected,1) 
local plr = getPlayerFromName (plrName) 
if plr then 
triggerServerEvent ("Tran",localPlayer,guiGetText(editName),plr,plrName) 
end 
end 
end,false) 
addEvent ("Tran",true) 
addEventHandler ("Tran",root, 
function (amm,plr,name) 
if getPlayerMoney(source) >= tonumber(amm) then 
givePlayerMoney(plr,tonumber(amm)) 
takePlayerMoney (source,tonumber(amm)) 
outputChatBox ("تم التحويل") 
end 
end) 

Link to comment
    local key = "F4" 
    GUIEditor = { 
        button = {}, 
        edit = {}, 
        window = {}, 
        gridlist = {}, 
        label = {}, 
    } 
    GUIEditor.window[1] = guiCreateWindow(210, 134, 374, 394, "لوحة - ارسال المال", false) 
    guiWindowSetSizable(GUIEditor.window[1], false) 
      
    GUIEditor.label[2] = guiCreateLabel(22, 342, 198, 44, "Created By Iphone", false, GUIEditor.window[1]) 
    guiLabelSetColor(GUIEditor.label[2], 255, 0, 0) 
    GUIEditor.gridlist[2] = guiCreateGridList(9, 20, 129, 320, false, GUIEditor.window[1]) 
    local column = guiGridListAddColumn(GUIEditor.gridlist[2], "اللاعبين", 0.9) 
    --- 
    if ( column ) then 
    for i, p in ipairs(getElementsByType("player")) do         
    local row = guiGridListAddRow ( GUIEditor.gridlist[2]) 
    guiGridListSetItemText ( GUIEditor.gridlist[2], row, column, getPlayerName ( p), false, false ) 
    end 
    end 
    --- 
    GUIEditor.button[3] = guiCreateButton(243, 21, 122, 45, "ارسال", false, GUIEditor.window[1]) 
    GUIEditor.edit[1] = guiCreateEdit(245, 76, 120, 30, "", false, GUIEditor.window[1]) 
    GUIEditor.label[7] = guiCreateLabel(208, 85, 79, 43, " : المبلغ", false, GUIEditor.window[1]) 
    guiLabelSetColor(GUIEditor.label[7], 125, 253, 0) 
       guiSetVisible (GUIEditor.window[1], false) 
bindKey( key, "down",function() 
guiSetVisible (GUIEditor.window[1], not guiGetVisible (GUIEditor.window[1]) ) 
showCursor ( guiGetVisible (GUIEditor.window[1]) ) 
end) 
    addEventHandler ("onClientGUIClick",buttonName, 
    function () 
    local selected = guiGridListGetSelectedItem (gridName) 
    if selected ~= -1 and tonumber(guiGetText(editName)) then 
    local plrName = guiGridListGetItemText (gridName,selected,1) 
    local plr = getPlayerFromName (plrName) 
    if plr then 
    triggerServerEvent ("Tran",localPlayer,guiGetText(editName),plr,plrName) 
    end 
    end 
    end,false) 
        addEvent ("Tran",true) 
    addEventHandler ("Tran",root, 
    function (amm,plr,name) 
    if getPlayerMoney(source) >= tonumber(amm) then 
    givePlayerMoney(plr,tonumber(amm)) 
    takePlayerMoney (source,tonumber(amm)) 
    outputChatBox ("تم التحويل") 
    end 
    end) 

سويته بملف الكلنت وماظبط

Link to comment
      addEvent ("Tran",true) 
    addEventHandler ("Tran",root, 
    function (amm,plr,name) 
    if getPlayerMoney(source) >= tonumber(amm) then 
    givePlayerMoney(plr,tonumber(amm)) 
    takePlayerMoney (source,tonumber(amm)) 
    outputChatBox ("تم التحويل") 
    end 
    end) 

حطه سرفر

وشيله من الكلنت

Link to comment

ماظبط

كلنت

    local key = "F4" 
    GUIEditor = { 
        button = {}, 
        edit = {}, 
        window = {}, 
        gridlist = {}, 
        label = {}, 
    } 
    GUIEditor.window[1] = guiCreateWindow(210, 134, 374, 394, "لوحة - ارسال المال", false) 
    guiWindowSetSizable(GUIEditor.window[1], false) 
      
    GUIEditor.label[2] = guiCreateLabel(22, 342, 198, 44, "Created By Iphone", false, GUIEditor.window[1]) 
    guiLabelSetColor(GUIEditor.label[2], 255, 0, 0) 
    GUIEditor.gridlist[2] = guiCreateGridList(9, 20, 129, 320, false, GUIEditor.window[1]) 
    local column = guiGridListAddColumn(GUIEditor.gridlist[2], "اللاعبين", 0.9) 
    --- 
    if ( column ) then 
    for i, p in ipairs(getElementsByType("player")) do         
    local row = guiGridListAddRow ( GUIEditor.gridlist[2]) 
    guiGridListSetItemText ( GUIEditor.gridlist[2], row, column, getPlayerName ( p), false, false ) 
    end 
    end 
    --- 
    GUIEditor.button[3] = guiCreateButton(243, 21, 122, 45, "ارسال", false, GUIEditor.window[1]) 
    GUIEditor.edit[1] = guiCreateEdit(245, 76, 120, 30, "", false, GUIEditor.window[1]) 
    GUIEditor.label[7] = guiCreateLabel(208, 85, 79, 43, " : المبلغ", false, GUIEditor.window[1]) 
    guiLabelSetColor(GUIEditor.label[7], 125, 253, 0) 
       guiSetVisible (GUIEditor.window[1], false) 
bindKey( key, "down",function() 
guiSetVisible (GUIEditor.window[1], not guiGetVisible (GUIEditor.window[1]) ) 
showCursor ( guiGetVisible (GUIEditor.window[1]) ) 
end) 
    addEventHandler ("onClientGUIClick",buttonName, 
    function () 
    local selected = guiGridListGetSelectedItem (gridName) 
    if selected ~= -1 and tonumber(guiGetText(editName)) then 
    local plrName = guiGridListGetItemText (gridName,selected,1) 
    local plr = getPlayerFromName (plrName) 
    if plr then 
    triggerServerEvent ("Tran",localPlayer,guiGetText(editName),plr,plrName) 
    end 
    end 
    end,false) 
  

سيرفر

          addEvent ("Tran",true) 
        addEventHandler ("Tran",root, 
        function (amm,plr,name) 
        if getPlayerMoney(source) >= tonumber(amm) then 
        givePlayerMoney(plr,tonumber(amm)) 
        takePlayerMoney (source,tonumber(amm)) 
        outputChatBox ("تم التحويل") 
        end 
        end) 

الميتا

-
  
type="misc" version="3.0.2" name="Iphone2" author="Iphone"/> 
  

Link to comment

كلنت

  
changeGridListItemToPlayersName = function ( GridList, Column ) 
    if GridList and Column then -- Check Parematers 
        if getElementType ( GridList ) == "gui-gridlist" then -- Check The Type of ' GridList ' 
            if guiGridListClear ( GridList ) then 
                for i, v in next, getElementsByType ( "player" ) do -- Get Everything by Type ' player '  
                    guiGridListSetItemText ( GridList, guiGridListAddRow ( GridList ), Column, getPlayerName ( v ), false, false ); 
                end; 
            end; 
        end; 
    end; 
end; 
  
  
    local key = "F4" 
    GUIEditor = { 
        button = {}, 
        edit = {}, 
        window = {}, 
        gridlist = {}, 
        label = {}, 
    } 
    GUIEditor.window[1] = guiCreateWindow(210, 134, 374, 394, "لوحة - ارسال المال", false) 
    guiWindowSetSizable(GUIEditor.window[1], false) 
      
    GUIEditor.label[2] = guiCreateLabel(22, 342, 198, 44, "Created By Iphone", false, GUIEditor.window[1]) 
    guiLabelSetColor(GUIEditor.label[2], 255, 0, 0) 
    gridName = guiCreateGridList(9, 20, 129, 320, false, GUIEditor.window[1]) 
    column = guiGridListAddColumn(GUIEditor.gridlist[2], "اللاعبين", 0.9) 
    changeGridListItemToPlayersName(gridName,column) 
    buttonName = guiCreateButton(243, 21, 122, 45, "ارسال", false, GUIEditor.window[1]) 
    editName = guiCreateEdit(245, 76, 120, 30, "", false, GUIEditor.window[1]) 
    GUIEditor.label[7] = guiCreateLabel(208, 85, 79, 43, " : المبلغ", false, GUIEditor.window[1]) 
    guiLabelSetColor(GUIEditor.label[7], 125, 253, 0) 
    guiSetVisible (GUIEditor.window[1], false) 
     
    bindKey( key, "down",function() 
    guiSetVisible (GUIEditor.window[1], not guiGetVisible (GUIEditor.window[1]) ) 
    showCursor ( guiGetVisible (GUIEditor.window[1]) ) 
    end) 
     
     
    addEventHandler ("onClientGUIClick",buttonName, 
    function () 
    local selected = guiGridListGetSelectedItem (gridName) 
    if selected ~= -1 and tonumber(guiGetText(editName)) then 
    local plrName = guiGridListGetItemText (gridName,selected,1) 
    local plr = getPlayerFromName (plrName) 
    if plr then 
    triggerServerEvent ("Tran",localPlayer,guiGetText(editName),plr,plrName) 
    end 
    end 
    end,false) 
  

سيرفر

  
        addEvent ("Tran",true) 
        addEventHandler ("Tran",root, 
        function (amm,plr,name) 
        if getPlayerMoney(source) >= tonumber(amm) then 
        givePlayerMoney(plr,tonumber(amm)) 
        takePlayerMoney (source,tonumber(amm)) 
        outputChatBox("تم التحويل",source,0,255,0,true) 
        end 
        end) 
  

ميتا

  
  

  
type="misc" version="3.0.2" name="Iphone2" author="Iphone"/> 
  

Link to comment

كلنت

  
changeGridListItemToPlayersName = function ( GridList, Column ) 
    if GridList and Column then -- Check Parematers 
        if getElementType ( GridList ) == "gui-gridlist" then -- Check The Type of ' GridList ' 
            if guiGridListClear ( GridList ) then 
                for i, v in next, getElementsByType ( "player" ) do -- Get Everything by Type ' player '  
                    guiGridListSetItemText ( GridList, guiGridListAddRow ( GridList ), Column, getPlayerName ( v ), false, false ); 
                end; 
            end; 
        end; 
    end; 
end; 
  
  
    local key = "F4" 
    GUIEditor = { 
        button = {}, 
        edit = {}, 
        window = {}, 
        gridlist = {}, 
        label = {}, 
    } 
    GUIEditor.window[1] = guiCreateWindow(210, 134, 374, 394, "لوحة - ارسال المال", false) 
    guiWindowSetSizable(GUIEditor.window[1], false) 
      
    GUIEditor.label[2] = guiCreateLabel(22, 342, 198, 44, "Created By Iphone", false, GUIEditor.window[1]) 
    guiLabelSetColor(GUIEditor.label[2], 255, 0, 0) 
    gridName = guiCreateGridList(9, 20, 129, 320, false, GUIEditor.window[1]) 
    column = guiGridListAddColumn(GUIEditor.gridlist[2], "اللاعبين", 0.9) 
    changeGridListItemToPlayersName(gridName,column) 
    buttonName = guiCreateButton(243, 21, 122, 45, "ارسال", false, GUIEditor.window[1]) 
    editName = guiCreateEdit(245, 76, 120, 30, "", false, GUIEditor.window[1]) 
    GUIEditor.label[7] = guiCreateLabel(208, 85, 79, 43, " : المبلغ", false, GUIEditor.window[1]) 
    guiLabelSetColor(GUIEditor.label[7], 125, 253, 0) 
    guiSetVisible (GUIEditor.window[1], false) 
     
    bindKey( key, "down",function() 
    guiSetVisible (GUIEditor.window[1], not guiGetVisible (GUIEditor.window[1]) ) 
    showCursor ( guiGetVisible (GUIEditor.window[1]) ) 
    end) 
     
     
    addEventHandler ("onClientGUIClick",buttonName, 
    function () 
    local selected = guiGridListGetSelectedItem (gridName) 
    if selected ~= -1 and tonumber(guiGetText(editName)) then 
    local plrName = guiGridListGetItemText (gridName,selected,1) 
    local plr = getPlayerFromName (plrName) 
    if plr then 
    triggerServerEvent ("Tran",localPlayer,guiGetText(editName),plr,plrName) 
    end 
    end 
    end,false) 
  

سيرفر

  
        addEvent ("Tran",true) 
        addEventHandler ("Tran",root, 
        function (amm,plr,name) 
        if getPlayerMoney(source) >= tonumber(amm) then 
        givePlayerMoney(plr,tonumber(amm)) 
        takePlayerMoney (source,tonumber(amm)) 
        outputChatBox("تم التحويل",source,0,255,0,true) 
        end 
        end) 
  

ميتا

  
  

  
type="misc" version="3.0.2" name="Iphone2" author="Iphone"/> 
  

مشكله ثانيه

اختفى اللاعبين من القريد ليست - حاولت احول مايقول تم التحويل ولا اي كلام

Link to comment

جرب +

مزبوط %100

كلينت

  
  
changeGridListItemToPlayersName = function ( GridList, Column ) 
    if GridList and Column then -- Check Parematers 
        if getElementType ( GridList ) == "gui-gridlist" then -- Check The Type of ' GridList ' 
            if guiGridListClear ( GridList ) then 
                for i, v in next, getElementsByType ( "player" ) do -- Get Everything by Type ' player ' 
                    guiGridListSetItemText ( GridList, guiGridListAddRow ( GridList ), Column, getPlayerName ( v ), false, false ); 
                end; 
            end; 
        end; 
    end; 
end; 
  
  
    local key = "F4" 
    GUIEditor = { 
        button = {}, 
        edit = {}, 
        window = {}, 
        gridlist = {}, 
        label = {}, 
    } 
    GUIEditor.window[1] = guiCreateWindow(210, 134, 374, 394, "لوحة - ارسال المال", false) 
    guiWindowSetSizable(GUIEditor.window[1], false) 
      
    GUIEditor.label[2] = guiCreateLabel(22, 342, 198, 44, "Created By Iphone", false, GUIEditor.window[1]) 
    guiLabelSetColor(GUIEditor.label[2], 255, 0, 0) 
    gridName = guiCreateGridList(9, 20, 129, 320, false, GUIEditor.window[1]) 
    column = guiGridListAddColumn(gridName, "اللاعبين", 0.9) 
    changeGridListItemToPlayersName(gridName,column) 
    buttonName = guiCreateButton(243, 21, 122, 45, "ارسال", false, GUIEditor.window[1]) 
    editName = guiCreateEdit(245, 76, 120, 30, "", false, GUIEditor.window[1]) 
    GUIEditor.label[7] = guiCreateLabel(208, 85, 79, 43, " : المبلغ", false, GUIEditor.window[1]) 
    guiLabelSetColor(GUIEditor.label[7], 125, 253, 0) 
    guiSetVisible (GUIEditor.window[1], false) 
    
    bindKey( key, "down",function() 
    guiSetVisible (GUIEditor.window[1], not guiGetVisible (GUIEditor.window[1]) ) 
    showCursor ( guiGetVisible (GUIEditor.window[1]) ) 
    end) 
    
    
    addEventHandler ("onClientGUIClick",buttonName, 
    function () 
    local selected = guiGridListGetSelectedItem (gridName) 
    if selected ~= -1 and tonumber(guiGetText(editName)) then 
    local plrName = guiGridListGetItemText (gridName,selected,1) 
    local plr = getPlayerFromName (plrName) 
    if plr then 
    triggerServerEvent ("Tran",localPlayer,guiGetText(editName),plr,plrName) 
    end 
    end 
    end,false) 
  
  

سيرفر

  
  
  
        addEvent ("Tran",true) 
        addEventHandler ("Tran",root, 
        function (amm,plr,name) 
        if getPlayerMoney(source) >= tonumber(amm) then 
        givePlayerMoney(plr,tonumber(amm)) 
        takePlayerMoney (source,tonumber(amm)) 
        outputChatBox("تم التحويل",source,0,255,0,true) 
        end 
        end) 
  
  

ميتا

  
  

  
type="misc" version="3.0.2" name="Iphone2" author="Iphone"/> 
  

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