if ( columnsPlayers ) then -- If the column was successfully created
for id, ITEMplayers in ipairs(getElementsByType("player")) do
-- لوب لتيبل اللاعبين --
local row = guiGridListAddRow ( TheListPlayers )
-- متغير رو انشاء رو جديد --
setName = guiGridListSetItemText ( TheListPlayers, row, columnsPlayers, getPlayerName ( ITEMplayers ), false, false )
setElementData ( thePlayer, "NickName", setName )
-- getALLPlayers ! --
end
end
end
)
addEventHandler("onClientGUIClick", root,
function(thePlayer,freezeTime)
local playerName = guiGridListGetItemText ( TheListPlayers, guiGridListGetSelectedItem ( TheListPlayers ), 1 )
local players = getPlayerFromName ( getElementData(source,"NickName") )
if ( source == Slap ) then
setElementHealth ( getElementData(thePlayer,"NickName"), getElementHealth(players) - 200 )
triggerServerEvent("slap",localPlayer,playerName)
end
حطيت الداتا بس ماضبط نفس الشيء