Jump to content

ابي مساعد ضروري


Recommended Posts

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

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

الكود

function iHateLamers ( thePlayer, commandName, playername ) 
    -- This is a command handler that activates on text "lamer" followed by the playername 
    -- in the console. The playername argument was added as an extra function argument to store the 
    -- name of the player whose text will be changed. 
    if not playername then 
        -- Prevents the command from running if the player did not specify a value for playername 
        dxDrawTextOnElement ( "You MUST define a player to change his name tag!", thePlayer ) 
    else 
        local culprit = getPlayerFromName ( playername ) 
        -- This variable stores the result of trying to find the player associated with the playername 
        -- that the user of the command specified 
        if culprit then 
            -- This checks to make sure a player nick was found. If it was not then the playername argument 
            -- specified by the command user was not equivalent to the name of any players in the server 
            setPlayerNametagText ( culprit, "IM_LAME" ) 
            -- finally, the nickname text is changed since the command arguments were checked and are valid 
        else 
            dxDrawTextOnElement ( "Player does not exist!", thePlayer ) 
        end 
    end 
end 
addCommandHandler ( "lamer", iHateLamers ) 

Link to comment

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

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

الكود

function iHateLamers ( thePlayer, commandName, playername ) 
    -- This is a command handler that activates on text "lamer" followed by the playername 
    -- in the console. The playername argument was added as an extra function argument to store the 
    -- name of the player whose text will be changed. 
    if not playername then 
        -- Prevents the command from running if the player did not specify a value for playername 
        dxDrawTextOnElement ( "You MUST define a player to change his name tag!", thePlayer ) 
    else 
        local culprit = getPlayerFromName ( playername ) 
        -- This variable stores the result of trying to find the player associated with the playername 
        -- that the user of the command specified 
        if culprit then 
            -- This checks to make sure a player nick was found. If it was not then the playername argument 
            -- specified by the command user was not equivalent to the name of any players in the server 
            setPlayerNametagText ( culprit, "IM_LAME" ) 
            -- finally, the nickname text is changed since the command arguments were checked and are valid 
        else 
            dxDrawTextOnElement ( "Player does not exist!", thePlayer ) 
        end 
    end 
end 
addCommandHandler ( "lamer", iHateLamers ) 

أظن ان الارقمنتات حقت الفنكشن واضحة

تكتب الأمر من اف 8 ثم تكتب التاج بعده :|

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