Jump to content

ابي تصحيح


khalid-mks

Recommended Posts

السلام عليكم

شبااب انا الحين لسة بتعلم البرمجة وسويت مود ادا الاعب تضرر تجيه اشياء الخ

شووفووو الكوود وادا كان اغلااط ابي تصحيح :D

اخليكم مع الكود

function playerDamage ( attacker, weapon, bodypart )  
type = getElementType( attacker ) 
    if type == "player" then 
        outputChatBox("You were Killed By" .. getPlayerName(attacker),255,255,255,true) 
    end 
  
    if bodypart == 7 then 
        playSound("damage.mp3") 
    end 
  
    if bodypart == 9 then 
        local x,y = guiGetScreenSize()  
        img = guiCreateStaticImage(x/2-400, y/2-300,800,600, "img.png", false)  
        guiSetVisible(img,false)  
        setTimer (guiSetVisible,3000,1,img,false)  
    end 
  
end 
addEventHandler ( "onPlayerDamage", getRootElement (), playerDamage ) 

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