MR:SADIQ Posted May 1, 2013 Share Posted May 1, 2013 الموضوع باين من عنوانه ابي فكشنات اخد سيارة عند لمس الماركر Link to comment
iPrestege Posted May 1, 2013 Share Posted May 1, 2013 createMarker "onMarkerHit" getElementType createVehicle Link to comment
MR:SADIQ Posted May 1, 2013 Author Share Posted May 1, 2013 createMarker (246.7275390625,62.3232421875,1003.640625, "cylinder", 2,0, 0, 255,255) function "onMarkerHit" addEventHandler ( "onPlayerTarget", getRootElement(), onPlayerTarget ) createVehicle ( 432, x, y, z + 10 ) Link to comment
iPrestege Posted May 1, 2013 Share Posted May 1, 2013 vehicle = {} local marker = createMarker (246.7275390625,62.3232421875,1003.640625, "cylinder", 2,0, 0, 255,255) addEventHandler("onMarkerHit",marker, function ( player ) if ( getElementType ( player ) == ( "player" ) ) then if ( vehicle[player] and isElement ( vehicle[player] ) ) then destroyElement ( vehicle[player] ) end vehicle[player] = createVehicle ( id , x , y , z ) end end ) لم يتم التجربة سيرفر ! بدل : id = موديل السيارهـ ! x,y,z = احداثيات الانشاء ! Link to comment
فاّرس Posted May 1, 2013 Share Posted May 1, 2013 (edited) ما يحتاج تشقلب له , سو له الكود حقه وخلآص, Marker = createMarker (246.7275390625,62.3232421875,1003.640625, "cylinder", 2,0, 0, 255,255) addEventHandler("onMarkerHit",Marker, function(player) if (getElementType(player) == 'player' ) then createVehicle ( ID, x, y, z ) end end) Edited May 1, 2013 by Guest Link to comment
-MF[7]6 Posted February 6, 2014 Share Posted February 6, 2014 ما يحتاج تشقلب له , سو له الكود حقه وخلآص, Marker = createMarker (246.7275390625,62.3232421875,1003.640625, "cylinder", 2,0, 0, 255,255) addEventHandler("onMarkerHit",Marker, function(player) if (getElementType(player) == 'player' ) then createVehicle ( ID, x, y, z ) end end) هذا شسمه يحط موتر بس لكن اللاعب ما يدخل الموتر $ Link to comment
al-Kobra Posted February 6, 2014 Share Posted February 6, 2014 ما يحتاج تشقلب له , سو له الكود حقه وخلآص, Marker = createMarker (246.7275390625,62.3232421875,1003.640625, "cylinder", 2,0, 0, 255,255) addEventHandler("onMarkerHit",Marker, function(player) if (getElementType(player) == 'player' ) then createVehicle ( ID, x, y, z ) end end) هذا شسمه يحط موتر بس لكن اللاعب ما يدخل الموتر $ Postby The Best on Wed May 01, 2013 2:25 pm ,, Link to comment
فاّرس Posted February 6, 2014 Share Posted February 6, 2014 by MR:SADIQ on Wed May 01, 2013 2:39 pm والكود بيطلع اخطاء لأن مافي جدول ! warpPedIntoVehicle -- سويه مع كود برستيج Link to comment
Do_De<3 Posted February 6, 2014 Share Posted February 6, 2014 Marker = createMarker (246.7275390625,62.3232421875,1003.640625, "cylinder", 2,0, 0, 255,255) addEventHandler("onMarkerHit",Marker, function() if( isElement ( enksar ) ) then local x, y, z = getElementPosition ( source ) local enksar = createVehicle( 411, x, y, z) warpPedIntoVehicle ( source, enksar ) end end) مآجربته Link to comment
#DRAGON!FIRE Posted February 6, 2014 Share Posted February 6, 2014 Marker = createMarker (246.7275390625,62.3232421875,1003.640625, "cylinder", 2,0, 0, 255,255) addEventHandler("onMarkerHit",Marker, function() if( isElement ( enksar ) ) then local x, y, z = getElementPosition ( source ) local enksar = createVehicle( 411, x, y, z) warpPedIntoVehicle ( source, enksar ) end end) مآجربته X Link to comment
Do_De<3 Posted February 6, 2014 Share Posted February 6, 2014 Vehicles = {} VehicleM = createMarker ( 2681.791015625,-2325.9450683594, 3.0178125, "cylinder", 2, 0, 0, 0, 0 ) addEventHandler( "onMarkerHit", root, function ( hitElement ) if source == VehicleM and getElementType( hitElement ) == "player" then if Vehicles[hitElement] and getElementType( Vehicles[hitElement] ) == "vehicle" then destroyElement( Vehicles[hitElement] ) end local x,y,z = getElementPosition( hitElement ) Vehicles[hitElement] = createVehicle ( 474, 730.21240234375, -2570.2185058594, 3.0261313915253 ) if Vehicles[hitElement] then warpPedIntoVehicle( hitElement, Vehicles[hitElement] ) end elseif source == ColorM and getElementType( hitElement) == "player" and isPedInVehicle( hitElement ) then local player = getPedOccupiedVehicle( hitElement ) setVehicleColor( player, math.random(255), math.random(255), math.random(255) ) outputChatBox( "", hitElement, 0, 255, 0, true ) end end ) addEventHandler( "onVehicleExplode", root, function( ) setTimer( destroyElement, 2000, 1, source ) end ) addEventHandler( "onPlayerQuit", root, function( ) if Vehicles[source] then destroyElement( Vehicles[source] ) end end ) جرب : ) Link to comment
#DRAGON!FIRE Posted February 6, 2014 Share Posted February 6, 2014 Vehicles = {} VehicleM = createMarker ( 2681.791015625,-2325.9450683594, 3.0178125, "cylinder", 2, 0, 0, 0, 0 ) addEventHandler( "onMarkerHit", root, function ( hitElement ) if source == VehicleM and getElementType( hitElement ) == "player" then if Vehicles[hitElement] and getElementType( Vehicles[hitElement] ) == "vehicle" then destroyElement( Vehicles[hitElement] ) end local x,y,z = getElementPosition( hitElement ) Vehicles[hitElement] = createVehicle ( 474, 730.21240234375, -2570.2185058594, 3.0261313915253 ) if Vehicles[hitElement] then warpPedIntoVehicle( hitElement, Vehicles[hitElement] ) end elseif source == ColorM and getElementType( hitElement) == "player" and isPedInVehicle( hitElement ) then local player = getPedOccupiedVehicle( hitElement ) setVehicleColor( player, math.random(255), math.random(255), math.random(255) ) outputChatBox( "", hitElement, 0, 255, 0, true ) end end ) addEventHandler( "onVehicleExplode", root, function( ) setTimer( destroyElement, 2000, 1, source ) end ) addEventHandler( "onPlayerQuit", root, function( ) if Vehicles[source] then destroyElement( Vehicles[source] ) end end ) جرب : ) هريسة .. ! Link to comment
™!>VàLéNTiNô<!™ Posted February 12, 2014 Share Posted February 12, 2014 (edited) Vehicles = {} VehicleM = createMarker (احداثيات, "cylinder", 3, 255, 0, 0, 255 ) addEventHandler( "onMarkerHit", root, function ( hitElement ) if source == VehicleM and getElementType( hitElement ) == "player" then if Vehicles[hitElement] and getElementType( Vehicles[hitElement] ) == "vehicle" then destroyElement( Vehicles[hitElement] ) end local x,y,z = getElementPosition( hitElement ) Vehicles[hitElement] = createVehicle ( رقم السيارة, x, y, z ) if Vehicles[hitElement] then warpPedIntoVehicle( hitElement, Vehicles[hitElement] ) outputChatBox( "الكلام الذي يطلع بالشات بعذ اخذ الموتر", hitElement, 255, 0, 0, true ) end addEventHandler( "onVehicleExplode", root, function( ) setTimer( destroyElement, 2000, 1, source ) end ) addEventHandler( "onPlayerQuit", root, function( ) if Vehicles[source] then destroyElement( Vehicles[source] ) end end ) Edited February 20, 2014 by Guest Link to comment
™!>VàLéNTiNô<!™ Posted February 12, 2014 Share Posted February 12, 2014 Vehicles = {} VehicleM = createMarker (احداثيات, "cylinder", 3, 255, 0, 0, 255 ) addEventHandler( "onMarkerHit", root, function ( hitElement ) if source == VehicleM and getElementType( hitElement ) == "player" then if Vehicles[hitElement] and getElementType( Vehicles[hitElement] ) == "vehicle" then destroyElement( Vehicles[hitElement] ) end local x,y,z = getElementPosition( hitElement ) Vehicles[hitElement] = createVehicle ( رقم السيارة, x, y, z ) if Vehicles[hitElement] then warpPedIntoVehicle( hitElement, Vehicles[hitElement] ) outputChatBox( "الكلام الذي يطلع بالشات بعذ اخذ الموتر", hitElement, 255, 0, 0, true ) end addEventHandler( "onVehicleExplode", root, function( ) setTimer( destroyElement, 2000, 1, source ) end ) addEventHandler( "onPlayerQuit", root, function( ) if Vehicles[source] then destroyElement( Vehicles[source] ) end end ) Link to comment
™!>VàLéNTiNô<!™ Posted February 12, 2014 Share Posted February 12, 2014 Vehicles = {} VehicleM = createMarker (احداثيات, "cylinder", 3, 255, 0, 0, 255 ) addEventHandler( "onMarkerHit", root, function ( hitElement ) if source == VehicleM and getElementType( hitElement ) == "player" then if Vehicles[hitElement] and getElementType( Vehicles[hitElement] ) == "vehicle" then destroyElement( Vehicles[hitElement] ) end local x,y,z = getElementPosition( hitElement ) Vehicles[hitElement] = createVehicle ( رقم السيارة, x, y, z ) if Vehicles[hitElement] then warpPedIntoVehicle( hitElement, Vehicles[hitElement] ) outputChatBox( "الكلام الذي يطلع بالشات بعذ اخذ الموتر", hitElement, 255, 0, 0, true ) end addEventHandler( "onVehicleExplode", root, function( ) setTimer( destroyElement, 2000, 1, source ) end ) addEventHandler( "onPlayerQuit", root, function( ) if Vehicles[source] then destroyElement( Vehicles[source] ) end 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