iMr.G[7]A Posted December 20, 2013 Share Posted December 20, 2013 السلام عليكم ورحمه الله وبركاتهـ اليوم ابيكم تعدلون لي كود حق القبض ابي يوم تضرب اللاعب يلحق الشرطي واذا قتله الشرطي يروح السجن هاذي الاكواد ملف c function policeJob ( attacker, attackerweapon, bodypart, loss ) if attacker and getElementType(attacker) == "player" then theTeam = getPlayerTeam ( attacker ) theWL = getPlayerWantedLevel ( source ) theSkin = getElementModel ( attacker ) if (attackerweapon == 3) and (loss > 2 ) and (theWL == 1) then if getTeamName( theTeam ) == "Police" or getTeamName( theTeam ) == "SWAT" or getTeamName( theTeam ) == "FBI" then setElementPosition (source, 1545.2,-1675.6,13.5, true) theName = getPlayerName ( source ) theCop = getPlayerName ( attacker ) outputChatBox ( "You have been jailed by "..theCop.. " for 1 min.", source ) outputChatBox ( "لمده دقيقه واحده "..theCop.. " لقد تم سجنك من قبل الشرطي", source ) local playeraccount = getPlayerAccount ( attacker ) givePlayerMoney (attacker, 1000) setTimer ( setElementPosition, 600000, 1, source, 1578.2,-1658.8,548.1) setPlayerWantedLevel (source, 0) end end end end addEventHandler ("onPlayerDamage", getRootElement(), policeJob) function policeJob ( attacker, attackerweapon, bodypart, loss ) if attacker and getElementType(attacker) == "player" then theTeam = getPlayerTeam ( attacker ) theWL = getPlayerWantedLevel ( source ) theSkin = getElementModel ( attacker ) if (attackerweapon == 3) and (loss > 2 ) and (theWL == 2) then if getTeamName( theTeam ) == "Police" or getTeamName( theTeam ) == "SWAT" or getTeamName( theTeam ) == "FBI" then setElementPosition (source, 1545.2,-1675.6,13.5, true) theName = getPlayerName ( source ) theCop = getPlayerName ( attacker ) outputChatBox ( "You have been jailed by "..theCop.. " for 2 min.", source ) outputChatBox ( "لمده دقيقتان "..theCop.. " لقد تم سجنك من قبل الشرطي", source ) local playeraccount = getPlayerAccount ( attacker ) givePlayerMoney (attacker, 1000) setTimer ( setElementPosition, 3000, 1, source, 1578.2,-1658.8,548.1) setPlayerWantedLevel (source, 0) end end end end addEventHandler ("onPlayerDamage", getRootElement(), policeJob) function policeJob ( attacker, attackerweapon, bodypart, loss ) if attacker and getElementType(attacker) == "player" then theTeam = getPlayerTeam ( attacker ) theWL = getPlayerWantedLevel ( source ) theSkin = getElementModel ( attacker ) if (attackerweapon == 3) and (loss > 2 ) and (theWL == 3) then if getTeamName( theTeam ) == "Police" or getTeamName( theTeam ) == "SWAT" or getTeamName( theTeam ) == "FBI" then setElementPosition (source, 1545.2,-1675.6,13.5, true) theName = getPlayerName ( source ) theCop = getPlayerName ( attacker ) outputChatBox ( "You have been jailed by "..theCop.. " for 3 min.", source ) outputChatBox ( "لمده ثلاث دقائق "..theCop.. " لقد تم سجنك من قبل الشرطي", source ) local playeraccount = getPlayerAccount ( attacker ) givePlayerMoney (attacker, 1000) setTimer ( setElementPosition, 3000, 1, source, 1578.2,-1658.8,548.1) setPlayerWantedLevel (source, 0) end end end end addEventHandler ("onPlayerDamage", getRootElement(), policeJob) ملف s --------------------------------------------------القبض على المجرم ----------------- function mjrm ( attacker, attackerweapon, bodypart, loss ) if attacker and getElementType(attacker) == "player" then theTeam = getPlayerTeam ( attacker ) theWL = getPlayerWantedLevel ( source ) theSkin = getElementModel ( attacker ) if (attackerweapon == 3 or attackerweapon == 24) and (loss > 1 ) and (theWL == 1) then if getTeamName( theTeam ) == "Police" or getTeamName( theTeam ) == "SWAT" or getTeamName( theTeam ) == "FBI" then triggerClientEvent(source,"jailtime", getRootElement()) theName = getPlayerName ( source ) theCop = getPlayerName ( attacker ) setPlayerWantedLevel (source, 0) givePlayerMoney ( attacker, 500 ) setPedAnimation( source, "SHOP", "SHP_Rob_HandsUp") setPedAnimation( attacker, "POLICE", "CopTraf_Come") setTimer ( setElementPosition, 3000, 1, source, 1578.2,-1658.8,548.1) setTimer(function() setPedAnimation( attacker) end, 3000, 1, true) triggerClientEvent("powarn", getRootElement()) outputChatBox ( "#ffffff[#FFFF00 " .. theCop.. "#ffffff] تم اعتقاله من قبل الشرطي #ffffff[#FFFF00 " .. theName .. "#ffffff] المجرم", getRootElement(), 255, 0, 0, true ) outputChatBox ( " لديك نجمه واحده سوف يتم اطلاق سراحك بعد دقيقه", source, 0, 255, 0, true ) outputChatBox ( "لقد قبضت على المجرم وكسبت 500 من المال", attacker, 0, 255, 0, true ) setTimer ( setElementPosition, 60000, 1, source, 1545.2,-1675.6,13.5) setPlayerWantedLevel (source, 0) end end end end addEventHandler ("onPlayerDamage", getRootElement(), mjrm) ---------------------------- ثلاث نجمات------ function mjrm3 ( attacker, attackerweapon, bodypart, loss ) if attacker and getElementType(attacker) == "player" then theTeam = getPlayerTeam ( attacker ) theWL = getPlayerWantedLevel ( source ) theSkin = getElementModel ( attacker ) if (attackerweapon == 3 or attackerweapon == 24) and (loss > 1 ) and (theWL == 3) then if getTeamName( theTeam ) == "Police" or getTeamName( theTeam ) == "SWAT" or getTeamName( theTeam ) == "FBI" then triggerClientEvent(source,"jailtime", getRootElement()) theName = getPlayerName ( source ) theCop = getPlayerName ( attacker ) setPlayerWantedLevel (source, 0) givePlayerMoney ( attacker, 1000 ) setPedAnimation( source, "SHOP", "SHP_Rob_HandsUp") setPedAnimation( attacker, "POLICE", "CopTraf_Come") setTimer ( setElementPosition, 3000, 1, source, 1545.2,-1675.6,13.5) setTimer(function() setPedAnimation( attacker) end, 3000, 1, true) triggerClientEvent("powarn", getRootElement()) triggerClientEvent(source,"jailtime", getRootElement()) outputChatBox ( "#ffffff[#FFFF00 " .. theCop.. "#ffffff] تم اعتقاله من قبل الشرطي #ffffff[#FFFF00 " .. theName .. "#ffffff] المجرم", getRootElement(), 255, 0, 0, true ) outputChatBox ( " لديك ثلاث نجمات سوف يتم اطلاق سراحك بعد 6 دقايق", source, 0, 255, 0, true ) outputChatBox ( "لقد قبضت على المجرم وكسبت 1000 من المال", attacker, 0, 255, 0, true ) setTimer ( setElementPosition, 360000, 1, source, 1578.2,-1658.8,548.1) setPlayerWantedLevel (source, 0) end end end end addEventHandler ("onPlayerDamage", getRootElement(), mjrm3) ----------------- 6 نجمات ---------- function mjrm6 ( attacker, attackerweapon, bodypart, loss ) if attacker and getElementType(attacker) == "player" then theTeam = getPlayerTeam ( attacker ) theWL = getPlayerWantedLevel ( source ) theSkin = getElementModel ( attacker ) if (attackerweapon == 3 or attackerweapon == 24) and (loss > 1 ) and (theWL == 6) then if getTeamName( theTeam ) == "Police" or getTeamName( theTeam ) == "SWAT" or getTeamName( theTeam ) == "FBI" then theName = getPlayerName ( source ) theCop = getPlayerName ( attacker ) setPlayerWantedLevel (source, 0) givePlayerMoney ( attacker, 3000 ) setPedAnimation( source, "SHOP", "SHP_Rob_HandsUp") triggerClientEvent(source,"jailtime", getRootElement()) setPedAnimation( attacker, "POLICE", "CopTraf_Come") setTimer ( setElementPosition, 3000, 1, source, 1578.2,-1658.8,548.1) setTimer(function() setPedAnimation( attacker) end, 3000, 1, true) triggerClientEvent("powarn", getRootElement()) outputChatBox ( "#ffffff[#FFFF00 " .. theCop.. "#ffffff] تم اعتقاله من قبل الشرطي #ffffff[#FFFF00 " .. theName .. "#ffffff] المجرم", getRootElement(), 255, 0, 0, true ) outputChatBox ( "لقد قبضت على المجرم وكسبت 3000 من المال", attacker, 0, 255, 0, true ) outputChatBox ( "انت محكوم بالسجن المؤبد لديك 6 نجمات", source, 0, 255, 0, true ) setPlayerWantedLevel (source, 0) end end end end addEventHandler ("onPlayerDamage", getRootElement(), mjrm6) -------------- --------------------اذا قتل الشرطي رجل العصابه مايعطيه نجمات ------ ------------------- اذا اطلق النار على الشرطه 3 نجمات--- function killcopx( attacker, attackerweapon, bodypart, loss ) if attacker and getElementType(attacker) == "player" then theWL = getPlayerWantedLevel ( attacker ) if (getTeamName( getPlayerTeam( source ) ) == 'Police') and (theWL == 6) then setPlayerWantedLevel ( attacker, 6 ) cancelEvent() end end end addEventHandler ("onPlayerDamage", getRootElement(), killcopx) ----------عطه 3 نجمات اذا عنده ثلاث نجمات ---------- function killcop( attacker, attackerweapon, bodypart, loss ) if attacker and getElementType(attacker) == "player" then theWL = getPlayerWantedLevel ( attacker ) if (getTeamName( getPlayerTeam( source ) ) == 'Police') and (theWL == 3) then setPlayerWantedLevel ( attacker, 3 ) cancelEvent() end end end addEventHandler ("onPlayerDamage", getRootElement(), killcop) ------------عطه نجمه وحده اذا ماعنده ولا نجمه------- function killcopss( attacker, attackerweapon, bodypart, loss ) if attacker and getElementType(attacker) == "player" then theWL = getPlayerWantedLevel ( attacker ) if (getTeamName( getPlayerTeam( source ) ) == 'Police') and (theWL == 0) then setPlayerWantedLevel ( attacker, 3 ) cancelEvent() end end end addEventHandler ("onPlayerDamage", getRootElement(), killcopss) Link to comment
Strider Posted December 20, 2013 Share Posted December 20, 2013 لوووول ,, ويش امسوي انت مكرر الفكشن مليون مرة + و الحدث ذا "onPlayerDamage" لجهة السيرفر فقط ماينفع للكلاينت 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