The-King Posted January 14, 2014 Share Posted January 14, 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(true) outputChatBox ("You Can't kill that Player , because he dosen't have 0 Wanted Level" , attacker , 255 , 255 , 255 ) end end end end) ابي تعديل علي هذا لكود كيف ؟ الكلام ال يطلع ال هو You Cant و كذا ابيها يظظهر للشرطي بس ما يظهر لكل السيرفر Link to comment
فاّرس Posted January 14, 2014 Share Posted January 14, 2014 سوي تريقر للسيرفر triggerServerEvent Link to comment
The-King Posted January 14, 2014 Author Share Posted January 14, 2014 سوي تريقر للسيرفر triggerServerEvent كيف يعني و اصلن ما في غير سيرفر الكود ذا سيرفر ما في كلينت كيف اسوي تريقر Link to comment
فاّرس Posted January 14, 2014 Share Posted January 14, 2014 خخخ ومن قالك ان الكود سيرفر ؟؟ onClientPlayerDamage -__-" ما بتقدر تسوي له كانسل onPlayerDamage هو اصلا كلينت, وبعدين حتى لو حطيت Link to comment
The-King Posted January 14, 2014 Author Share Posted January 14, 2014 خخخ ومن قالك ان الكود سيرفر ؟؟posting.php?mode=quote&f=160&p=649055# onClientPlayerDamage -__-" ما بتقدر تسوي له كانسل onPlayerDamage هو اصلا كلينت, وبعدين حتى لو حطيت اوكي يعني الحين انا ابي الكلام ما يظهر للكل وش اسوي ولة وش تسويلي انت ؟ Link to comment
TAPL Posted January 14, 2014 Share Posted January 14, 2014 Client Side: addEventHandler("onClientPlayerDamage", root, function(attacker) if (attacker and getElementType(attacker) == "player" and attacker ~= source) then if (getPlayerTeam(source) ~= getTeamFromName("Police") and getPlayerTeam(attacker) == getTeamFromName("Police")) then if (getPlayerWantedLevel(source) == 0) then if (source == localPlayer) then cancelEvent() elseif (attacker == localPlayer) then outputChatBox("You Can't kill that Player, because he doesn't have 0 Wanted Level", 255, 255, 255) end end end end end) Link to comment
The-King Posted January 14, 2014 Author Share Posted January 14, 2014 Client Side: addEventHandler("onClientPlayerDamage", root, function(attacker) if (attacker and getElementType(attacker) == "player" and attacker ~= source) then if (getPlayerTeam(source) ~= getTeamFromName("Police") and getPlayerTeam(attacker) == getTeamFromName("Police")) then if (getPlayerWantedLevel(source) == 0) then if (source == localPlayer) then cancelEvent() elseif (attacker == localPlayer) then outputChatBox("You Can't kill that Player, because he doesn't have 0 Wanted Level", 255, 255, 255) end end end end end) الكود خرب و برضو ما يجي كلام Link to comment
TAPL Posted January 14, 2014 Share Posted January 14, 2014 صح ذكرت شي getPlayerWantedLevel بالكلينت يعطي بس حق اللوكل بلاير Client Side: addEventHandler("onClientPlayerDamage", localPlayer, function(attacker) if (attacker and getElementType(attacker) == "player" and attacker ~= source) then if (getPlayerTeam(source) ~= getTeamFromName("Police") and getPlayerTeam(attacker) == getTeamFromName("Police")) then if (getPlayerWantedLevel() == 0) then cancelEvent() triggerServerEvent("outputAttacker", attacker) end end end end) Server Side: addEvent("outputAttacker", true) addEventHandler("outputAttacker", root, function() 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 14, 2014 Author Share Posted January 14, 2014 صح ذكرت شيgetPlayerWantedLevel بالكلينت يعطي بس حق اللوكل بلاير Client Side: addEventHandler("onClientPlayerDamage", localPlayer, function(attacker) if (attacker and getElementType(attacker) == "player" and attacker ~= source) then if (getPlayerTeam(source) ~= getTeamFromName("Police") and getPlayerTeam(attacker) == getTeamFromName("Police")) then if (getPlayerWantedLevel() == 0) then cancelEvent() triggerServerEvent("outputAttacker", attacker) end end end end) Server Side: addEvent("outputAttacker", true) addEventHandler("outputAttacker", root, function() outputChatBox("You Can't kill that Player, because he doesn't have 0 Wanted Level", source, 255, 255, 255) end) برضو Link to comment
#DRAGON!FIRE Posted January 14, 2014 Share Posted January 14, 2014 صح ذكرت شيgetPlayerWantedLevel بالكلينت يعطي بس حق اللوكل بلاير Client Side: addEventHandler("onClientPlayerDamage", localPlayer, function(attacker) if (attacker and getElementType(attacker) == "player" and attacker ~= source) then if (getPlayerTeam(source) ~= getTeamFromName("Police") and getPlayerTeam(attacker) == getTeamFromName("Police")) then if (getPlayerWantedLevel() == 0) then cancelEvent() triggerServerEvent("outputAttacker", attacker) end end end end) Server Side: addEvent("outputAttacker", true) addEventHandler("outputAttacker", root, function() outputChatBox("You Can't kill that Player, because he doesn't have 0 Wanted Level", source, 255, 255, 255) end) برضو اطرح الميتا . Link to comment
فاّرس Posted January 14, 2014 Share Posted January 14, 2014 لخبطت بين الكلينت والسيرفر؟ الاول كلينت والثاني سيرفر Link to comment
The-King Posted January 14, 2014 Author Share Posted January 14, 2014 لخبطت بين الكلينت والسيرفر؟الاول كلينت والثاني سيرفر برضو اقدر اقتل لو ما علي نجوم+ ما في كلام بيطلع Link to comment
The-King Posted January 14, 2014 Author Share Posted January 14, 2014 اطرح الميتا . "The-king" version="1.1" type="script" name = "King"/> انا غيرتا مثل ما قال THE BEST Link to comment
فاّرس Posted January 14, 2014 Share Posted January 14, 2014 lua.lua = راح يكون فيه الكود الثاني new2.lua = راح يكون فيه الكود الاول, + يمكن انت تبي غير الي بالكود , قولنا وش تبي تسوي؟ Link to comment
#DRAGON!FIRE Posted January 14, 2014 Share Posted January 14, 2014 اطرح الميتا . "The-king" version="1.1" type="script" name = "King"/> انا غيرتا مثل ما قال THE BEST زي ما قالك .. اول ملف لثاني كود , والثاني لاول كود ولأ تنسا تنسخ الكود كامل ولأ تنقص منه شي .. Link to comment
The-King Posted January 14, 2014 Author Share Posted January 14, 2014 اطرح الميتا . "The-king" version="1.1" type="script" name = "King"/> انا غيرتا مثل ما قال THE BEST زي ما قالك .. اول ملف لثاني كود , والثاني لاول كود ولأ تنسا تنسخ الكود كامل ولأ تنقص منه شي .. ادري سويت كذا Link to comment
فاّرس Posted January 14, 2014 Share Posted January 14, 2014 lua.lua = راح يكون فيه الكود الثانيnew2.lua = راح يكون فيه الكود الاول, + يمكن انت تبي غير الي بالكود , قولنا وش تبي تسوي؟ Link to comment
The-King Posted January 14, 2014 Author Share Posted January 14, 2014 lua.lua = راح يكون فيه الكود الثانيnew2.lua = راح يكون فيه الكود الاول, + يمكن انت تبي غير الي بالكود , قولنا وش تبي تسوي؟ اخي الكود حقي شغال ميا ميا 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 ) ( WastedLevel == 0 ) then cancelEvent(true) outputChatBox ("You Can't kill that Player , because he dosen't have 0 Wanted Level" , attacker , 255 , 255 , 255 ) end end end end) ذا الكود اذا ما عليك نجوم الشرطي ما يقدر يقتلك وش ابي انا اوكي وش انا ابي اسوي ؟ You Can't kill that Player , because he dosen't have 0 Wanted Level" ما يظهر للكل يظهر بس للشرطي فهمتوني ؟ Link to comment
فاّرس Posted January 14, 2014 Share Posted January 14, 2014 وكود تابل كيف ما اشتغل ؟؟ انت متأكد انه بالتيم؟ حق الشرطه؟ Link to comment
The-King Posted January 14, 2014 Author Share Posted January 14, 2014 وكود تابل كيف ما اشتغل ؟؟انت متأكد انه بالتيم؟ حق الشرطه؟ يب و القصادي نو تيم و اقدر اقتلو+ما بيظهر كلام و عكست الكلنت و السيرفر في ميتا و في الكود و ما نفع Link to comment
#DRAGON!FIRE Posted January 14, 2014 Share Posted January 14, 2014 وكود تابل كيف ما اشتغل ؟؟انت متأكد انه بالتيم؟ حق الشرطه؟ يب و القصادي نو تيم و اقدر اقتلو+ما بيظهر كلام و عكست الكلنت و السيرفر في ميتا و في الكود و ما نفع وش محسب انت الشي حظ لو عكسته يضبط ؟ .. الكلنت حطه كلنت والسيرفر سيرفر وتأكد انك بالتيم Link to comment
The-King Posted January 14, 2014 Author Share Posted January 14, 2014 وكود تابل كيف ما اشتغل ؟؟انت متأكد انه بالتيم؟ حق الشرطه؟ يب و القصادي نو تيم و اقدر اقتلو+ما بيظهر كلام و عكست الكلنت و السيرفر في ميتا و في الكود و ما نفع وش محسب انت الشي حظ لو عكسته يضبط ؟ .. الكلنت حطه كلنت والسيرفر سيرفر وتأكد انك بالتيم ي اخي ذا بيست قال لي كذا و بعدين انا جربت اعكس كلينت كلينت و سيرفر سيرفر و كلينت سيرفر و سيرفر كلينت برضو ما اشتغل Link to comment
xX|KeMo|Xx Posted January 15, 2014 Share Posted January 15, 2014 (edited) 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) سيرفر فقط --تم التعديل Edited January 15, 2014 by Guest Link to comment
#DRAGON!FIRE 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 ("كلامك",255,255,255) end) سيرفر فقط outputChatBox ("كلامك",255,255,255) ?????? cancelEvent + onPlayerDamage !!!!!!!!!!!!! Link to comment
Recommended Posts