CRoW,,# Posted July 19, 2013 Author Share Posted July 19, 2013 يعني تبي اذا اللاعب مات يسوي له سباون عشوائي ؟ولا؟ ايه Link to comment
CRoW,,# Posted July 19, 2013 Author Share Posted July 19, 2013 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
jafar Posted July 19, 2013 Share Posted July 19, 2013 (edited) 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 July 20, 2013 by Guest Link to comment
فاّرس Posted July 19, 2013 Share Posted July 19, 2013 (edited) 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 July 20, 2013 by Guest Link to comment
CRoW,,# Posted July 20, 2013 Author Share Posted July 20, 2013 ..حطيتهم في وظيفةة زي كذا 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
./BlackBird# Posted July 20, 2013 Share Posted July 20, 2013 والله مدري وش اقول الكود صارحة ابداع ما اقول غير الله يسامح الي مدلعكم و يعطيك جاهز Link to comment
jafar Posted July 20, 2013 Share Posted July 20, 2013 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
فاّرس Posted July 20, 2013 Share Posted July 20, 2013 لا يحتاج لأن بيكون في 2 ارقومنت ناقصه , وراح يطلع خطأ بالديبوق ذذ Link to comment
CRoW,,# Posted July 20, 2013 Author Share Posted July 20, 2013 والله مدري وش اقول الكود صارحة ابداع ما اقول غير الله يسامح الي مدلعكم و يعطيك جاهز انا سويت الجدول وهم صلحونهه ؟ وين الجاهز ع الاقل حاولت >< Link to comment
PaiN^ Posted July 20, 2013 Share Posted July 20, 2013 جرب : 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
CRoW,,# Posted July 20, 2013 Author Share Posted July 20, 2013 جرب : 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
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