Jump to content

stack overflow


ahmedo01

Recommended Posts

CLIENT

addEventHandler ( "onClientGUIClick", oyundanatbuton, function() 
if source == oyundanatbuton then 
    local selected = guiGridListGetSelectedItem( GUIEditor.gridlist[1] ) 
    if selected then 
        local text = guiGridListGetItemText( GUIEditor.gridlist[1], selected, oyuncucolumn) 
        if getPlayerName(getLocalPlayer(  )) == text then outputChatBox("Kendini oyundan atamazsın!",255,0,0) return end 
        local plr = getPlayerFromName( text ) 
        if plr then 
            triggerServerEvent( "TRcezalar.kickPlayer",getLocalPlayer(  ), plr) 
        end 
    end 
end 
    end, false ) 

SERVER

  
function isStaff(plr) 
    if plr then 
        local account = getPlayerAccount( plr ) 
  
        local accName = getAccountName( account ) 
        if isGuestAccount( account ) then return end 
        if (isObjectInACLGroup ("user."..accName, aclGetGroup ( "S6 Personel" ) ) or isObjectInACLGroup ("user."..accName, aclGetGroup ( "S5 Personel" ) ) or isObjectInACLGroup ("user."..accName, aclGetGroup ( "S4 Personel" ) ) or isObjectInACLGroup ("user."..accName, aclGetGroup ( "S3 Personel" ) ) or isObjectInACLGroup ("user."..accName, aclGetGroup ( "S2 Personel" ) ) or isObjectInACLGroup ("user."..accName, aclGetGroup ( "S1 Personel" ) )) then 
            return true 
        end 
    end 
end 
  
  
function kickPlayer(plr) 
    if isStaff(source) then 
        --kickPlayer( plr, "ADMKICK") 
        kickPlayer(plr, source, "ADMKICK") 
        outputChatBox(getPlayerName(source).." isimli personel "..getPlayerName(plr).." isimli kişiyi oyundan attı!",getRootElement(  ),255,0,0) 
    end 
end 
addEvent("TRcezalar.kickPlayer",true) 
addEventHandler("TRcezalar.kickPlayer",getRootElement(  ),kickPlayer) 

It gives error in kickPlayer(plr, source, "ADMKICK") string. Error = stack overflow, i cant find solution.

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