Jump to content

السجن


Sparrow

Recommended Posts

Posted

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

بسم الله الرحمان الرحيم

لقد قمت بسكريت السجن و لللأسف لا تعمل

function setPlayerAnim(pol, crim) 
    local wanted = getPlayerWantedLevel(crim) 
    local weapon = getWeaponNameFromID (23) 
    local playerTeam = getPlayerTeam(pol) 
    if (playerTeam == "Police") then 
        if (wanted(crim) > 1 and weapon(pol)) then 
            setTimer (3000, 1, setPedAnimation(crim, "BAR", "BARman_idle")) 
        end 
    end 
end 
addEventHandler("onPlayerDamage", getRootElement(), setPlayerAnim) 

رسائل

lua:2: Bad argument @ 'setPlayerWantedLevel'
Posted

try this

function setPlayerAnim(pol, crim) 
    local wanted = getPlayerWantedLevel(source) --- source or killer i dont know what you need 
    local weapon = getWeaponNameFromID (23) 
    local playerTeam = getPlayerTeam(pol) 
    if (playerTeam == "Police") then 
        if (wanted(crim) > 1 and weapon(pol)) then 
            setTimer (3000, 1, setPedAnimation(crim, "BAR", "BARman_idle")) 
        end 
    end 
end 
addEventHandler("onPlayerDamage", getRootElement(), setPlayerAnim) 
  
  

Posted
function setPlayerAnim(attacker) 
    local wanted = getPlayerWantedLevel(source) 
    local weapon = getWeaponNameFromID (23) 
    local playerTeam = getTeamName(getPlayerTeam(attacker)) 
    if (playerTeam == "Police") then 
        if (wanted > 1) then 
            setTimer (setPedAnimation,3000, 1, source, "BAR", "BARman_idle") 
        end 
    end 
end 
addEventHandler("onPlayerDamage", getRootElement(), setPlayerAnim) 

لو منفعتش قول ماذا تريد

Posted
ههه Jr10 تتعلم عربي شوي شوي احييك على هاذا لول

:D أحاول

function setPlayerAnim(attacker) 
    local wanted = getPlayerWantedLevel(source) 
    local weapon = getWeaponNameFromID (23) 
    local playerTeam = getTeamName(getPlayerTeam(attacker)) 
    if (playerTeam == "Police") then 
        if (wanted > 1) then 
            setPedAnimation(source, "BAR", "BARman_idle") 
            setTimer (setPedAnimation,3000, 1, source) 
        end 
    end 
end 
addEventHandler("onPlayerDamage", getRootElement(), setPlayerAnim) 

Posted

شكرا jr10

EDIT: how to set player didn't lose health when he get attacked by nightstick/9mm, I need to do the "cancelEvent" ?

sorry, I'm so late with writing arabic cuz I havn't arabic letters on keyboad. :)

Posted
function stopDamage ( attacker, weapon, bodypart ) 
    if ( weapon == 3 or weapon == 22 ) then 
        cancelEvent() 
    end 
end 
addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), stopDamage) 

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