3ssol Posted April 10, 2013 Share Posted April 10, 2013 سلام عليكم شباب ابي احدد سيريال شخص الي يضربه يموت وانا احدد نوع السلاح الي راح ينقتل فيه الي ضربني خخخ >< Link to comment
iPrestege Posted April 10, 2013 Share Posted April 10, 2013 onPlayerDamage getPlayerSerial killPed -- Server Functions and Events -- Link to comment
3ssol Posted April 10, 2013 Author Share Posted April 10, 2013 ايه عارفهم بس مادري كيف ارتبهم Link to comment
3ssol Posted April 10, 2013 Author Share Posted April 10, 2013 ماضبط addEventHandler ( "onPlayerDamage", getRootElement (), function (attacker,player) if ( getPlayerSerial(player)~="57891AD31F0DC576D66EB78199FE5FA2" )then killPed ( player, attacker, attackerweapon, bodypart ) end end) Link to comment
iPrestege Posted April 10, 2013 Share Posted April 10, 2013 addEventHandler("onPlayerDamage",root, function ( attacker, weapon, bodypart, loss ) if ( attacker and attacker ~= source ) then if ( getPlayerSerial ( source ) == "Your Serial" ) and ( weapon == ID ) then killPed ( attacker ); end; end; end ) Link to comment
3ssol Posted April 10, 2013 Author Share Posted April 10, 2013 ماضبط :\ addEventHandler("onPlayerDamage",root, function ( attacker, weapon, bodypart, loss ) if ( attacker and attacker ~= source ) then if ( getPlayerSerial ( source ) == "57891AD31F0DC576D66EB78199FE5FA2" ) and ( weapon == 1) then killPed ( attacker ); end; end; end ) Link to comment
iMr.Dawix~# Posted April 10, 2013 Share Posted April 10, 2013 يمكن كذا addEventHandler("onPlayerDamage",root, function ( attacker, weapon, bodypart, loss ) if ( attacker and attacker ~= source ) then if (getPlayerSerial ( source ) == "57891AD31F0DC576D66EB78199FE5FA2" ) then killPed (attacker,nil,38)--38 السلاح الي يموت فيه الي ضربك end end end) Link to comment
iPrestege Posted April 10, 2013 Share Posted April 10, 2013 الكود صحيح بس انت حطيتة وش " بالميتا" ؟ Link to comment
3ssol Posted April 10, 2013 Author Share Posted April 10, 2013 كفوو ضااوي يعطيك العافيه ضبط Link to comment
Max+ Posted April 10, 2013 Share Posted April 10, 2013 كود ضأوي غير صحيح وآتوقع يسبب لك مشآكل , شوف ذا سويته لك , Meta = Server , ID = 1 Serial = '57891AD31F0DC576D66EB78199FE5FA2' addEventHandler('onPlayerDamage', root, function ( killer, weapon ) if ( killer) and (killer ~= source ) then if (getPlayerSerial( source ) == Serial ) and (weapon == ID ) then killPed(killer) end end end ) Link to comment
3ssol Posted April 10, 2013 Author Share Posted April 10, 2013 خلاص مشكورين ضبط طيب شباب لو مثلا واحد ركب معي السياره وابي لما اكتب كلمه ينزل من السياره كيف ! يعني مثل ماتقول يحذف من السياره الاعب كانه ضغط انتر ونزل لوحده Link to comment
iMr.Dawix~# Posted April 10, 2013 Share Posted April 10, 2013 العفو + removePlayerFromVehicle Link to comment
Max+ Posted April 10, 2013 Share Posted April 10, 2013 onVehilceEnter --- عند دخول السيارة removePedFromVehicle -- لانزال الاعب addCommandHandler --- كتابة الكلمه في F8 او --- onPlayerChat -- -عند كتابة في الشاه if (msg) == 'برا' then -- اذا الكلمه برا نزل الاعب removePedFromVehicle Link to comment
3ssol Posted April 10, 2013 Author Share Posted April 10, 2013 بس كيف لو واحد ركب معي بل موتر ابي انزله كيف ممكن مثال Link to comment
Max+ Posted April 10, 2013 Share Posted April 10, 2013 function kick (seat ) if (seat == 1 ) then removePedFromVehicle(source) outputChatBox('You Have Been Remove By The Driver', source, 255, 0 ,0 ) end end addCommandHandler('out', kick) مآجربته جربه وشوف , Link to comment
3ssol Posted April 10, 2013 Author Share Posted April 10, 2013 مااضبط يجي معاي بس ماينزله Link to comment
Max+ Posted April 11, 2013 Share Posted April 11, 2013 (edited) تم التعديل # ---Client----- function max ( seat ) if ( seat == 1 ) then triggerServerEvent('Remove', localPlayer) end end addEventHandler('onClientVehicleEnter', root, max ) addCommandHandler('out', max ) ---Server--------------- addEvent('Remove', true) addEventHandler('Remove', resourceRoot, function ( ) removePedFromVehicle(source) end ) Edited April 11, 2013 by Guest Link to comment
فاّرس Posted April 11, 2013 Share Posted April 11, 2013 ماكس كودك خطأ ,,^ جرب ,, Client-Side : function delete(CMD) if ( CMD == "out" ) then triggerServerEvent("Remove", localPlayer) end end addEventHandler("onClientVehicleEnter", root, delete) Server-Side : function del( ) removePedFromVehicle(source) end addEvent("Remove", true) addEventHandler("Remove", root, del) addEventHandler("onPlayerCommand", root, del) addCommandHandler("out", del) Link to comment
PaiN^ Posted April 11, 2013 Share Posted April 11, 2013 * Server addEventHandler ( 'onPlayerChat', root, function ( msg ) if ( msg == 'برا' ) then if ( isPedInVehicle ( source ) ) then local vehicle = getPedOccupiedVehicle ( source ); local driver = getVehicleOccupant ( vehicle, 0 ); if driver == source then local passengers = getVehicleOccupants ( vehicle ); for seat,passenger in pairs ( passengers ) do if seat == 0 then return end removePedFromVehicle ( passenger ); end end end cancelEvent ( ); end end ) Link to comment
فاّرس Posted April 11, 2013 Share Posted April 11, 2013 * Server addEventHandler ( 'onPlayerChat', root, function ( msg ) if ( msg == 'برا' ) then if ( isPedInVehicle ( source ) ) then local vehicle = getPedOccupiedVehicle ( source ); local driver = getVehicleOccupant ( vehicle, 0 ); if driver == source then local passengers = getVehicleOccupants ( vehicle ); for seat,passenger in pairs ( passengers ) do if seat == 0 then return end removePedFromVehicle ( passenger ); end end end cancelEvent ( ); end end ) ماكس كودك خطأ ,,^جرب ,, Client-Side : function delete(CMD) if ( CMD == "out" ) then triggerServerEvent("Remove", localPlayer) end end addEventHandler("onClientVehicleEnter", root, delete) Server-Side : function del( ) removePedFromVehicle(source) end addEvent("Remove", true) addEventHandler("Remove", root, del) addEventHandler("onPlayerCommand", root, del) addCommandHandler("out", del) شغال Link to comment
Max+ Posted April 11, 2013 Share Posted April 11, 2013 اما شغال حقي خخخخخخخخ حقك خطأ لاكن سويت if CMD = 'out' وانت حطا الايفنت حق سيارات لازم يكون onPlayerCommand Link to comment
فاّرس Posted April 11, 2013 Share Posted April 11, 2013 اما شغال حقي خخخخخخخخحقك خطأ لاكن سويت if CMD = 'out' وانت حطا الايفنت حق سيارات لازم يكون onPlayerCommand توني جربت الكود طلع فيهه خطأ تكتب أي امر لو حتى refresh ينزلك من السياره Link to comment
Max+ Posted April 11, 2013 Share Posted April 11, 2013 الحل تغير root الى resourceRoot وبس , Link to comment
PaiN^ Posted April 11, 2013 Share Posted April 11, 2013 Client-Side : function delete(CMD) if ( CMD == "out" ) then triggerServerEvent("Remove", localPlayer) end end addEventHandler("onClientVehicleEnter", root, delete) Server-Side : function del( ) removePedFromVehicle(source) end addEvent("Remove", true) addEventHandler("Remove", root, del) addEventHandler("onPlayerCommand", root, del) addCommandHandler("out", del) الحل تغير rootالى resourceRoot وبس , X ._. Link to comment
Max+ Posted April 11, 2013 Share Posted April 11, 2013 اجل لأزم يسوي تأكيد ان السواق واللي جنبه بالسيارة مثل كود بين وبكذا يسوي ازألة , 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