Sparrow Posted March 18, 2012 Share Posted March 18, 2012 السلام عليكم أنا أقوم به لوحة الادارة و onClientPlayerQuit لا تعمل function onPlayerQuit() guiGridListClear(playersList) for id, players in ipairs">ipairs (getElementsByType("player")) do guiGridListRemoveRow(playersList, id) guiGridListSetItemText(playersList, row, -1, getPlayerName(players), false, false) end end addEventHandler("onClientPlayerQuit", getRootElement(), onPlayerQuit) Link to comment
Sparrow Posted March 21, 2012 Author Share Posted March 21, 2012 when player quit his name removed from the grid list Link to comment
TAPL Posted March 21, 2012 Share Posted March 21, 2012 try this function onPlayerQuit() local i = 0 while (i <= guiGridListGetRowCount(playersList)) do if guiGridListGetItemText(playersList, i, 1) == getPlayerName(source) then guiGridListRemoveRow(playersList, i) end i = i + 1 end end addEventHandler("onClientPlayerQuit", getRootElement(), onPlayerQuit) Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now