Hussain Posted May 15, 2012 Share Posted May 15, 2012 Hello guys << نبي نقلبها انجليزي اليوم ض1 I want code for police team , when police hit player his wanted lvl = 0 The police get slap for 20 for all time he hit him And make DXtext up the player : Don't harm unwanted player ------ بالعربي شباب ابغى كود لـ فريق الششرطة إن لما الشرطي يضرب لآعب نجومه صصفر الشرطي ينقص دمه 20 بالمية على كل ضربه يضربها للآعب و يآريت اذا بالإمكان يجي كلآم فوق الاعب مثلآ Don't harm unwanted player وبكون شششآكر وممنون آسف عالطلب ولكن منكم نسستفيد ونفيد Link to comment
abu5lf Posted May 15, 2012 Share Posted May 15, 2012 --server getPlayerTeam getTeamFromName getPlayerWantedLevel getElementHealth setElementHealth -%20 --client dxDrawText -- اظن تستخدم ذاه -- event onPlayerDamage Link to comment
Hussain Posted May 16, 2012 Author Share Posted May 16, 2012 يصير زي كذا ؟ اصلحولي الأخطاء اذا ممكن function teamName ( Police ) local playerTeam = getPlayerTeam ( source ) if ( playerTeam ) Police then function wanted () local wantedLvl = getPlayerWantedLevel ( ) if wantedLvl == 0 then function showLocalHealth() local playerHealth = getElementHealth ( getLocalPlayer() ) if playerHealth then function hpSlap ( sourcePlayer, command, targetPlayerName ) if not hasObjectPermissionTo(sourcePlayer, "command.slap", false) then return false end local targetPlayer = getPlayerFromName ( targetPlayerName ) if targetPlayer then setElementHealth ( targetPlayer, getElementHealth(targetPlayer) - 20 ) end addCommandHandler ( onPlayerDamage, "wanted", "showhealth", "hpslap", hpSlap ) Link to comment
X-SHADOW Posted May 16, 2012 Share Posted May 16, 2012 طيب يانوب ليش تبي تعطي الشرطي سلاب كذا بيكون خبال المود ليش ماتخليه اذا الاعب ماهو مطلوب والشرطي يطلق عليه مايصير له شي احسن ^^ Link to comment
Hussain Posted May 16, 2012 Author Share Posted May 16, 2012 طيب يانوب ليش تبي تعطي الشرطي سلاب كذا بيكون خبال المود ليش ماتخليه اذا الاعب ماهو مطلوب والشرطي يطلق عليه مايصير له شي احسن ^^ يا قلبي الشيء الي قلته انت " اذا الاعب ماهو مطلوب والشرطي يطلق عليه مايصير له شيء " هذا متوفر لآ تحكم وتتسرع علي Link to comment
abozhrh Posted May 16, 2012 Share Posted May 16, 2012 تفضل server : function POlice_Slap ( attacker, weapon, bodypart, loss ) local playerTeam = getPlayerTeam ( attacker ) local PlayerTeamName = getTeamName ( playerTeam ) local wantedLvl = getPlayerWantedLevel (source) if PlayerTeamName == "Police" and wantedLvl == 0 then setElementHealth ( attacker, getElementHealth(attacker) - 20 ) end end addEventHandler ( "onPlayerDamage", getRootElement (), POlice_Slap ) Link to comment
abu5lf Posted May 16, 2012 Share Posted May 16, 2012 viewtopic.php?f=91&t=43372&p=437431#p437431 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