ALw7sH Posted January 28, 2013 Share Posted January 28, 2013 السسلام عليككم ورحمةة الله وبركاته ابي كود ماركر يفتح نافذة لتيم معين وكود اذا ظغطت على الزر تجيك سياره وكود اذا مت تروح السياره وبس Link to comment
jafar Posted January 28, 2013 Share Posted January 28, 2013 اذا ضغطت على زر تجي سيارة كلنت addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == اسم الزر ) then triggerServerEvent("car",getLocalPlayer()) end end ) سيرفر vehicle = {} addEvent("car", true) addEventHandler("car", root, function() if (getPlayerMoney (source) >= 0) then takePlayerMoney(source, 0) if isElement(vehicle[source]) then destroyElement(vehicle[source]) end local x, y, z = getElementPosition(source) vehicle[source] = createVehicle(id , x, y, z) warpPedIntoVehicle(source, vehicle[source]) end end ) Link to comment
iPrestege Posted January 28, 2013 Share Posted January 28, 2013 createMarker getPlayerTeam getTeamName guiSetVisible guiGetVisible getElementPosition createVehicle isElement destroyElement "OnPlayerWasted" -- Event "OnClientMarkerHit" -- Event Link to comment
ALw7sH Posted January 28, 2013 Author Share Posted January 28, 2013 اذا ضغطت على زر تجي سيارة كلنت addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == اسم الزر ) then triggerServerEvent("car",getLocalPlayer()) end end ) سيرفر vehicle = {} addEvent("car", true) addEventHandler("car", root, function() if (getPlayerMoney (source) >= 0) then takePlayerMoney(source, 0) if isElement(vehicle[source]) then destroyElement(vehicle[source]) end local x, y, z = getElementPosition(source) vehicle[source] = createVehicle(id , x, y, z) warpPedIntoVehicle(source, vehicle[source]) end end ) اذا اظغط على الزر مايصير شي Link to comment
iPrestege Posted January 28, 2013 Share Posted January 28, 2013 اذا ضغطت على زر تجي سيارة كلنت addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == اسم الزر ) then triggerServerEvent("car",getLocalPlayer()) end end ) سيرفر vehicle = {} addEvent("car", true) addEventHandler("car", root, function() if (getPlayerMoney (source) >= 0) then takePlayerMoney(source, 0) if isElement(vehicle[source]) then destroyElement(vehicle[source]) end local x, y, z = getElementPosition(source) vehicle[source] = createVehicle(id , x, y, z) warpPedIntoVehicle(source, vehicle[source]) end end ) اذا اظغط على الزر مايصير شي كود خرابيص >< ديستوري للالمنت ؟ قبل مايسوي السيارهـ ؟ ذذ : بسوي لك الكود بسس بسيط ^^ وانت كمل التيمات ..الخ Client : function Car() if ( source == Button ) then triggerServerEvent("Car",localPlayer) end end addEventHandler( "onClientGUIClick", root, Car ) Server : addEvent( "Car", true) addEventHandler( "Car", root, function () x,y,z = getElementPosition ( source ) vehicle = createVehicle ( id, x, y, z ) warpPedIntoVehicle ( source, vehicle ) end ) Link to comment
hassan.k.s.a Posted January 28, 2013 Share Posted January 28, 2013 راح تتكرر السياره يمديك تخليه يقدر يطلع وحده فقط -- Server Side Veh = {} addEvent("Car",true) addEventHandler("caprs",root,function() if Veh[source] then if isElement(Veh[source]) then destroyElement(Veh[source]) end end local x,y,z = getElementPosition(source) Veh[source] = createVehicle(id,x,y,z) warpPedIntoVehicle(source,Veh[source]) end) Link to comment
jafar Posted January 28, 2013 Share Posted January 28, 2013 راح تتكرر السياره يمديك تخليه يقدر يطلع وحده فقط-- Server Side Veh = {} addEvent("Car",true) addEventHandler("caprs",root,function() if Veh[source] then if isElement(Veh[source]) then destroyElement(Veh[source]) end end local x,y,z = getElementPosition(source) Veh[source] = createVehicle(id,x,y,z) warpPedIntoVehicle(source,Veh[source]) end) caprs + الكود حقي شغال Link to comment
jafar Posted January 28, 2013 Share Posted January 28, 2013 راح تتكرر السياره يمديك تخليه يقدر يطلع وحده فقط-- Server Side Veh = {} addEvent("Car",true) addEventHandler("Car",root,function() if Veh[source] then if isElement(Veh[source]) then destroyElement(Veh[source]) end end local x,y,z = getElementPosition(source) Veh[source] = createVehicle(id,x,y,z) warpPedIntoVehicle(source,Veh[source]) end) كذا صح Link to comment
hassan.k.s.a Posted January 29, 2013 Share Posted January 29, 2013 الكود حقك شغال لاكن وش دخل الفلوس بالموضوع ! هذا يدل على انه الكود مو حقك زآرفه, وبعدين ترا خطأي نصي كلمة وحدة Link to comment
===|OSAMA|=== Posted January 29, 2013 Share Posted January 29, 2013 طلبكـ الأول , فتح النافذة لتيم معين عند لمس المآركر , -- Client Side ! VisibleM = createMarker ( x, y, z, "cylinder", size, r, g, b, alpha ) addEventHandler ( "onClientMarkerHit", VisibleM, function ( hitPlayer ) if getElementType ( hitPlayer ) == "player" and getPlayerTeam ( hitPlayer ) and getPlayerTeam ( hitPlayer ) == getTeamFromName ( "NameTeam" ) then guiSetVisible ( Wnd, true ) showCursor ( true ) else outputChatBox ( "* You must be in 'Name Team' !", 210, 0, 0, true ) end end ) addEventHandler ( "onClientMarkerLeave", VisibleM, function ( leavePlayer ) if getElementType ( leavePlayer ) == "player" then guiSetVisible ( Wnd, false ) showCursor ( false ) end end ) الإستبدآل , السطر الأول : x, y, z = الإحداثيات size = الحجم حق الدائرة r, g, b = (0-255) الألوان تقدر تحط كل واحده منها بين ^ 255, 120, 0 : مثآل alpha = (0-255) الشفافية : يعني مدى وضوح الدائرة وتقدر تحطه بين السطر الخامس : NameTeam = اسم التيم الي تبي النافذة تفتح له فقط ! السطر السادس : Wnd = اسم النافذة السطر التاسع : Name Team = اسم التيم , عشآن لما يكون اللاعب مهو بالتيم يجيه بالشات انه لازم يكون بالتيم المحدد ! السطر 17 : Wnd = اسم النافذة =========================== طلبكـ الثآني , إذا ضغطت على الزر تجيكـ سيآرة -- Client Side ! addEventHandler( "onClientGUIClick", اسم الزر, function ( ) triggerServerEvent ( "CreateVehicle", localPlayer ) end ) -- ServerSide ! Vehicles = {} addEvent ( "CreateVehicle", true ) addEventHandler ( "CreateVehicle", root, function ( ) if Vehicles[source] then destroyElement( Vehicles[source] ) end local x,y,z = getElementPosition( source ) Vehicles[source] = createVehicle ( ID, x, y, z ) if Vehicles[source] then warpPedIntoVehicle( source, Vehicles[source] ) end end ) ^ الإستبدال في السطر التاسع فقط , ID = رقم السيارة , واذا تبي تعرف ارقام السيارات + انواعها ادخل هنا : https://wiki.multitheftauto.com/wiki/Vehicle_IDs =========================== طلبكـ الثآلث والأخير , لما يموت اللاعب تنسحب السيآرة منه ! -- Server Side ! addEventHandler( "onPlayerWasted", root, function( ) if Vehicles[source] then destroyElement( Vehicles[source] ) end end ) Link to comment
hassan.k.s.a Posted January 29, 2013 Share Posted January 29, 2013 بالنسبه لـ ذا addEventHandler( "onPlayerWasted", root, function( ) if Vehicles[source] then destroyElement( Vehicles[source] ) end end ) اذا تبيه مع كود السياره بس الصقه كذا اما اذا تبيه لحاله خليه كذا Vehicles = {} addEventHandler( "onPlayerWasted", root, function( ) if Vehicles[source] then destroyElement( Vehicles[source] ) end end ) Link to comment
jafar Posted January 29, 2013 Share Posted January 29, 2013 الكود حقك شغال لاكن وش دخل الفلوس بالموضوع ! هذا يدل على انه الكود مو حقك زآرفه, وبعدين ترا خطأي نصي كلمة وحدة هذا حاطه بشوب ونسيت ماحذفته "-_- Link to comment
===|OSAMA|=== Posted January 29, 2013 Share Posted January 29, 2013 بالنسبه لـ ذا addEventHandler( "onPlayerWasted", root, function( ) if Vehicles[source] then destroyElement( Vehicles[source] ) end end ) اذا تبيه مع كود السياره بس الصقه كذا اما اذا تبيه لحاله خليه كذا Vehicles = {} addEventHandler( "onPlayerWasted", root, function( ) if Vehicles[source] then destroyElement( Vehicles[source] ) end end ) ^ أقول لا تعفس بالأكواد بس , افهم طلباته ثم تعال -_-" Link to comment
jafar Posted January 29, 2013 Share Posted January 29, 2013 بالنسبه لـ ذا addEventHandler( "onPlayerWasted", root, function( ) if Vehicles[source] then destroyElement( Vehicles[source] ) end end ) اذا تبيه مع كود السياره بس الصقه كذا اما اذا تبيه لحاله خليه كذا Vehicles = {} addEventHandler( "onPlayerWasted", root, function( ) if Vehicles[source] then destroyElement( Vehicles[source] ) end end ) ^ أقول لا تعفس بالأكواد بس , افهم طلباته ثم تعال -_-" Link to comment
hassan.k.s.a Posted January 29, 2013 Share Posted January 29, 2013 انت مبدع بصراحه addEventHandler( "onPlayerWasted", root, function( ) if Vehicles[source] then destroyElement( Vehicles[source] ) end end ) لو حط ذا بملف لحاله بدون اضافه بيشتغل يعني؟ Link to comment
===|OSAMA|=== Posted January 29, 2013 Share Posted January 29, 2013 انت مبدع بصراحه addEventHandler( "onPlayerWasted", root, function( ) if Vehicles[source] then destroyElement( Vehicles[source] ) end end ) لو حط ذا بملف لحاله بدون اضافه بيشتغل يعني؟ أنت أهبل ولا تستهبل ؟ ^ الرجال يبي الكود ذا ليه ؟ عشان يسحب السيارات الي تجيه من الزر لما يموت اكيد بيحطه بنفس الملف حق السيرفر خخخخخخخ اقول مَ عليكـ منه بس , لو واجه مشكلة يجي يقولها لا تسوي فيها مخ بس خخخخخخخ Link to comment
hassan.k.s.a Posted January 29, 2013 Share Posted January 29, 2013 لأوالله مو أكيد من تكون انت ماضل شخص ماعرفت الي في عقله ! عالم الغيب ؟ Link to comment
===|OSAMA|=== Posted January 29, 2013 Share Posted January 29, 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