Jump to content

Help my Dx Panel مساعده


Alix2015

Recommended Posts

تفضل ذا للتيم نيم

function teamName ( source, key, newTeamName ) 
    local playerTeam = getPlayerTeam ( source )          -- get the player's team 
    if ( playerTeam ) then                               -- if he's on a team 
        local oldTeamName = getTeamName ( playerTeam )   -- get the team's current name 
        setTeamName ( playerTeam, newTeamName )          -- change its name 
        outputChatBox ( "Changed " .. getPlayerName ( source ).."'s team name from " .. oldTeamName .. " to " .. newTeamName ) 
    else 
        outputChatBox ( getPlayerName ( source ) .. " isn't on a team" ) 
    end 
end 
addCommandHandler ( "teamname", teamName ) 

سيرفر سايد

Link to comment
تفضل ذا للتيم نيم
function teamName ( source, key, newTeamName ) 
    local playerTeam = getPlayerTeam ( source )          -- get the player's team 
    if ( playerTeam ) then                               -- if he's on a team 
        local oldTeamName = getTeamName ( playerTeam )   -- get the team's current name 
        setTeamName ( playerTeam, newTeamName )          -- change its name 
        outputChatBox ( "Changed " .. getPlayerName ( source ).."'s team name from " .. oldTeamName .. " to " .. newTeamName ) 
    else 
        outputChatBox ( getPlayerName ( source ) .. " isn't on a team" ) 
    end 
end 
addCommandHandler ( "teamname", teamName ) 

سيرفر سايد

ناسخ مثال الويكي

:arrow::idea:

Link to comment

الان شوف ذا ممكن تشرح لي عشان اتعلم ؟

addEventHandler("onPlayerWasted", root, 
function(_, killer) 
    if killer and getElementType(killer) == "player" and killer ~= source then 
        local checkGuest = getPlayerAccount(killer) 
        if not isGuestAccount(checkGuest) then 
            local Tkill = tonumber(getAccountData(checkGuest, "kills") or 0) 
            if (Tkill+1 >= 1) then 
                setAccountData(checkGuest, "kills", 0) 
                setAccountData(checkGuest, "Level", (getAccountData(checkGuest, "Level") or 0) + 1) 
                local TopTable = {} 
                for i, account in ipairs(getAccounts()) do 
                   table.insert(TopTable, {account, (getAccountData(account, "Level") or 0)}) 
                end 
                table.sort(TopTable, function(a, b) return a[2] > b[2] end) 
                outputChatBox("Player Name: "..(getAccountData(TopTable[1][1], "name") or "N/A").." | Level: "..TopTable[1][2], killer, 255, 255, 255) 
            else 
                setAccountData(checkGuest, "kills", Tkill+1) 
            end 
        end 
    end 
end) 
  
addEventHandler("onPlayerLogin", root, 
function(_, account) 
    setAccountData(account, "name", getPlayerName(source)) 
end) 
  
addEventHandler("onPlayerChangeNick", root, 
function(_, new) 
    local account = getPlayerAccount(source) 
    if not isGuestAccount(account) then 
        setAccountData(account, "name", new) 
    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...