Sparrow Posted February 25, 2012 Share 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' Link to comment
Evil-Cod3r Posted February 27, 2012 Share 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) Link to comment
JR10 Posted February 28, 2012 Share 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) لو منفعتش قول ماذا تريد Link to comment
Evil-Cod3r Posted February 28, 2012 Share Posted February 28, 2012 ههه Jr10 تتعلم عربي شوي شوي احييك على هاذا لول Link to comment
Sparrow Posted February 28, 2012 Author Share Posted February 28, 2012 شكرا JR10, أنا أريد أن يبقى الاعب في الأنيم 3 ثواني مع الشكر Link to comment
JR10 Posted February 28, 2012 Share 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) Link to comment
Sparrow Posted February 28, 2012 Author Share 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. Link to comment
Evil-Cod3r Posted February 28, 2012 Share Posted February 28, 2012 function stopDamage ( attacker, weapon, bodypart ) if ( weapon == 3 or weapon == 22 ) then cancelEvent() end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), stopDamage) Link to comment
Sparrow Posted February 29, 2012 Author Share Posted February 29, 2012 It cancel damage of the player but it didn't taze him. Link to comment
Evil-Cod3r Posted February 29, 2012 Share Posted February 29, 2012 please explane better ! Link to comment
Sparrow Posted March 1, 2012 Author Share Posted March 1, 2012 الاعب لا تأتيه الأنيم عند ضربه. Link to comment
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