Sfa7 Posted February 14, 2013 Share Posted February 14, 2013 (edited) تمت الافاده Edited February 14, 2013 by Guest Link to comment
PaiN^ Posted February 14, 2013 Share Posted February 14, 2013 --> Server addEventHandler("onResourceStart",getRootElement(), function() setTeamFriendlyFire( getTeamFromName( "Police" ) ,false ) end ) addEventHandler( "onPlayerWasted", root, function immortal ( ) local team = getPlayerTeam ( source ) if ( team and getTeamFromName ( team ) == "Police" ) then cancelEvent () end end end addEventHandler( "onPlayerDamage", root, function immortal ( ) local team = getPlayerTeam ( source ) if ( team and getTeamFromName ( team ) == "Police" ) then cancelEvent () end end end Link to comment
Max+ Posted February 14, 2013 Share Posted February 14, 2013 ----ServerSide! addEventHandler('onPlayerJoin', resourceRoot, function() local team = getPlayerTeam( source) if ( team) and (getTeamFromName(source) == 'Police') and(getTeamFriendlyFire (team) == true) then setTeamFriendlyFire(team, false) triggerClientEvent(source, 'damage', source) end end ) -----ClientSide! addEvent('damage', true) addEventHandler('onClientPlayerDamage', resourceRoot, function() cancelEvent ( ) end ) اذا في أخطاء صححوها له ~ Link to comment
yazan Posted February 14, 2013 Share Posted February 14, 2013 onPlayerJoin ؟؟؟ على ما عتقد كذا "fire", false ) Link to comment
yazan Posted February 14, 2013 Share Posted February 14, 2013 بس وش دخل onPlayerJoin ماكس كودك خنفشاري ض1 Link to comment
Sfa7 Posted February 14, 2013 Author Share Posted February 14, 2013 يازين انا جربت كود علم + ماكس وحطيتهم كلهم سيرفر بس مااضبط طيب انت عدل كود واحد منهم ووحطه لي وانا بجربه ماعليك امر ^^ Link to comment
PaiN^ Posted February 14, 2013 Share Posted February 14, 2013 (edited) جرب ذا --> Server side addEventHandler( "onResourceStart", root, function( ) setTeamFriendlyFire( getTeamFromName( "Police" ) ,true ) end ) addEventHandler( "onPlayerWasted", root, function ( ) local team = getPlayerTeam ( source ) if ( team and getTeamFromName ( team ) == "Police" ) then cancelEvent ( ) end end end addEventHandler( "onPlayerDamage", root, function ( ) local team = getPlayerTeam ( source ) if ( team and getTeamFromName ( team ) == "Police" ) then cancelEvent () end end end وإذا ما إشتغل إطرح الميتا Edited February 14, 2013 by Guest Link to comment
yazan Posted February 14, 2013 Share Posted February 14, 2013 اوك بس كود ماكس ما له دخل في كل موضع Link to comment
yazan Posted February 14, 2013 Share Posted February 14, 2013 جرب ذا و نشالله يشتغل addEventHandler( "onResourceStart", root, function( ) setTeamFriendlyFire( getTeamFromName( "Police" ) ,true ) function(player) if player == localPlayer then showPlayerHudComponent("ammo", false) showPlayerHudComponent("weapon", false) end end) لو في غلط صححون له Link to comment
yazan Posted February 14, 2013 Share Posted February 14, 2013 جرب ذا و نشالله يشتغل addEventHandler( "onResourceStart", root, function( ) setTeamFriendlyFire( getTeamFromName( "Police" ) ,true ) function(player) if player == localPlayer then showPlayerHudComponent("ammo", false) showPlayerHudComponent("weapon", false) end end) لو في غلط صححون له Link to comment
yazan Posted February 14, 2013 Share Posted February 14, 2013 اسف الكود غلط هذي يلي في تيم الشرطه ما يقدر يقتل Link to comment
PaiN^ Posted February 14, 2013 Share Posted February 14, 2013 جرب ذا و نشالله يشتغل addEventHandler( "onResourceStart", root, function( ) setTeamFriendlyFire( getTeamFromName( "Police" ) ,true ) function(player) if player == localPlayer then showPlayerHudComponent("ammo", false) showPlayerHudComponent("weapon", false) end end) لو في غلط صححون له showPlayerHudComponent ??!! -_-" Link to comment
yazan Posted February 14, 2013 Share Posted February 14, 2013 (edited) غير مجرب +كلنت جرب addEventHandler( "onResourceStart", root, function( ) setTeamFriendlyFire( getTeamFromName( "Police" ) ,true ) function(player) addEventHandler( "onPlayerDamage"in(" Police" )Team if player == localPlayer then showPlayerHudComponent("ammo", false) showPlayerHudComponent("weapon", false) end end) Edited February 14, 2013 by Guest Link to comment
yazan Posted February 14, 2013 Share Posted February 14, 2013 ترا كودي قريب من صح لو في غلط تصحيح Link to comment
Max+ Posted February 14, 2013 Share Posted February 14, 2013 يايزن كود خطأ Xخطآ ~ + سفآح كودي متآكد انه يشتغل اللي مكتوب ----ServerSide ! حطه في ملف سيرفر لحاله وخل الميتا server والثاني ---ClientSide حطه في ملف لحاله وبالميتا خله clientSide ~ Link to comment
#Al-Ha[J]aRii Posted February 14, 2013 Share Posted February 14, 2013 غير مجرب +كلنت جرب addEventHandler( "onResourceStart", root, function( ) setTeamFriendlyFire( getTeamFromName( "Police" ) ,true ) function(player) addEventHandler( "onPlayerDamage"in(" Police" )Team if player == localPlayer then showPlayerHudComponent("ammo", false) showPlayerHudComponent("weapon", false) end end) غلط Link to comment
yazan Posted February 14, 2013 Share Posted February 14, 2013 اوك بس ماكس انت حاط كود ما له دخلوش دخل امر دخول لاعب للسيرفر ؟؟؟؟ Link to comment
Sfa7 Posted February 14, 2013 Author Share Posted February 14, 2013 Team addEventHandler('onPlayerJoin', resourceRoot, function() local team = getPlayerTeam( source) if ( team) and (getTeamFromName(source) == 'Police') and(getTeamFriendlyFire (team) == true) then setTeamFriendlyFire(team, false) triggerClientEvent(source, 'damage', source) end end ) Team1 addEvent('damage', true) addEventHandler('onClientPlayerDamage', resourceRoot, function() cancelEvent ( ) end ) Meta "Sfa7" version="2" type="script" /> تيم و تيم1 كل واحد ملف لوحده النتيجه × ماضبط ^^ Link to comment
TAPL Posted February 14, 2013 Share Posted February 14, 2013 ايش التخبيص ذا الي ما يعرف لا يرد بدون ما يجرب أكواده و يتأكد أنها شغاله ولا يخربط صاحب الموضوع -- client side addEventHandler("onClientPlayerDamage", localPlayer, function() local team = getPlayerTeam(source) if team and team == getTeamFromName("Police") then cancelEvent() end end) Link to comment
PaiN^ Posted February 14, 2013 Share Posted February 14, 2013 جرب ذا --> Server side addEventHandler( "onResourceStart", root, function( ) setTeamFriendlyFire( getTeamFromName( "Police" ) ,true ) end ) addEventHandler( "onPlayerWasted", root, function ( ) local team = getPlayerTeam ( source ) if ( team and getTeamFromName ( team ) == "Police" ) then cancelEvent ( ) end end end addEventHandler( "onPlayerDamage", root, function ( ) local team = getPlayerTeam ( source ) if ( team and getTeamFromName ( team ) == "Police" ) then cancelEvent () end end end وإذا ما إشتغل إطرح الميتا كودي فيه أغلاط يا تابل ؟؟ Link to comment
iPrestege Posted February 14, 2013 Share Posted February 14, 2013 جرب ذا --> Server side addEventHandler( "onResourceStart", root, function( ) setTeamFriendlyFire( getTeamFromName( "Police" ) ,true ) end ) addEventHandler( "onPlayerWasted", root, function ( ) local team = getPlayerTeam ( source ) if ( team and getTeamFromName ( team ) == "Police" ) then cancelEvent ( ) end end end addEventHandler( "onPlayerDamage", root, function ( ) local team = getPlayerTeam ( source ) if ( team and getTeamFromName ( team ) == "Police" ) then cancelEvent () end end end وإذا ما إشتغل إطرح الميتا كودي فيه أغلاط يا تابل ؟؟ فية اندات زايده وفية شوية اخطاء / = Link to comment
TAPL Posted February 14, 2013 Share Posted February 14, 2013 ما تقدر تلغيه onPlayerWasted الأفنت ما تقدر تلغيه onPlayerDamage و أفنت أنت جالس تفعل النيران الصديقة و صاحب الموضوع يبي يلغيها setTeamFriendlyFire و و هذا السطر مدري وش يبي if ( team and getTeamFromName ( team ) == "Police" ) then بالله أقرأ كودك و شوف ايش الي فيه مو تسوي كوبي بست و مو داري وش السالفه يجيب عنصر التيم من اسم التيم getTeamFromName الكود يعني ما يصير تقارنه مع أسم التيم ذا غير الأند الي زايد الزبده مافيه شي صح بكودك نهائياً Link to comment
Sfa7 Posted February 14, 2013 Author Share Posted February 14, 2013 ايش التخبيص ذاالي ما يعرف لا يرد بدون ما يجرب أكواده و يتأكد أنها شغاله ولا يخربط صاحب الموضوع -- client side addEventHandler("onClientPlayerDamage", localPlayer, function() local team = getPlayerTeam(source) if team and team == getTeamFromName("Police") then cancelEvent() end end) تابل كفوو بس انا طلبت اذا الاعب طلق علي ماينقص دمي + هو ينقص دمه اذا طلق علي الكود صح وكل شي اوكي بس انا ابي اذا طلق علي ينقص دمه هو 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