mazzika Posted March 6, 2014 Posted March 6, 2014 سلام عليكم اخونا بسول , ساعدني اليوم في الكود addEventHandler( "onPlayerTarget", root,function( target ) local team = getTeamFromName("Police") if ( getPlayerTeam(target) == team ) then setPlayerWantedLevel( source, 2 ) end) لكن يوم اصوب علي الشرطي مايجي نجوم يآريت الحل
</Mr.Tn6eL> Posted March 6, 2014 Posted March 6, 2014 جرب + اختصر اكوادك لاتضيف معرفات كثير addEventHandler( "onPlayerTarget", root,function( target ) if ( getPlayerTeam(target) == getTeamFromName("Police") ) then setPlayerWantedLevel( source, 2 ) end end)
mazzika Posted March 6, 2014 Author Posted March 6, 2014 ناقص end شكرآ علي المسآعدة , لكن مش شغال جرب+ اختصر اكوادك لاتضيف معرفات كثير addEventHandler( "onPlayerTarget", root,function( target ) if ( getPlayerTeam(target) == getTeamFromName("Police") ) then setPlayerWantedLevel( source, 2 ) end end) شكرآ علي المسآعدة , لكن مش شغال د الكود ناقص تحقق مهم جدا ! getElementType يعني يكون الكود كدا ؟ addEventHandler( "onPlayerTarget", root, function( target ) local team = getTeamFromName("Police") if getElementType ( targetElem ) == "Police" and getElementModel ( targetElem ) == 3374 then if ( getPlayerTeam(target) == team ) then setPlayerWantedLevel( source, 1 ) end end) ALPRNS !!! قبل تسبه واليوم تقول ساعد ؟ ناس غريبة اما بالنسبة ليك انا مش فاهمك
</Mr.Tn6eL> Posted March 6, 2014 Posted March 6, 2014 ناقص end شكرآ علي المسآعدة , لكن مش شغال جرب+ اختصر اكوادك لاتضيف معرفات كثير addEventHandler( "onPlayerTarget", root,function( target ) if ( getPlayerTeam(target) == getTeamFromName("Police") ) then setPlayerWantedLevel( source, 2 ) end end) شكرآ علي المسآعدة , لكن مش شغال د الكود ناقص تحقق مهم جدا ! getElementType يعني يكون الكود كدا ؟ addEventHandler( "onPlayerTarget", root, function( target ) local team = getTeamFromName("Police") if getElementType ( targetElem ) == "Police" and getElementModel ( targetElem ) == 3374 then if ( getPlayerTeam(target) == team ) then setPlayerWantedLevel( source, 1 ) end end) ALPRNS !!! قبل تسبه واليوم تقول ساعد ؟ ناس غريبة اما بالنسبة ليك انا مش فاهمك الكود سيرفر ياحلو ذا بست مايحتاج تحقق لان الحدث للاعب onPlayerTarget addEventHandler( "onPlayerTarget", root, function( target ) local team = getTeamFromName("Police") if getElementType ( targetElem ) == "Police" and getElementModel ( targetElem ) == 3374 then if ( getPlayerTeam(target) == team ) then setPlayerWantedLevel( source, 1 ) end end) X getElementType --- يجيب نوع الالمنت getElementModel ( targetElem ) == 3374
mazzika Posted March 6, 2014 Author Posted March 6, 2014 شكرآ بس لسة موجودة المشكلة اصوب علي الاعب مايجي ولا نجمة
فاّرس Posted March 6, 2014 Posted March 6, 2014 ذا بست مايحتاج تحقق لان الحدث للاعب onPlayerTarget حبيبي من قالك اني اتكلم عن الحدث ؟ انا اتكلم عن البرامتر داخل الحدث, targettedElement: The element the player is targetting. false if no element is being targetted anymore. يعني تخيل مثلا يجيب التيم حق السياره ولا الاوبجكت؟ الكود يصير كذا, -- Server Side # addEventHandler( 'onPlayerTarget', root,function( target ) if target and getElementType(target) == 'player' then if getPlayerTeam(target) and getTeamName(getPlayerTeam(target)) == 'Police' and getPlayerWantedLevel(source) ~= 2 then setPlayerWantedLevel( source, 2 ) end end end )
mazzika Posted March 6, 2014 Author Posted March 6, 2014 (edited) شكرآ The Best بس اناا جربتها مش شغاله Edit لما اقتل لاعب او اي شخص مايجي نجوم الاول كان يجي Edited March 6, 2014 by Guest
فاّرس Posted March 6, 2014 Posted March 6, 2014 لازم تصوب على شرطي ويكون ما عندك نجمتين ذذ وتأكد انه سيرفر
mazzika Posted March 6, 2014 Author Posted March 6, 2014 لازم تصوب على شرطي ويكون ما عندك نجمتين ذذ وتأكد انه سيرفر انا بصوب علي واحد في تيم Police وانا No Team , وماعندي نجوم مش بيجي اي نجوم لما اصوب
فاّرس Posted March 6, 2014 Posted March 6, 2014 الكود يتحقق لو صوبت ان الي صوبت عليه بتيم الشرطه , وان ما معك نجمتين , يعطيك نجمتين ! اذا ما ضبط جرب كذا, -- Server Side # addEventHandler( 'onPlayerTarget', root,function( target ) if target and getElementType( target ) == 'player' then if getPlayerTeam( target ) and getTeamName(getPlayerTeam( target )) == 'Police' then if getPlayerTeam( source ) and getTeamName(getPlayerTeam( source )) ~= 'Police' and getPlayerWantedLevel(source) < 2 then setPlayerWantedLevel( source, 2 ) end end end end )
mazzika Posted March 6, 2014 Author Posted March 6, 2014 اطرح الميتا + ورنا الديبوق وش يقول ذذ صراحة معرف كلمة الديبوق بالانجليزي ض4
#DRAGON!FIRE Posted March 6, 2014 Posted March 6, 2014 اولأ لا تشفر الملف لانه الخطا ما بيجي بـ رقم السطر .. ثانيا اكتب بـ اف 8 debugscript 3
xFace[B]ook Posted March 6, 2014 Posted March 6, 2014 فيه شك انه البرنس >< + لا تشفر الملف خله بدون تشفير وجربه بعد مايضبط رح شفره
mazzika Posted March 6, 2014 Author Posted March 6, 2014 صحيح انا اعرف البرنس الي هو دلوقتي سونيك لكن انا صاحبه ضايف سكايب ونتكلم مايك وكدا وشركاء بالسيرفر وكمان جاري فيس بوك : جربت مانفع !
فاّرس Posted March 7, 2014 Posted March 7, 2014 جرب , -- Server Side # addEventHandler( 'onPlayerTarget', root ,function( target ) if target and getElementType( target ) == 'player' then local plrTeam = getPlayerTeam( source ) local targetTeam = getPlayerTeam ( target ) if getPlayerWantedLevel( source ) < 2 then if targetTeam and getTeamName(targetTeam) == 'Police' then if plrTeam then if getTeamName( plrTeam ) ~= 'Police' then setPlayerWantedLevel( source, 2 ) end else setPlayerWantedLevel( source, 2 ) end end end end end )
فاّرس Posted March 7, 2014 Posted March 7, 2014 حبيبي تأكد ان الي صوبت عليه معه تيم وانه في تيم الشرطه, وتأكد انك ما معك نجمتين يعني تكون نجومك اقل, وجرب الكود كذا وقولي وش يطلع لك بالشات , -- Server Side # addEventHandler( 'onPlayerTarget', root ,function( target ) if target and getElementType( target ) == 'player' then local plrTeam = getPlayerTeam( source ) local targetTeam = getPlayerTeam ( target ) if getPlayerWantedLevel( source ) < 2 then outputChatBox('Test 1',source) if targetTeam and getTeamName(targetTeam) == 'Police' then outputChatBox('Test 2',source) if plrTeam then outputChatBox('Test 3',source) if getTeamName( plrTeam ) ~= 'Police' then outputChatBox('Test 4',source) setPlayerWantedLevel( source, 2 ) end else setPlayerWantedLevel( source, 2 ) outputChatBox('Test 5',source) end end end end end )
mazzika Posted March 7, 2014 Author Posted March 7, 2014 شكرآ , شغال بس في سيرفر صديقي سيرفري انا لا مدري لية Edit لما الشرطي يضرب اي لاعب يجي عليه نجوم ؟!
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