Jump to content

وش الخطآ هنا ؟


G.KinG

Recommended Posts

سلام عليكم معي مشكله في كود المسعف انه ما يزود دم ولا ياخذ فلوس مع انه في تيم Medic :|

الزبده ذي الاكواد

كلينت

function(attacker, weapon) 
team = getPlayerTeam(attacker) 
    if (attacker and getElementType(attacker) == "player" and weapon == 41 and team and getTeamName(team) == "Medic") 
    then 
        cancelEvent() 
        if (not isTimer(pause)) then  
            local health = getElementHealth(localPlayer) 
            if (health < 99) then 
            triggerServerEvent("medic:healing", localPlayer, attacker) 
            pause = setTimer(function() end, 1000, 1) 
            end 
        end 
    end 
end) 
  

سيرفر

addEvent("medic:healing", true) 
addEventHandler("medic:healing", root, 
function (medic) 
    if (getElementHealth(source) < 100) then 
        local Heal = getElementHealth(source) + 5 
        setElementHealth(source, Heal)  
        if (Heal > 100) then 
             setElementHealth(source, 100) 
        end 
        givePlayerMoney(medic, 100) 
        takePlayerMoney(source, 100) 
    end 
end) 

Link to comment

طيب كذآ ؟

  
addEventHandler("onClientPlayerDamage", localPlayer, 
function(attacker, weapon) 
team = getPlayerTeam(attacker) 
    if (attacker and getElementType(attacker) == "player" and weapon == 41 and team and getTeamName(team) == "Medic") 
    then 
        cancelEvent() 
        if (not isTimer(pause)) then 
            local health = getElementHealth(localPlayer) 
            if (health < 99) then 
            triggerServerEvent("medic:healing", localPlayer, attacker) 
            pause = setTimer(function() end, 1000, 1) 
            end 
        end 
    end 
end) 
  

:?:

Link to comment
طيب كذآ ؟
  
addEventHandler("onClientPlayerDamage", localPlayer, 
function(attacker, weapon) 
team = getPlayerTeam(attacker) 
    if (attacker and getElementType(attacker) == "player" and weapon == 41 and team and getTeamName(team) == "Medic") 
    then 
        cancelEvent() 
        if (not isTimer(pause)) then 
            local health = getElementHealth(localPlayer) 
            if (health < 99) then 
            triggerServerEvent("medic:healing", localPlayer, attacker) 
            pause = setTimer(function() end, 1000, 1) 
            end 
        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...