Jump to content

تكرار السياره


Recommended Posts

  
local marker1 = createMarker (100.80000305176 , 1787.5999755859 , 31.5, "cylinder", 3, 244, 54, 10, 255 ) 
  
addEventHandler( "onMarkerHit", marker1,  
  
function ( player ) 
 local PlayerTeam = getPlayerTeam ( player ) 
 local TheTeam = getTeamFromName ( "MSHOOSH" ) 
if PlayerTeam == TheTeam then 
if not isPedInVehicle(player) then 
        x,y,z = getElementPosition( player ) 
        veh1 = createVehicle ( 487, x, y, z ) 
                setVehicleColor ( veh1 , 57, 57, 57, 57 ) 
        warpPedIntoVehicle(player,veh1) 
end 
end 
end 
) 

السلام عليكم و رحمه الله و بركاته

هذا كود اذا دخلت ماركر يعطيك سيارة

ابي ما يكرر , يعني اذا اخذ سيارة قبل تختفي و تجيه السياره الجديده

اتمنى فهمتوني :roll:

Link to comment

ما جربته,,

local marker1 = createMarker (100.80000305176 , 1787.5999755859 , 31.5, "cylinder", 3, 244, 54, 10, 255 )  
addEventHandler( "onMarkerHit", marker1, 
function ( player ) 
 local PlayerTeam = getPlayerTeam ( player ) 
 local TheTeam = getTeamFromName ( "MSHOOSH" ) 
if PlayerTeam == TheTeam then 
if not isPedInVehicle(player) then 
if isElement(veh1) then destroyElement(veh1) veh1 = nil end 
        x,y,z = getElementPosition( player ) 
        veh1 = createVehicle ( 487, x, y, z ) 
                setVehicleColor ( veh1 , 57, 57, 57, 57 ) 
        warpPedIntoVehicle(player,veh1) 
        end 
    end 
end) 
Link to comment
local marker1 = createMarker (100.80000305176 , 1787.5999755859 , 31.5, "cylinder", 3, 244, 54, 10, 255 ) 
  
