3ssol Posted April 11, 2013 Share Posted April 11, 2013 سلام عليكم شباب بغيت كود يتحقق من سيريالي + اقدر احدد نوع السلاح الي ابيه بـ طلقه وحده يقتل الاعب يعني ابيه يتحقق من سيريالي واخذ مثلا سلاح AK واطلق ع واحد طلقه وحده يموت كيف Link to comment
Max+ Posted April 11, 2013 Share Posted April 11, 2013 addEventHandler('onPlayerSpawn', root, function ( ) if(getPlayerSerial(source) == 'MMMMMM' ) then giveWeapon(source, 31, 200 ) --- M4 with 200 ammo outputChatBox('You Have Got Super M4', source, 255, 0 ,0 ) triggerEvent('onPlayerDamage', source) end end ) ----------- addEvent('onPlayerDamage', true) addEventHandler('onPlayerDamage', root, function(i,w) if (w == 31) then killPed(source,i,w) end end) Try It , Link to comment
|Mr|-Talal07-| Posted April 11, 2013 Share Posted April 11, 2013 هذا الكود يقتل اللاعب بس بسلاح ak47 addEventHandler("onPlayerDamage",root, function (ata,wep) if ata then if getPlayerSerial(ata) == "xxxxx" then if wep == 30 then -- Ak47 = 30 killPed(source,ata,wep) end end end end ) و ذا يقتل بكل الاسلحه addEventHandler("onPlayerDamage",root, function (ata,wep) if ata then if getPlayerSerial(ata) == "xxxxx" then killPed(source,ata,wep) end end end ) Link to comment
3ssol Posted April 11, 2013 Author Share Posted April 11, 2013 كفوو اخوي طلال بس لاهنت ابيك تعدل ع هذا الكود ابي لما استخدم هذا الكود + اكون ماموت يعني الكود هذا يشتغل + ماموت دمي ماينقص لاهنت ^^ addEventHandler("onPlayerDamage",root, function ( attacker, weapon, bodypart, loss ) if ( attacker and attacker ~= source ) then if (getPlayerSerial ( source ) == "57891AD31F0DC576D66EB78199FE5FA2" ) then killPed (attacker,nil,14) end end end) Link to comment
===|OSAMA|=== Posted April 11, 2013 Share Posted April 11, 2013 -- Client Side ! addEventHandler ( "onClientPlayerDamage", localPlayer, function ( ) if ( getPlayerSerial ( source ) == "57891AD31F0DC576D66EB78199FE5FA2" ) then cancelEvent ( ) end end ) Link to comment
3ssol Posted April 11, 2013 Author Share Posted April 11, 2013 اخوي اسامه ابيك تضيفه للكود الي فوق عشان لما استخدم الي فوق يشتغل معه Link to comment
K1NG Posted April 11, 2013 Share Posted April 11, 2013 اخوي اسامه ابيك تضيفه للكود الي فوق عشان لما استخدم الي فوق يشتغل معه حط كود طلال بملف سيرفر ، وكود اسامة بملف الكلنت -_-" لأنه منع الدمج عن اللاعب ما يضبط غير كلنت ، بالسيرفر ما تقدر تسوي إلغاء للحدث .. Link to comment
PaiN^ Posted April 11, 2013 Share Posted April 11, 2013 * Client : addEventHandler ( "onClientPlayerDamage", localPlayer, function ( attacker ) if attacker and attacker ~= source then if ( getPlayerSerial ( source ) == "57891AD31F0DC576D66EB78199FE5FA2" ) then triggerServerEvent ( 'damage', attacker ); cancelEvent ( ); end end end ) * Server : addEvent ( 'damage', true ); addEventHandler ( 'damage', root, function ( ) killPed ( source ) 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