Jump to content

تصحيح كود


S3LOK

Recommended Posts

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

انا سويت مود

الي هو

  
function stopMinigunDamage ( attacker, weapon, bodypart ) 
type = getElementType ( attacker) 
    if type == "player" then 
        outputChatBox("You Were Killed by" .. getPlayerName(attacker),51,102,153,true) 
    end 
    if bodypart == 9 then 
        playSound("headShot.mp3") 
    end 
  
end 
addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), stopMinigunDamage ) 

meta

>    ="client2.lua" type="client"  />    src="headShot.mp3" />>

وابي دروس افهم البرمجة واستعمل ويكي

Link to comment

الأفنت المستخدم خطأ + ما تحققت من وجود قاتل + ما تحققت ان القاتل ليس اللاعب المقتول

سويت لك تحسين اضفت نوع القاتل في حالة القاتل ما كان لاعب

و على فكرة صوت هيد شوت يشتغل للاعب الي مات مو اللاعب الي قتل، مدري كيف تبيه انت بس الوضع يبقى على ما هو عليه

addEventHandler("onClientPlayerWasted", localPlayer, 
function(attacker, weapon, bodypart) 
    if attacker and attacker ~= source then 
        local type = getElementType(attacker) 
        if type == "player" then 
            outputChatBox("You Were Killed by "..getPlayerName(attacker), 51, 102, 153) 
        else 
            outputChatBox("You Were Killed by "..type, 51, 102, 153) 
        end 
        if bodypart == 9 then 
            playSound("headShot.mp3") 
        end 
    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...