Jump to content

x[ طلب ]x فانكشنات


Recommended Posts

سلام عليكم

انا عامل جدول

فيه 5 حاجات

اول شي

ادهم

لعبه

احمد

محمد

بعدين

مثلن عاوز اليحدد علي ادهم

يطلع له لوحه

واليحدد علي لعبه يطلع له لوحه مختلفه

والخ

ارجو مثال علي الوب والفانشكات

Link to comment

صح كذا

for i , v in ipairs ( Adham ) do 
Row = guiGridListAddRow (  gridlist2 ) 
guiGridListSetItemText(  gridlist2,Row ,1,v[1],false,false) 
guiGridListSetItemText(  gridlist2,Row ,2,v[2],false,false) 
guiGridListSetItemData (  gridlist2 , Row , 1 , v[2] ,false,false) 
end 
  
  
addEventHandler("onClientGUIClick",root, 
    function (  ) 
          if source == button then 
              local Se = guiGridListGetSelectedItem(  GUIEditor.gridlist[1] ) 
              local Dat = guiGridListGetItemData (  GUIEditor.gridlist[1] , Se  , 1 ) 
             guiSetVisible( tostring ( Dat ),true) 
        end 
    end 
end ) 
  

Link to comment
  
for i , v in ipairs ( Adham ) do 
Row = guiGridListAddRow (  GUIEditor.gridlist[1] ) 
guiGridListSetItemText(  GUIEditor.gridlist[1],Row ,1,v[1],false,false) 
guiGridListSetItemData (  GUIEditor.gridlist[1] , Row , 1 , v[2] ,false,false) 
end 
  
  
addEventHandler("onClientGUIClick",root, 
    function (  ) 
          if source == button then 
            if guiGridListGetSelectedItem(  GUIEditor.gridlist[1] ) ~= -1 then 
              local Se = guiGridListGetSelectedItem(  GUIEditor.gridlist[1] ) 
              local Dat = guiGridListGetItemData (  GUIEditor.gridlist[1] , Se  , 1 ) 
             guiSetVisible( Dat ,true) 
        end 
    end 
end ) 
  

Link to comment

شغلت

لما عملتها كدا

م شغلت

Table = { 
{"ادهم","A",test} 
} 
  
  
  
for i , v in ipairs ( Table ) do 
Row = guiGridListAddRow (  GUIEditor.gridlist[1] ) 
guiGridListSetItemText(  GUIEditor.gridlist[1],Row ,1,v[1],false,false) 
guiGridListSetItemText(  GUIEditor.gridlist[1],Row ,2,v[2],false,false) 
guiGridListSetItemData (  GUIEditor.gridlist[1] , Row , 1 , v[2] ,false,false) 
end 

WARNING: 13/c.lua:45: Bad argument @ 'guiSetVisbile' [Expected gui-elemnt at argument 1,got sttring 'A'

Link to comment
  
Table = { 
{"ادهم","A",test} 
} 
  
  
  
for i , v in ipairs ( Table ) do 
Row = guiGridListAddRow (  GUIEditor.gridlist[1] ) 
guiGridListSetItemText(  GUIEditor.gridlist[1],Row ,1,v[1],false,false) 
guiGridListSetItemText(  GUIEditor.gridlist[1],Row ,2,v[2],false,false) 
guiGridListSetItemData (  GUIEditor.gridlist[1] , Row , 1 , v[3] ,false,false) 
end 
  

Link to comment

شف كودي

شغعال 100 %

في المجاني

والعالمي م يشتغل

addEventHandler ( "onClientGUIClick", resourceRoot, 
    function ( ) 
          if ( source == GUIEditor.button[1] ) then 
          name = getPlayerName(getLocalPlayer()) 
          cantidad = guiGetText(GUIEditor.edit[1]) 
          triggerServerEvent("SendMoney1",getRootElement(),cantidad,name) 
end 
end) 
  
  
  

  
function convertNumber ( number )   
    local formatted = number   
    while true do       
    formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2')     
    if ( k==0 ) then       
break   
end   
end   
    return formatted 
end 
  
function Enviar (cantidad, name) 
    for _, p in ipairs(getElementsByType('player')) do 
    givePlayerMoney(p, tonumber(cantidad)) 
    exports.topbarchat:sendClientMessage("#ffff00[C.Console]: "..name:gsub("#%x%x%x%x%x%x", "").." #ffff00has sent Money for all $"..convertNumber (cantidad)  , p, 255, 255, 255, true) 
    exports.topbarchat:sendClientMessage("#ffff00[C.Console]: $"..convertNumber (cantidad).." تم منح الجميع", p, 255, 255, 255, true) 
end 
end 
addEvent("SendMoney1", true) 
addEventHandler("SendMoney1", getRootElement(), Enviar) 
      
  

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