Jump to content

طلب كود


Recommended Posts

+

"onClientGUIClick" 

^ For Example:

addEventHandler ( "onClientGUIClick", إسم الزر, 
    function ( ) 
        guiSetVisible ( إسم النافذة, true ) 
        guiBringToFront ( إسم النافذة ) 
    end 
) 

إسم النافذة = إسم النافذة الي تبيها تظهر لما تكبس على الزر #

Link to comment

جرب

-- client

edit = guiCreateEdit(20,20,20,20,"",false) 
button = guiCreateButton(20,40,20,20,"Create",false) 
  
addEventHandler("onClientGUIClick",guiRoot,function() 
    if source == button then 
        triggerServerEvent("CreateTeam",localPlayer,guiGetText(edit)) 
    end 
end) 

-- server

addEvent("CreateTeam",true) 
addEventHandler("CreateTeam",getRootElement(),function(edit) 
    createTeam(tostring(edit)) 
    setPlayerTeam(source,getTeamFromName(tostring(edit))) 
end) 

Link to comment

function getPlayers() 
    for k,v in ipairs(getElementsByType("player")) do 
        local row = guiGridListAddRow ( Grid ) 
        guiGridListSetItemText ( Grid, row,Column ID, getPlayerName(v), false, false ) 
    end 
end 

سوي القريد ليست واستخدمة يوم تفتح النافذهـ

وغير مسمى القريد

Grid = القريد مالك

getPlayers() 

عشان التحديث #

Link to comment

عندي يطلع اخطاء

  
GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Edit = {} 
GUIEditor_Grid = {} 
  
GUIEditor_Window[1] = guiCreateWindow(307,135,181,309,"By yaZan",false) 
guiSetVisible(GUIEditor_Window[1],false) 
GUIEditor_Edit = guiCreateEdit(9,33,120,45,"اسم القروب",false,GUIEditor_Window[1]) 
GUIEditor_Button[1] = guiCreateButton(132,36,40,38,"انشاء",false,GUIEditor_Window[1]) 
GUIEditor_Button[2] = guiCreateButton(13,104,159,52,"رسائل تيم",false,GUIEditor_Window[1]) 
GUIEditor_Button[3] = guiCreateButton(15,173,157,51,"ارسل لشخص",false,GUIEditor_Window[1]) 
GUIEditor_Button[4] = guiCreateButton(16,235,152,59,"حذف",false,GUIEditor_Window[1]) 
  
GUIEditor_Window[2] = guiCreateWindow(36,159,239,195,"قبول",false) 
guiSetVisible(GUIEditor_Window[2],false) 
GUIEditor_Grid[1] = guiCreateGridList(10,21,220,165,false,GUIEditor_Window[2]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
  
GUIEditor_Window[3] = guiCreateWindow(19,345,269,336,"ارسل",false) 
guiSetVisible(GUIEditor_Window[3],false) 
GUIEditor_Grid[2] = guiCreateGridList(10,30,250,289,false,GUIEditor_Window[3]) 
guiGridListSetSelectionMode(GUIEditor_Grid[2],2) 
  
GUIEditor_Window[4] = guiCreateWindow(504,166,247,423,"حذف",false) 
guiSetVisible(GUIEditor_Window[4],false) 
GUIEditor_Grid[3] = guiCreateGridList(9,21,229,377,false,GUIEditor_Window[4]) 
guiGridListSetSelectionMode(GUIEditor_Grid[3],2) 
  
function open() 
    guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1])) 
    showCursor(guiGetVisible(GUIEditor_Window[1])) 
    guiSetInputEnabled(guiGetVisible(GUIEditor_Window[1])) 
end 
bindKey("F2","down",open) 
  
function getPlayers() 
    for k,v in ipairs(getElementsByType("player")) do 
        local row = guiGridListAddRow ( GUIEditor_Grid[2] ) 
        guiGridListSetItemText ( GUIEditor_Grid[2], row,50, getPlayerName(v), false, false ) 
    end 
  
addEventHandler("onClientGUIClick",guiRoot, 
 function () 
    if source == GUIEditor_Button[1] then 
        triggerServerEvent("CreateTeam",localPlayer,guiGetText(GUIEditor_Edit)) 
   elseif ( source == GUIEditor_Button[2] ) then 
         if ( source == GUIEditor_Button[2] ) then 
        guiSetVisible ( GUIEditor_Window[2], true ) 
        guiBringToFront ( GUIEditor_Window[2] ) 
 end 
    end 
       end 
           end) 

ذا كلنت هو فيه مثل ما انت شايف نوافذ

وفيه ادت تكتب تعمل تيم ابيها قروب

و في 3 على كودك

ارسال

و حذف

و قبول دعوه

:wink:

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