Jump to content

مساعده بسيييطه


Recommended Posts

السلام عليكم اخواني ابي بس مساعده في كود بسيط بعرضه عليكم الحين

هذا مسار السيرفر

#########

function kick ( Target,masterali123 ) 
    local theTarget = getPlayerFromName ( Target ) 
    local thePlayer = ( source ) 
    local account = getPlayerAccount(theTarget)  
    local accname = getAccountName(account)  
    local isConsole = isObjectInACLGroup("user."..accname,aclGetGroup("Console")) 
     
     
     
    if isElement ( theTarget ) and isElement ( thePlayer ) then 
kickPlayer ( theTarget , "ششششششششش") 
    outputChatBox (" #B611CF*  " ..  getPlayerName (theTarget) .. " #B611CF has been slapped by #B611CF " ..  getPlayerName ( thePlayer ) .. "#B611CF (".. masterali123 ..")" , getRootElement() ,189,13,215, true) 
    else 
    outputChatBox (" * [ Error ] Bad arguments" , thePlayer , 255, 0, 0) 
    end 
end 
addEvent("kick23",true) 
addEventHandler( "kick23", getRootElement(), kick ) 

والحين مسار الكلنت

####################

elseif source == kick and ( sel ~= -1 ) then 
            local Spectate = guiGridListGetItemText ( grid, guiGridListGetSelectedItem ( grid ), 1 ) 
            if Spectate then 
            triggerServerEvent ( "kick23", getLocalPlayer(), tostring(Spectate) ) 
            end 

الكلنت مافي مشكله بس المشكله عندي في السيرفر لما ادوس على الزر ما يطرد اللاعب المتحدد من الجريد لست بس ذي المشكله

Link to comment

# Client

  addEventHandler( "onClientGUIClick", resourceRoot, function(   ) 
  
    if source == kick  then 
    
    local row = guiGridListGetSelectedItem ( grid ) 
   
    if row and row ~= -1 then  
  
    local Player = guiGridListGetItemText ( grid, row, 1 ) 
  
    triggerServerEvent ("kick23", localPlayer , Player  ) 
        end 
    end 
end  
    ); 

# Server

addEvent("kick23",true) 
addEventHandler( "kick23", getRootElement(),   
  
function  ( ThePlayer ) 
  
local player = getPlayerFromName ( ThePlayer ) 
  
local accName = getAccountName ( getPlayerAccount ( player ) )  
  
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then return outputChatBox("حدث خطأ",source,255,255,255,true) end 
   
if isElement ( player ) then 
     
kickPlayer ( player , "ششششششششش") 
  
outputChatBox (" #B611CF*  " ..  getPlayerName ( player ) .. " #B611CF has been slapped by #B611CF " ..  getPlayerName ( source ) .. "#B611CF " , getRootElement() ,189,13,215, true) 
  
else 
  
outputChatBox (" * [ Error ] Bad arguments" , source , 255, 0, 0) 
   
    end 
end 
    ); 

اذا كان الاعب محدد بقروب كونسل , ماراح يصكه كيك , على حسب مافهمته من كودك

بالتوفيق

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