The Killer Posted January 15, 2014 Share Posted January 15, 2014 addEventHandler ("onClientPlayerDamage", root, function (attacker) if ( attacker and getElementType(attacker) == "player" ) then if ( getPlayerTeam(source) ~= getTeamFromName("Police") and getPlayerTeam(attacker) == getTeamFromName("Police") ) then local WastedLevel = getPlayerWantedLevel ( source ) if ( WastedLevel == 0 ) then cancelEvent() outputChatBox ("You can't kill that player, because he have 0 wanted level" , 255, 0, 0 ) end end end end ) Link to comment
xFace[B]ook Posted January 15, 2014 Share Posted January 15, 2014 addEventHandler ( "onPlayerDamage",root, function(attacker) if getElementType(attacker) ~= "player" then return end if attacker == source then return end if getPlayerTeam (source) == getTeamFromName ("Police") then return end if getPlayerTeam (attacker) ~= getTeamFromName("Police") then return end if getPlayerWantedLevel (source) ~= 0 then return end cancelEvent() outputChatBox ("كلامك",attacker,255,255,255) end) سيرفر فقط --تم التعديل ماتقدر تكنسل حدث onPlayerDamge Link to comment
TAPL Posted January 15, 2014 Share Posted January 15, 2014 ...__... معرض اكواد الكود الي حطيته شغال مافيه اي مشكلة ما يحتاج بعد تحطون هريس Link to comment
The Killer Posted January 15, 2014 Share Posted January 15, 2014 لو ما قال ان الكود ما اشتغل ما كان حطينا الاكواد ^ -,- Link to comment
فاّرس Posted January 15, 2014 Share Posted January 15, 2014 بما انك تشوف ان الاكواد صح خلاص لا ترد عليه ._. Link to comment
The-King Posted January 15, 2014 Author Share Posted January 15, 2014 (edited) addEventHandler ("onClientPlayerDamage", root, function (attacker) if ( attacker and getElementType(attacker) == "player" ) then if ( getPlayerTeam(source) ~= getTeamFromName("Police") and getPlayerTeam(attacker) == getTeamFromName("Police") ) then local WastedLevel = getPlayerWantedLevel ( source ) if ( WastedLevel == 0 ) then cancelEvent() outputChatBox ("You can't kill that player, because he have 0 wanted level" , 255, 0, 0 ) end end end end ) الكود شغال بس ما بيطع كلام Edited January 15, 2014 by Guest Link to comment
The-King Posted January 15, 2014 Author Share Posted January 15, 2014 /debugscript 3 ما في حاجة في الدبيق سكربت Link to comment
The-King Posted January 15, 2014 Author Share Posted January 15, 2014 حطه كلنت يب مسويها كلينت حتا شوف "king" version="1.1" type="script" name = "king"/> Link to comment
TAPL Posted January 15, 2014 Share Posted January 15, 2014 جرب هذا و قول لي وش الي يجي بالشات بالنسبة إلى الشرطي و بالنسبة إلى اللاعب الآخر الي ماعليه نجوم كلبنت addEventHandler("onClientPlayerDamage", localPlayer, function(attacker) outputChatBox("TEST Client: 1") if (attacker and getElementType(attacker) == "player" and attacker ~= source) then outputChatBox("TEST Client: 2") if (getPlayerTeam(source) ~= getTeamFromName("Police") and getPlayerTeam(attacker) == getTeamFromName("Police")) then outputChatBox("TEST Client: 3") if (getPlayerWantedLevel() == 0) then outputChatBox("TEST Client: 4") cancelEvent() triggerServerEvent("outputAttacker", attacker) outputChatBox("TEST Client: 5") end end end end) سيرفر addEvent("outputAttacker", true) addEventHandler("outputAttacker", root, function() outputChatBox("TEST Server") outputChatBox("You Can't kill that Player, because he doesn't have 0 Wanted Level", source, 255, 255, 255) end) Link to comment
The-King Posted January 15, 2014 Author Share Posted January 15, 2014 جرب هذا و قول لي وش الي يجي بالشات بالنسبة إلى الشرطي و بالنسبة إلى اللاعب الآخر الي ماعليه نجومكلبنت addEventHandler("onClientPlayerDamage", localPlayer, function(attacker) outputChatBox("TEST Client: 1") if (attacker and getElementType(attacker) == "player" and attacker ~= source) then outputChatBox("TEST Client: 2") if (getPlayerTeam(source) ~= getTeamFromName("Police") and getPlayerTeam(attacker) == getTeamFromName("Police")) then outputChatBox("TEST Client: 3") if (getPlayerWantedLevel() == 0) then outputChatBox("TEST Client: 4") cancelEvent() triggerServerEvent("outputAttacker", attacker) outputChatBox("TEST Client: 5") end end end end) سيرفر addEvent("outputAttacker", true) addEventHandler("outputAttacker", root, function() outputChatBox("TEST Server") outputChatBox("You Can't kill that Player, because he doesn't have 0 Wanted Level", source, 255, 255, 255) end) خرب ناهيئا ما عاد يشتغل ولة يطلع كلام ميتا "Me" version="1.1" type="script" name = "xME"/> Link to comment
TAPL Posted January 15, 2014 Share Posted January 15, 2014 تستهبل علينا ما يشتغل ارفع المود على موقع Link to comment
The-King Posted January 15, 2014 Author Share Posted January 15, 2014 تستهبل علينا ما يشتغلارفع المود على موقع تعالة سكايب و اوريك هات سكايبك Link to comment
AboShanab Posted January 15, 2014 Share Posted January 15, 2014 مو لازم سكايب ارفعه على اي موقع رفع وحطه هنا -____-' Link to comment
The-King Posted January 15, 2014 Author Share Posted January 15, 2014 مو لازم سكايب ارفعه على اي موقع رفع وحطه هنا -____-' اقول يجي يجرب معي في السيرفر الممجاني و اوريهاا Link to comment
TAPL Posted January 15, 2014 Share Posted January 15, 2014 تستهبل علينا ما يشتغلارفع المود على موقع تعالة سكايب و اوريك هات سكايبك tapl_93 EDIT: اخونا الحبيب طلع جايب العيد الكود هذا if (getPlayerTeam(source) ~= getTeamFromName("Police") and getPlayerTeam(attacker) == getTeamFromName("Police")) then مسويه كذا if (getPlayerTeam(source) ~= getTeamFromName("No Team") and getPlayerTeam(attacker) == getTeamFromName("Police")) then بينما المفروض يسويه كذا if (getPlayerTeam(source) == getTeamFromName("No Team") and getPlayerTeam(attacker) == getTeamFromName("Police")) then Link to comment
The-King Posted January 15, 2014 Author Share Posted January 15, 2014 تم حل المشكلة من قبل تابل يسلموو تاابل Link to comment
Recommended Posts