Jump to content

مساعدة


Recommended Posts

شباب بسوي لوحة لو اللاعب الموجود بالجدول يدخل السيرفر يصير 

Statu = Online 

لو يطلع يصير 

Statu = Offline 


GUIEditor = {
    gridlist = {},
    window = {},
    label = {}
}
local screenW, screenH = guiGetScreenSize()
GUIEditor.window[1] = guiCreateWindow((screenW - 760) / 2, (screenH - 294) / 2, 760, 294, "Online staffs", false)
GUIEditor.gridlist[1] = guiCreateGridList(9, 23, 741, 237, false, GUIEditor.window[1])
guiSetVisible (GUIEditor.window[1],false)
guiGridListAddColumn(GUIEditor.gridlist[1], "Name", 0.3)
guiGridListAddColumn(GUIEditor.gridlist[1], "Rank", 0.3)
guiGridListAddColumn(GUIEditor.gridlist[1], "Status", 0.3)
for i = 1, 2 do
    guiGridListAddRow(GUIEditor.gridlist[1])
end
guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "Micheal", false, false)
guiGridListSetItemText(GUIEditor.gridlist[1], 0, 2, "Admin", false, false)
guiGridListSetItemText(GUIEditor.gridlist[1], 0, 3, "Online", false, false)
guiGridListSetItemColor(GUIEditor.gridlist[1], 0, 3, 0, 255, 0, 255)
guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "Jhon", false, false)
guiGridListSetItemText(GUIEditor.gridlist[1], 1, 2, "Admin", false, false)
guiGridListSetItemText(GUIEditor.gridlist[1], 1, 3, "Offline", false, false)
guiGridListSetItemColor(GUIEditor.gridlist[1], 1, 3, 255, 0, 0, 255)
GUIEditor.label[1] = guiCreateLabel(10, 260, 740, 29, "Press \" F5 \" to close this panel", false, GUIEditor.window[1])
guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false)
guiLabelSetVerticalAlign(GUIEditor.label[1], "center")

function Open ()
guiSetVisible(GUIEditor.window[1], not guiGetVisible(GUIEditor.window[1]))
showCursor(guiGetVisible(GUIEditor.window[1]))
end
bindKey("F5","down", Open)

Server:

local staffs = {
      "Jhon",
      "Micheal",
}

function onStaffJoin ()
--- ايش اضيف هنا ؟
addEventHandler ( "onPlayerJoin", getRootElement(), onStaffJoin )


function onStaffQuit ()
-- إيش اضيف هنا؟
addEventHandler ( "onPlayerQuit", root, quitPlayer )

 

Link to comment
stat = false

local staffs = {
      "Jhon",
      "Micheal",
}

function onStaffJoin ()
	stat = true
 end
addEventHandler ( "onPlayerJoin", getRootElement(), onStaffJoin )


function onStaffQuit ()
	stat = false
 end
addEventHandler ( "onPlayerQuit", root, quitPlayer )

 

ولا كذا

 

stat = false

local staffs = {
      "Jhon",
      "Micheal",
}

function onStaffJoin ()
  	if staffs == "Jhon" 
    or staffs == "Micheal" then
	stat = true
end
  end
addEventHandler ( "onPlayerJoin", getRootElement(), onStaffJoin )


function onStaffQuit ()
  if staffs == "Jhon" 
  or staffs == "Micheal" then
	stat = false
end
  end
addEventHandler ( "onPlayerQuit", root, quitPlayer )

 

Edited by +Source|>
Link to comment
12 hours ago, +Source|> said:

stat = false

local staffs = {
      "Jhon",
      "Micheal",
}

function onStaffJoin ()
	stat = true
 end
addEventHandler ( "onPlayerJoin", getRootElement(), onStaffJoin )


function onStaffQuit ()
	stat = false
 end
addEventHandler ( "onPlayerQuit", root, quitPlayer )

 

ولا كذا

 


stat = false

local staffs = {
      "Jhon",
      "Micheal",
}

function onStaffJoin ()
  	if staffs == "Jhon" 
    or staffs == "Micheal" then
	stat = true
end
  end
addEventHandler ( "onPlayerJoin", getRootElement(), onStaffJoin )


function onStaffQuit ()
  if staffs == "Jhon" 
  or staffs == "Micheal" then
	stat = false
end
  end
addEventHandler ( "onPlayerQuit", root, quitPlayer )

 

استعمال المتغيرات بجانب السيرفر راح يغيرها للجميع

  • Like 1
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...