Jump to content

onClientPlayerQuit


Recommended Posts

السلام عليكم

أنا أقوم به لوحة الادارة

و

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

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

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