Gomez10 Posted February 26, 2014 Posted February 26, 2014 سيرفر addEvent( "car", true ) addEventHandler( "car", root, local x, y, z = getElementPosition ( luckyBugger ) createVehicle ( 432, x, y, z + 10 ) outputChatBox ( "Car Spwan!", luckyBugger ) كلنت addEventHandler ( "onClientGUIClick", resourceRoot, function( ) if ( source == GUIEditor.button[1]) then triggerServerEvent ( "car", localPlayer ) end end ) createMarker(x,y,z ) addEventHandler(''onClientMarkerHit'',root, function () guiSetVisible(GUIEditor.button,true)
فاّرس Posted February 26, 2014 Posted February 26, 2014 -- Client Side # addEventHandler ( 'onClientGUIClick', resourceRoot, function( ) if ( source == GUIEditor.button[1]) then triggerServerEvent ( 'car', localPlayer ) end end ) local marker = createMarker(x,y,z ) addEventHandler('onClientMarkerHit',marker,function (plr) if plr == localPlayer then guiSetVisible(GUIEditor.button,true) end end ) -- Server Side # local vehicle = {} addEvent( 'car', true ) addEventHandler( 'car', root,function() local x, y, z = getElementPosition ( source ) if isElement(vehicle[source]) then destroyElement(vehicle[source]) vehicle[source] = nil end vehicle[source] = createVehicle ( 432, x, y, z + 10 ) outputChatBox ( "Car Spwan!", source) end )
Gomez10 Posted February 26, 2014 Author Posted February 26, 2014 ممكن تشرح لي اكواد الي سويتهم سطر سطر
K1NG Posted February 26, 2014 Posted February 26, 2014 -- Client Side # addEventHandler ( 'onClientGUIClick', resourceRoot, function( ) if ( source == GUIEditor.button[1]) then triggerServerEvent ( 'car', localPlayer ) end end ) local marker = createMarker(x,y,z ) addEventHandler('onClientMarkerHit',marker,function (plr) if plr == localPlayer then guiSetVisible(GUIEditor.button,true) end end ) -- Server Side # local vehicle = {} addEvent( 'car', true ) addEventHandler( 'car', root,function() local x, y, z = getElementPosition ( source ) if isElement(vehicle[source]) then destroyElement(vehicle[source]) vehicle[source] = nil end vehicle[source] = createVehicle ( 432, x, y, z + 10 ) outputChatBox ( "Car Spwan!", source) end ) عشان يوم يخرج اللاعب تسحب الموتر وتحذف اللاعب من الجدول onPlayerQuit فيه هنا ناقص عندكـ حدث ( عشان تسحب السيارة يوم تنفجر ( للتخفيف من اللاق أكبر قدر ممكن onVehicleExplode بالإضافة إلى حدث + . لإظهار مؤشر الفأرة عند دخول الماركر showCursor ناقص عندكـ وظيفة
Recommended Posts