مازبط
server
function update ()
guiGridListClear(Grid)
for i,v in ipairs (getElementsByType("player")) do
local rp = guiGridListAddRow (Grid)
guiGridListSetItemText (Grid,rp,1,getPlayerName(v),false,false)
end
end
addEventHandler ("onClientResourceStart",resourceRoot,update)
addEventHandler ("onClientPlayerJoin",root,update)
addEventHandler ("onClientPlayerChangeNick",root,update)
addEventHandler ("onClientPlayerQuit",root,update)
function update ()
guiGridListClear(Grid)
for i,v in ipairs (getElementsByType("player")) do
local rp = guiGridListAddRow (Grid)
guiGridListSetItemText (Grid,rp,1,getPlayerName(v),false,false)
end
end
addEventHandler ("onClientResourceStart",resourceRoot,update)
addEventHandler ("onClientPlayerJoin",root,update)
addEventHandler ("onClientPlayerChangeNick",root,update)
addEventHandler ("onClientPlayerQuit",root,update)