Doffy Posted January 26, 2017 Share Posted January 26, 2017 ابي اول ما الواحد يضغط علي زر يرسبنله سيارة جانب اللاعب ايدي السيارة 411 Link to comment
Adham Posted January 26, 2017 Share Posted January 26, 2017 (edited) -- Client -- "onClientGUIClick" triggerServerEvent -- Server -- getElementPosition getPedRotation isElement destroyElement createVehicle Edited January 26, 2017 by Deativated Link to comment
Doffy Posted January 26, 2017 Author Share Posted January 26, 2017 2 minutes ago, Deativated said: -- Client -- "onClientGUIClick" triggerServerEvent -- Server -- getElementPosition getPedRotation isElement destroyElement createVehicle معليش اخوي بزعجك بس ممكن تسويه لي ؟ Link to comment
^iiEcoo'x_) Posted January 26, 2017 Share Posted January 26, 2017 2 minutes ago, Deativated said: -- Client -- "onClientGUIClick" triggerServerEvent -- Server -- getElementPosition getPedRotation isElement destroyElement createVehicle + table getPedOccupiedVehicle warpPedIntoVehicle Link to comment
Adham Posted January 26, 2017 Share Posted January 26, 2017 (edited) غير مجرب : -- Client -- addEventHandler ( 'onClientGUIClick', root, function ( ) if ( source == button ) then triggerServerEvent ( "onGiveCar", localPlayer ) end end ); -- Server -- Vehicle = {}, addEvent ( "onGiveCar", true ) addEventHandler ( "onGiveCar", root, function ( ) local x, y, z = getElementPosition ( source ) local _,_,r = getPedRotation ( source ) if isElement( nVehicle[source] ) then destroyElement( Vehicle[source] ) else Vehicle[source] = createVehicle ( ID, x, y, z+1, 0, 0,r) warpPedIntoVehicle ( source,Vehicle[source] ) end end ); Edited January 26, 2017 by Deativated Link to comment
#STZ Posted January 26, 2017 Share Posted January 26, 2017 forum.mtasa.com تفضل اخوي انا كنت مسوي موضوع من حوالي سنة لما كنت نوب برمجة Link to comment
Doffy Posted January 26, 2017 Author Share Posted January 26, 2017 5 minutes ago, Deativated said: غير مجرب : -- Client -- addEventHandler ( 'onClientGUIClick', root, function ( ) if ( source == button ) then triggerServerEvent ( "onGiveCar", localPlayer ) end end ); -- Server -- Vehicle = {}, addEvent ( "onGiveCar", true ) addEventHandler ( "onGiveCar", root, function ( ) local x, y, z = getElementPosition ( source ) local _,_,r = getPedRotation ( source ) if isElement( nVehicle[source] ) then destroyElement( Vehicle[source] ) else Vehicle[source] = createVehicle ( ID, x, y, z+1, 0, 0,r) warpPedIntoVehicle ( source,Vehicle[source] ) end end ); موب شغال يخوي Link to comment
Adham Posted January 26, 2017 Share Posted January 26, 2017 (edited) ورينا الدي بق ؟ جرب : Vehicle = {}, addEvent ( "onGiveCar", true ) addEventHandler ( "onGiveCar", root, function ( ) local x, y, z = getElementPosition ( source ) local _,_,r = getPedRotation ( source ) if isElement( Vehicle[source] ) then destroyElement( Vehicle[source] ) else Vehicle[source] = createVehicle ( ID, x, y, z+1, 0, 0,r) warpPedIntoVehicle ( source,Vehicle[source] ) end end ); لا تنسي اي دي السياره .! Edited January 26, 2017 by Deativated Link to comment
Doffy Posted January 26, 2017 Author Share Posted January 26, 2017 1 minute ago, Deativated said: ورينا الدي بق ؟ جرب : Vehicle = {}, addEvent ( "onGiveCar", true ) addEventHandler ( "onGiveCar", root, function ( ) local x, y, z = getElementPosition ( source ) local _,_,r = getPedRotation ( source ) if isElement( Vehicle[source] ) then destroyElement( Vehicle[source] ) else Vehicle[source] = createVehicle ( ID, x, y, z+1, 0, 0,r) warpPedIntoVehicle ( source,Vehicle[source] ) end end ); شكرا يخوي اشتغل Link to comment
Adham Posted January 26, 2017 Share Posted January 26, 2017 Just now, KinG_Himoo12 said: شكرا يخوي اشتغل حياك الله . 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