Sparrow Posted February 25, 2012 Posted February 25, 2012 السلام عليكم و رحمة الله. بسم الله الرحمان الرحيم لقد قمت بسكريت السجن و لللأسف لا تعمل 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'
Evil-Cod3r Posted February 27, 2012 Posted February 27, 2012 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)
JR10 Posted February 28, 2012 Posted February 28, 2012 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) لو منفعتش قول ماذا تريد
Evil-Cod3r Posted February 28, 2012 Posted February 28, 2012 ههه Jr10 تتعلم عربي شوي شوي احييك على هاذا لول
Sparrow Posted February 28, 2012 Author Posted February 28, 2012 شكرا JR10, أنا أريد أن يبقى الاعب في الأنيم 3 ثواني مع الشكر
JR10 Posted February 28, 2012 Posted February 28, 2012 ههه Jr10 تتعلم عربي شوي شوي احييك على هاذا لول أحاول 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)
Sparrow Posted February 28, 2012 Author Posted February 28, 2012 شكرا 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.
Evil-Cod3r Posted February 28, 2012 Posted February 28, 2012 function stopDamage ( attacker, weapon, bodypart ) if ( weapon == 3 or weapon == 22 ) then cancelEvent() end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), stopDamage)
Sparrow Posted February 29, 2012 Author Posted February 29, 2012 It cancel damage of the player but it didn't taze him.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now