Jump to content

عند موت الاعب


Recommended Posts

Vehicle = { 
    { 411, 3407.04663,-1669.24365,1.16875 }, 
    { 411, x,y,z } 
    { 411, x,y,z } 
} 
  
randomPoint = math.random ( #Vehicle ) 
createVehicle ( player, Vehicle [ randomPoint ] [ 1 ], Vehicle [ randomPoint ] [ 2 ], Vehicle [ randomPoint ] [ 3 ] ) 

كذا

عاد مالنا خبرة بالجداول <@>

Link to comment
Vehicle = { 
    [1] = { 411, 3407.04663,-1669.24365,1.16875 }, 
    [2] =  { 411, x,y,z } 
    [3] =    { 411, x,y,z } 
} 
  
-- ضيف ذولا في الوظيفة 
local randomPoint  = unpack(Vehicle [math.random(#Vehicle )]) 
createVehicle ( player, randomPoint ) 

Edited by Guest
Link to comment

Vehicle = { 
   [1] = { 411, 3407.04663,-1669.24365,1.16875 }, 
   [2] = { 411, x,y,z }, 
   [3] = { 411, x,y,z } 
} 
  
local x,y,z  = unpack(Vehicle [math.random(#Vehicle )]) 
createVehicle ( player, x,y,z ) 

لازم تكون مع الوظيفه ذذ

+ تأكد player ان

معرف ذذ

Edited by Guest
Link to comment

..حطيتهم في وظيفةة زي كذا

Vehicle = { 
    { 411, 3407.04663,-1669.24365,1.16875 }, 
    { 411, 3467.51880,-1603.63354,5.21031 } 
    { 411, 3398.52002,-1521.58838,3.23339} 
} 
  
  
  
  
vehicle = {} 
  
addEventHandler ( "onPlayerSpawn", root, 
    function ( ) 
        if ( getPlayerTeam ( source ) ) then 
            if ( isElement ( vehicle[source] )) then 
                destroyElement ( vehicle[source] ) 
                vehicle[source] = nil 
            end 
            vehicle[source] = createVehicle ( 411, x,y,z ) 
            warpPedIntoVehicle ( source, vehicle[source] ) 
local randomPoint  = unpack(Vehicle [math.random(#Vehicle )]) 
createVehicle ( player, randomPoint ) 
        end 
    end 
) 
  
addEvent ( "car", true) 
addEventHandler ( "car", root, 
    function ( ) 
            if ( isElement ( vehicle[source] ) ) then 
                destroyElement ( vehicle[source] ) 
                vehicle[source] = nil 
            end 
            vehicle[source] = createVehicle( 411, x,y,z ) 
            warpPedIntoVehicle(source, vehicle[source]) 
local randomPoint  = unpack(Vehicle [math.random(#Vehicle )]) 
createVehicle ( player, randomPoint ) 
    end 
) 

بسس ما نفع

Link to comment
Vehicle = { 
   [1] = { 411, 3407.04663,-1669.24365,1.16875 }, 
   [2] = { 411, x,y,z }, 
   [3] = { 411, x,y,z } 
} 
  
local x,y,z  = unpack(Vehicle [math.random(#Vehicle )]) 
createVehicle ( player, x,y,z ) 

لازم تكون مع الوظيفه ذذ

+ تأكد player ان

معرف ذذ

ي ذي بست ,

الكود يجيب كل القيم مايحتاج تسوي

x,y,z

+

صاحب الموضوع شوف ردي عدلته

Link to comment
والله مدري وش اقول

الكود صارحة ابداع

ما اقول غير الله يسامح الي مدلعكم و يعطيك جاهز :|

انا سويت الجدول وهم صلحونهه ؟

وين الجاهز ع الاقل حاولت ><

Link to comment

جرب :

vehicle = { 
    { 411, 3407.04663,-1669.24365,1.16875 }, 
    { 411, 3467.51880,-1603.63354,5.21031 } 
    { 411, 3398.52002,-1521.58838,3.23339} 
}; 
vehicles = {}; 
  
addEventHandler( "onPlayerSpawn", root, 
    function ( ) 
        if getPlayerTeam( source ) then 
            if isElement( vehicles[ source ] ) then 
                destroyElement( vehicles[ source ] ); 
                vehicles[ source ] = nil 
            end 
            local id, x, y, z = unpack( vehicle[ math.random( #vehicle ) ] ); 
            vehicles[ source ] = createVehicle( id, x, y, z ); 
            warpPedIntoVehicle( source, vehicles[ source ] ); 
        end 
    end 
); 
  
addEvent( "car", true ); 
addEventHandler( "car", root, 
    function ( ) 
        if isElement( vehicles[ source ] ) then 
            destroyElement( vehicles[ source ] ); 
            vehicles[ source ] = nil 
        end 
        local id, x, y, z = unpack( vehicle[ math.random( #vehicle ) ] ); 
        vehicles[source] = createVehicle( id, x, y, z ); 
        warpPedIntoVehicle( source, vehicles[ source ] ); 
    end 
); 

Link to comment
جرب :
vehicle = { 
    { 411, 3407.04663,-1669.24365,1.16875 }, 
    { 411, 3467.51880,-1603.63354,5.21031 } 
    { 411, 3398.52002,-1521.58838,3.23339} 
}; 
vehicles = {}; 
  
addEventHandler( "onPlayerSpawn", root, 
    function ( ) 
        if getPlayerTeam( source ) then 
            if isElement( vehicles[ source ] ) then 
                destroyElement( vehicles[ source ] ); 
                vehicles[ source ] = nil 
            end 
            local id, x, y, z = unpack( vehicle[ math.random( #vehicle ) ] ); 
            vehicles[ source ] = createVehicle( id, x, y, z ); 
            warpPedIntoVehicle( source, vehicles[ source ] ); 
        end 
    end 
); 
  
addEvent( "car", true ); 
addEventHandler( "car", root, 
    function ( ) 
        if isElement( vehicles[ source ] ) then 
            destroyElement( vehicles[ source ] ); 
            vehicles[ source ] = nil 
        end 
        local id, x, y, z = unpack( vehicle[ math.random( #vehicle ) ] ); 
        vehicles[source] = createVehicle( id, x, y, z ); 
        warpPedIntoVehicle( source, vehicles[ source ] ); 
    end 
); 

:roll: ..ضبط يعطيكك الف عافيةة ي بين

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...