addEventHandler( "onMarkerHit", marker1, 
  
function ( player ) 
 local PlayerTeam = getPlayerTeam ( player ) 
 local TheTeam = getTeamFromName ( "MSHOOSH" ) 
if PlayerTeam == TheTeam then 
if not isPedInVehicle(player) then 
        x,y,z = getElementPosition( player ) 
          [ Vehicle ] =  
          ( 487, x, y, z ) 
          ( 487, x, y, z ) 
          ( 487, x, y, z ) 
          ( 487, x, y, z ) 
            
                setVehicleColor ( Vehicle , 57, 57, 57, 57 ) 
        warpPedIntoVehicle(player,Vehicle) 
end 
  
end 

يمكن جربه لم تتم التجربة

او

سوي جدوال

100%

خطا

ما جربته,,

local marker1 = createMarker (100.80000305176 , 1787.5999755859 , 31.5, "cylinder", 3, 244, 54, 10, 255 )  
addEventHandler( "onMarkerHit", marker1, 
function ( player ) 
 local PlayerTeam = getPlayerTeam ( player ) 
 local TheTeam = getTeamFromName ( "MSHOOSH" ) 
if PlayerTeam == TheTeam then 
if not isPedInVehicle(player) then 
if isElement(veh1) then destroyElement(veh1) veh1 = nil end 
        x,y,z = getElementPosition( player ) 
        veh1 = createVehicle ( 487, x, y, z ) 
                setVehicleColor ( veh1 , 57, 57, 57, 57 ) 
        warpPedIntoVehicle(player,veh1) 
        end 
    end 
end) 

هذا يعطيك و يسحبه في نفس الوقت جربته قبل

Link to comment

local marker1 = createMarker (100.80000305176 , 1787.5999755859 , 31.5, "cylinder", 3, 244, 54, 10, 255 ) 
addEventHandler( "onMarkerHit", marker1, 
function ( player ) 
if getElementType(player) == 'player' then 
if ( getPlayerTeam ( player ) ) and ( getTeamName ( getPlayerTeam ( player ) ) == "MSHOSH" ) then 
if not isPedInVehicle(player) then 
        x,y,z = getElementPosition( player ) 
        veh1 = createVehicle ( 487, x, y, z ) 
        setVehicleColor ( veh1 , 57, 57, 57, 57 ) 
        warpPedIntoVehicle(player,veh1) 
        else 
       if isElement(veh1) then destroyElement(veh1) veh1 = nil end 
            end 
        end 
    end 
end,false) 
Link to comment
local marker1 = createMarker (100.80000305176 , 1787.5999755859 , 31.5, "cylinder", 3, 244, 54, 10, 255 ) 
addEventHandler( "onMarkerHit", marker1, 
function ( player ) 
if getElementType(player) == 'player' then 
if ( getPlayerTeam ( player ) ) and ( getTeamName ( getPlayerTeam ( player ) ) == "MSHOSH" ) then 
if not isPedInVehicle(player) then 
        x,y,z = getElementPosition( player ) 
        veh1 = createVehicle ( 487, x, y, z ) 
        setVehicleColor ( veh1 , 57, 57, 57, 57 ) 
        warpPedIntoVehicle(player,veh1) 
        else 
       if isElement(veh1) then destroyElement(veh1) veh1 = nil end 
            end 
        end 
    end 
end,false) 

خطأ

-- Server Side !! 
veh1 = {} 
local marker1 = createMarker (100.80000305176 , 1787.5999755859 , 31.5, "cylinder", 3, 244, 54, 10, 255 ) 
addEventHandler( "onMarkerHit", marker1, 
function ( player ) 
if getElementType(player) == 'player' then 
if ( getPlayerTeam ( player ) ) and ( getTeamName ( getPlayerTeam ( player ) ) == "MSHOSH" ) then 
if not isPedInVehicle(player) then 
if isElement(veh1[player]) then destroyElement(veh1[player]) end 
        x,y,z = getElementPosition( player ) 
        veh1[player] = createVehicle ( 487, x, y, z ) 
        setVehicleColor ( veh1[player] , 57, 57, 57, 57 ) 
        warpPedIntoVehicle(player,veh1[player]) 
            end 
        end 
    end 
end,false) 

Link to comment
local marker1 = createMarker (100.80000305176 , 1787.5999755859 , 31.5, "cylinder", 3, 244, 54, 10, 255 ) 
  
addEventHandler( "onMarkerHit", marker1, 
  
function ( player ) 
 local PlayerTeam = getPlayerTeam ( player ) 
 local TheTeam = getTeamFromName ( "MSHOOSH" ) 
if PlayerTeam == TheTeam then 
if not isPedInVehicle(player) then 
        x,y,z = getElementPosition( player ) 
          [ Vehicle ] =  
          ( 487, x, y, z ) 
          ( 487, x, y, z ) 
          ( 487, x, y, z ) 
          ( 487, x, y, z ) 
            
                setVehicleColor ( Vehicle , 57, 57, 57, 57 ) 
        warpPedIntoVehicle(player,Vehicle) 
end 
  
end 

يمكن جربه لم تتم التجربة

او

سوي جدوال

100%

خطا

ما جربته,,

local marker1 = createMarker (100.80000305176 , 1787.5999755859 , 31.5, "cylinder", 3, 244, 54, 10, 255 )  
addEventHandler( "onMarkerHit", marker1, 
function ( player ) 
 local PlayerTeam = getPlayerTeam ( player ) 
 local TheTeam = getTeamFromName ( "MSHOOSH" ) 
if PlayerTeam == TheTeam then 
if not isPedInVehicle(player) then 
if isElement(veh1) then destroyElement(veh1) veh1 = nil end 
        x,y,z = getElementPosition( player ) 
        veh1 = createVehicle ( 487, x, y, z ) 
                setVehicleColor ( veh1 , 57, 57, 57, 57 ) 
        warpPedIntoVehicle(player,veh1) 
        end 
    end 
end) 

هذا يعطيك و يسحبه في نفس الوقت جربته قبل

خطأ ذا يسحب اخر سيارة صارت

استخدم جدول

Link to comment
local marker1 = createMarker (100.80000305176 , 1787.5999755859 , 31.5, "cylinder", 3, 244, 54, 10, 255 ) 
addEventHandler( "onMarkerHit", marker1, 
function ( player ) 
if getElementType(player) == 'player' then 
if ( getPlayerTeam ( player ) ) and ( getTeamName ( getPlayerTeam ( player ) ) == "MSHOSH" ) then 
if not isPedInVehicle(player) then 
        x,y,z = getElementPosition( player ) 
        veh1 = createVehicle ( 487, x, y, z ) 
        setVehicleColor ( veh1 , 57, 57, 57, 57 ) 
        warpPedIntoVehicle(player,veh1) 
        else 
       if isElement(veh1) then destroyElement(veh1) veh1 = nil end 
            end 
        end 
    end 
end,false) 

يعطيك العافية كودك نفس كودي ذا

  
local marker1 = createMarker (100.80000305176 , 1787.5999755859 , 31.5, "cylinder", 3, 244, 54, 10, 255 ) 
  
addEventHandler( "onMarkerHit", marker1, 
  
function ( player ) 
 local PlayerTeam = getPlayerTeam ( player ) 
 local TheTeam = getTeamFromName ( "MSHOOSH" ) 
if PlayerTeam == TheTeam then 
if not isPedInVehicle(player) then 
        x,y,z = getElementPosition( player ) 
        veh1 = createVehicle ( 487, x, y, z ) 
                setVehicleColor ( veh1 , 57, 57, 57, 57 ) 
        warpPedIntoVehicle(player,veh1) 
end 
end 
end 
) 

يعطي بس ما يسحب المكرره

Link to comment
-- Server Side !! 
veh1 = {} 
local marker1 = createMarker (100.80000305176 , 1787.5999755859 , 31.5, "cylinder", 3, 244, 54, 10, 255 ) 
addEventHandler( "onMarkerHit", marker1, 
function ( player ) 
if getElementType(player) == 'player' then 
if ( getPlayerTeam ( player ) ) and ( getTeamName ( getPlayerTeam ( player ) ) == "MSHOSH" ) then 
if not isPedInVehicle(player) then 
if isElement(veh1[player]) then destroyElement(veh1[player]) end 
        x,y,z = getElementPosition( player ) 
        veh1[player] = createVehicle ( 487, x, y, z ) 
        setVehicleColor ( veh1[player] , 57, 57, 57, 57 ) 
        warpPedIntoVehicle(player,veh1[player]) 
            end 
        end 
    end 
end,false) 

Link to comment
^ جربه وتعال قول خطأ -_-

جربته يكرر ^^ ,,

لول ؟

والي يقولك انه جربه 3 مرات وشغال ؟

والى يقولك جربته ويكرر حتى صادني لاق :lol:

تسوي جدول افضل ذذ

Link to comment

^ شكل mta عندي مخبطه -_-

+ شوف ذآ عندي شغال ,

local marker1 = createMarker (100.80000305176 , 1787.5999755859 , 31.5, "cylinder", 3, 244, 54, 10, 255 ) 
addEventHandler( "onMarkerHit", marker1, 
function ( player ) 
if getElementType(player) == 'player' then 
if ( getPlayerTeam ( player ) ) and ( getTeamName ( getPlayerTeam ( player ) ) == "MSHOSH" ) then 
if not isPedInVehicle(player) then 
       if isElement(veh1) then destroyElement(veh1) veh1 = nil end 
        x,y,z = getElementPosition( player ) 
        veh1 = createVehicle ( 487, x, y, z ) 
        setVehicleColor ( veh1 , 57, 57, 57, 57 ) 
        warpPedIntoVehicle(player,veh1) 
            end 
        end 
    end 
end,false) 
Link to comment
local marker1 = createMarker (100.80000305176 , 1787.5999755859 , 31.5, "cylinder", 3, 244, 54, 10, 255 ) 
  
addEventHandler( "onMarkerHit", marker1, 
  
function ( player ) 
 local PlayerTeam = getPlayerTeam ( player ) 
 local TheTeam = getTeamFromName ( "MSHOOSH" ) 
if PlayerTeam == TheTeam then 
if not isPedInVehicle(player) then 
        x,y,z = getElementPosition( player ) 
          [ Vehicle ] =  
          ( 487, x, y, z ) 
          ( 487, x, y, z ) 
          ( 487, x, y, z ) 
          ( 487, x, y, z ) 
            
                setVehicleColor ( Vehicle , 57, 57, 57, 57 ) 
        warpPedIntoVehicle(player,Vehicle) 
end 
  
end 

يمكن جربه لم تتم التجربة

او

سوي جدوال

100%

خطا

ما جربته,,

local marker1 = createMarker (100.80000305176 , 1787.5999755859 , 31.5, "cylinder", 3, 244, 54, 10, 255 )  
addEventHandler( "onMarkerHit", marker1, 
function ( player ) 
 local PlayerTeam = getPlayerTeam ( player ) 
 local TheTeam = getTeamFromName ( "MSHOOSH" ) 
if PlayerTeam == TheTeam then 
if not isPedInVehicle(player) then 
if isElement(veh1) then destroyElement(veh1) veh1 = nil end 
        x,y,z = getElementPosition( player ) 
        veh1 = createVehicle ( 487, x, y, z ) 
                setVehicleColor ( veh1 , 57, 57, 57, 57 ) 
        warpPedIntoVehicle(player,veh1) 
        end 
    end 
end) 

هذا يعطيك و يسحبه في نفس الوقت جربته قبل

خطأ ذا يسحب اخر سيارة صارت

استخدم جدول

Link to comment
-- Server Side !! 
veh1 = {} 
local marker1 = createMarker (100.80000305176 , 1787.5999755859 , 31.5, "cylinder", 3, 244, 54, 10, 255 ) 
addEventHandler( "onMarkerHit", marker1, 
function ( player ) 
if getElementType(player) == 'player' then 
if ( getPlayerTeam ( player ) ) and ( getTeamName ( getPlayerTeam ( player ) ) == "MSHOSH" ) then 
if not isPedInVehicle(player) then 
if isElement(veh1[player]) then destroyElement(veh1[player]) end 
        x,y,z = getElementPosition( player ) 
        veh1[player] = createVehicle ( 487, x, y, z ) 
        setVehicleColor ( veh1[player] , 57, 57, 57, 57 ) 
        warpPedIntoVehicle(player,veh1[player]) 
            end 
        end 
    end 
end,false) 

شغال

شكرا جعفر

بيست

سعد

Link to comment
^ شكل mta عندي مخبطه -_-

+ شوف ذآ عندي شغال ,

local marker1 = createMarker (100.80000305176 , 1787.5999755859 , 31.5, "cylinder", 3, 244, 54, 10, 255 ) 
addEventHandler( "onMarkerHit", marker1, 
function ( player ) 
if getElementType(player) == 'player' then 
if ( getPlayerTeam ( player ) ) and ( getTeamName ( getPlayerTeam ( player ) ) == "MSHOSH" ) then 
if not isPedInVehicle(player) then 
       if isElement(veh1) then destroyElement(veh1) veh1 = nil end 
        x,y,z = getElementPosition( player ) 
        veh1 = createVehicle ( 487, x, y, z ) 
        setVehicleColor ( veh1 , 57, 57, 57, 57 ) 
        warpPedIntoVehicle(player,veh1) 
            end 
        end 
    end 
end,false) 

جعفر متأكد انت انه موب شغال ؟

باخي عندي شغال -_- ,

معقوله اللعبه خرفت ؟

Link to comment
جعفر متأكد انت انه موب شغال ؟

باخي عندي شغال -_- ,

معقوله اللعبه خرفت ؟

من الكل .. لأنه ذا بجانب سيرفر الكود veh1 أخوي كودكـ صح .. يسحب السيارة ، لكن كودكـ يسحب السيارة إلي متغيرها

عشان كذا أفضل شي إنكـ تستخدم الجداول ..

---

وبالنسبة لكود الأخ جعفر .. لو تضيف له كود عند إنفجار السيارة تنسحب + عند خروج اللاعب تنسحب السيارة الخاصة فيه يكون افضل .. عشان ما يسوي لاق كبير

addEventHandler ( "onPlayerQuit", root, 
    function ( ) 
        if ( isElement ( veh1 [ source] ) ) then 
            destroyElement ( veh1 [ source ] ) 
        end 
    end 
) 
  
addEventHandler ( "onVehicleExplode", root, 
    function ( ) 
        destroyElement ( source ) 
    end 
) 

Link to comment
من الكل .. لأنه ذا بجانب سيرفر الكود veh1 أخوي كودكـ صح .. يسحب السيارة ، لكن كودكـ يسحب السيارة إلي متغيرها

عشان كذا أفضل شي إنكـ تستخدم الجداول ..

---

وبالنسبة لكود الأخ جعفر .. لو تضيف له كود عند إنفجار السيارة تنسحب + عند خروج اللاعب تنسحب السيارة الخاصة فيه يكون افضل .. عشان ما يسوي لاق كبير

addEventHandler ( "onPlayerQuit", root, 
    function ( ) 
        if ( isElement ( veh1 [ source] ) ) then 
            destroyElement ( veh1 [ source ] ) 
        end 
    end 
) 
  
[b]addEventHandler ( "onVehicleExplode", root, 
    function ( ) 
        destroyElement ( source ) 
    end 
)[/b] 

source ?!

يعني يوم يكون معه اي سياره حتى موب من الجدول يحذفها !

=)

Link to comment
addEventHandler ( "onPlayerQuit", root, 
    function ( ) 
        if ( isElement ( veh1 [player] ) ) then 
            destroyElement ( veh1 [ player ] ) 
        end 
    end 
) 
  
addEventHandler ( "onVehicleExplode", root, 
    function ( ) 
        destroyElement ( player ) 
    end 
) 
  

كذا ؟

Link to comment
من الكل .. لأنه ذا بجانب سيرفر الكود veh1 أخوي كودكـ صح .. يسحب السيارة ، لكن كودكـ يسحب السيارة إلي متغيرها

عشان كذا أفضل شي إنكـ تستخدم الجداول ..

---

وبالنسبة لكود الأخ جعفر .. لو تضيف له كود عند إنفجار السيارة تنسحب + عند خروج اللاعب تنسحب السيارة الخاصة فيه يكون افضل .. عشان ما يسوي لاق كبير

addEventHandler ( "onPlayerQuit", root, 
    function ( ) 
        if ( isElement ( veh1 [ source] ) ) then 
            destroyElement ( veh1 [ source ] ) 
        end 
    end 
) 
  
[b]addEventHandler ( "onVehicleExplode", root, 
    function ( ) 
        destroyElement ( source ) 
    end 
)[/b] 

source ?!

يعني يوم يكون معه اي سياره حتى موب من الجدول يحذفها !

=)

ومن قال انه السيارات الي بالجدول بس ؟

الكود معناهـ عند إنفجار أي سيارة تنسحب .. عشان ما تسبب لاق للسيرفر < # >

سطر 11 ,

player < veh1 [ player ]

X

addEventHandler ( "onPlayerQuit", root, 
    function ( ) 
        if ( isElement ( veh1 [player] ) ) then 
            destroyElement ( veh1 [ player ] ) 
        end 
    end 
) 
  
addEventHandler ( "onVehicleExplode", root, 
    function ( ) 
        destroyElement ( player ) 
    end 
) 
  

كذا ؟

%خطأ ، خله مثل ما سويته لكـ أخوي .. صح 100 #

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...