Jump to content

x[ تمت الافاده ]x


Sfa7

Recommended Posts

-- client side 
  
addEventHandler("onClientPlayerDamage", root, 
function(attacker) 
    if attacker and getElementType(attacker) == "player" then 
        local team = getPlayerTeam(source) 
        if team and team == getTeamFromName("Police") then 
            cancelEvent() 
            setElementHealth(attacker, getElementHealth(attacker) - 20) 
        end 
    end 
end) 

Link to comment
  • Replies 55
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

-- client side 
  
addEventHandler("onClientPlayerDamage", root, 
function(attacker) 
    if attacker and getElementType(attacker) == "player" then 
        local team = getPlayerTeam(source) 
        if team and team == getTeamFromName("Police") then 
            cancelEvent() 
            setElementHealth(attacker, getElementHealth(attacker) - 20) 
        end 
    end 
end) 

كفوووووووووووووو تابل يعطيك العافيه ي مببدع وربي شنب ذيب

بس تابل بغيت يعني الي يدخل التيم هذا التيم يعطيه شخصيه

واذا غير الشخصيه واهو داخل التيم ابيه يطرده التيم يمديك ؟

Link to comment
-- server side 
  
addEventHandler("onElementModelChange", root, 
function(oldModel, newModel) 
    if getElementType(source) == "player" then 
        local team = getPlayerTeam(source) 
        if team and team == getTeamFromName("Police") and newModel ~= 217 then 
            setPlayerTeam(source, nil) 
        end 
    end 
end) 

Link to comment

الميتا

    "sfa7" version="2" type="script" /> 
    

الكود

addEventHandler("onElementModelChange", root, 
function(oldModel, newModel) 
    if getElementType(source) == "player" then 
        local team = getPlayerTeam(source) 
        if team and team == getTeamFromName("Police") and newModel ~= 217 then 
            setPlayerTeam(source, nil) 
        end 
    end 
end) 

موراضي يشتغل !!

Link to comment

---ServerSide

addEventHandler('onElementModelChange', resourceRoot, 
function(oldModel, newModel) 
    local teams = getPlayerTeam(source) 
    if teams then 
    if (getElementType(source) == 'player' and getTeamFromName == 'Police' and newModel == 217) then 
    setPlayerTeam(source, nil) 
    outputChatBox('You Have Been Kicked Out Dont Change Your Skin', source, 255, 0, 0) 
       end 
   end 
end 
) 

Link to comment
---ServerSide
addEventHandler('onElementModelChange', resourceRoot, 
function(oldModel, newModel) 
    local teams = getPlayerTeam(source) 
    if teams then 
    if (getElementType(source) == 'player' and getTeamFromName == 'Police' and newModel == 217) then 
    setPlayerTeam(source, nil) 
    outputChatBox('You Have Been Kicked Out Dont Change Your Skin', source, 255, 0, 0) 
       end 
   end 
end 
) 

يالحبيب ماتقرا زين؟ يقولك اذا غير شخصيتة وماكانت 217 !! وين ؟ :lol:

Link to comment
addEventHandler("onClientPlayerDamage", root, 
function(attacker) 
    if attacker and getElementType(attacker) == "player" then 
        local team = getPlayerTeam(source) 
        if team and team == getTeamFromName("Police") then 
            cancelEvent() 
            setElementHealth(attacker, getElementHealth(attacker) - 20) 
        end 
    end 
end) 

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

Link to comment
لا يبوي انا ابيه اول مايدخل التيم يعطيه

بما ان لا يوجد أفنت لما التيم يتغير

في ذي الحاله بتحتاج إلى تايمر لا نهائي

setTimer 
getElementsByType -- for loop all players 
getPlayerTeam 
getTeamFromName 
setElementModel 

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