Jump to content

خطأ مادري وش حله


Recommended Posts

بسم الله الرحمن الرحيم

السلام عليكم ورحمة الله وبركاتة

صادفني خطأ عجزت احله لما تضغط على اسم الاعب يعطيك اسم الاحساب ذا يعطيك

false

مايجي اسم الحساب قبل اي ريد المود مضيوف بقروب ادمن وماتوقع يحتاج لأضافته

المهم

الكود

كلينت

GUIEditor_Window = {} 
GUIEditor_TabPanel = {} 
GUIEditor_Tab = {} 
  
GUIEditor_Window[1] = guiCreateWindow(247,10,482,584,"",false) 
GUIEditor_TabPanel[1] = guiCreateTabPanel(9,202,464,383,false,GUIEditor_Window[1]) 
  
tab4 = guiCreateTab("info",GUIEditor_TabPanel[1]) 
  
setTimer( 
    function() 
        playerList = guiCreateGridList(200, 6, 140, 360, false, tab4) 
            guiGridListSetSelectionMode(playerList, 2) 
            local cl = guiGridListAddColumn(playerList, "Players List ...", 0.85) 
                if ( cl and guiGetVisible(GUIEditor_Window[1] ) == true ) then 
                    for _,name in ipairs(getElementsByType("player")) do 
                     local rw = guiGridListAddRow(playerList) 
                     guiGridListSetItemText(playerList, rw, cl,getPlayerName(name), false, false) 
                    end 
        addEventHandler("onClientGUIClick", playerList, onClickPlayerName) 
                end 
    end 
,4000,0) 
  
labelAccName = guiCreateLabel(12,90,169,26,"acc: ",false,tab4) 
  
function onClickPlayerName () 
  local name = guiGridListGetItemText(playerList, guiGridListGetSelectedItem(playerList), 1) 
  triggerServerEvent("T", localPlayer, thePlayer) 
end 
  
addEvent("setText", true) 
addEventHandler("setText", root, function(x) 
  guiSetText(labelAccName, "Account Name : " .. tostring(x) .. " ") 
end 
) 

سيرفر

addEvent("T", true) 
addEventHandler("T", root, function(thePlayer) 
  local x = getAccountName(getPlayerAccount(thePlayer)) 
  triggerClientEvent(source, "setText", source,x) 
end 
) 

Link to comment

-- Client Side --

GUIEditor_Window = {} 
GUIEditor_TabPanel = {} 
GUIEditor_Tab = {} 
  
GUIEditor_Window[1] = guiCreateWindow(247,10,482,584,"",false) 
GUIEditor_TabPanel[1] = guiCreateTabPanel(9,202,464,383,false,GUIEditor_Window[1]) 
  
tab4 = guiCreateTab("info",GUIEditor_TabPanel[1]) 
  
labelAccName = guiCreateLabel(12,90,169,26,"Account Name : ",false,tab4) 
  
playerList = guiCreateGridList(200, 6, 140, 360, false, tab4) 
guiGridListSetSelectionMode(playerList, 2) 
local cl = guiGridListAddColumn(playerList, "Players List ...", 0.85) 
  
setTimer( 
    function() 
        guiGridListClear(playerList) 
        if (cl and guiGetVisible(GUIEditor_Window[1] ) == true ) then 
            for _,name in ipairs(getElementsByType("player")) do 
                local rw = guiGridListAddRow(playerList) 
                guiGridListSetItemText(playerList, rw, cl,getPlayerName(name), false, false) 
            end 
        end 
    end 
,4000,0) 
  
function onClickPlayerName () 
     local name = guiGridListGetItemText(playerList, guiGridListGetSelectedItem(playerList), 1) 
     if name == "" then guiSetText(labelAccName, "Account Name : ") return end 
     local thePlayer = getPlayerFromName(name) 
     triggerServerEvent("T", localPlayer, thePlayer) 
end 
addEventHandler("onClientGUIClick", playerList, onClickPlayerName) 
  
addEvent("setText", true) 
addEventHandler("setText", root, function(x) 
     guiSetText(labelAccName, "Account Name : "..tostring(x)) 
end) 

-- Server Side --

addEvent("T", true) 
addEventHandler("T", root, function(thePlayer) 
     local x = getAccountName(getPlayerAccount(thePlayer)) or "N/A" 
     triggerClientEvent(source, "setText", source,x) 
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...