EH10 Posted March 13, 2014 Share Posted March 13, 2014 السلام عليكم طلب فنكشات لوحة فيها ايديت وفيها زر وفيها قريد ليست وزرين اظهار واخفاء عندما تكتب بالايديت رقم السياره تجي في القريد ليست وتقدر تظهرها وتخفيها على كيفك واذا خرجت من السيرفر ودخلت تختفي مثال اخر انا كتبت رقم السياره ضغطت زر اختيار وتجي السياره في القريد ليست واضغط على السياره واضغط اظهار واذا طفشت منها اقدر اظيف سياره ثانية Link to comment
#DRAGON!FIRE Posted March 14, 2014 Share Posted March 14, 2014 Event: "onClientGUIChanged" guiGetText tonumber string.len guiGridListAddRow guiGridListSetItemText Event: "onClientGUIClick" guiGridListGetSelectedItem guiGridListGetItemText table isElement destroyElement createVehicle warpPedIntoVehicle Event: "onPlayerQuit" isElement destroyElement Link to comment
EH10 Posted March 14, 2014 Author Share Posted March 14, 2014 Event: "onClientGUIChanged" guiGetText tonumber string.len guiGridListAddRow guiGridListSetItemText Event: "onClientGUIClick" guiGridListGetSelectedItem guiGridListGetItemText table isElement destroyElement createVehicle warpPedIntoVehicle Event: "onPlayerQuit" isElement destroyElement لو ممكن يجي تسوي لي string.len و tonumber Link to comment
#DRAGON!FIRE Posted March 14, 2014 Share Posted March 14, 2014 لو ممكن يجي تسوي لي string.len و tonumber سهلة تراها .. اسهل شي بـ الكود tonumber( guiGetText( element ) ) string.len : عشان تتحق من كم رقم كتب مو يجلس يكتب مليون رقم .. تتحق انه كتب 3 ارقام فقط ذذ Link to comment
EH10 Posted March 14, 2014 Author Share Posted March 14, 2014 Event: "onClientGUIChanged" guiGetText tonumber string.len guiGridListAddRow guiGridListSetItemText صـحح الـكـود الأول * Edits = guiCreateEdit(0,0,0,0,"",true) guiEditSetMaxLength( Edits، 3 ) LiSethH = guiCreateGridList ( 0, 0, 0, 0, true ) local Columen = guiGridListAddColumn( LiSethH, "Vehicles", 0.80 ) local Row = guiGridListAddRow ( LiSethH ) guiGridListSetItemText ( LiSethH, Row, Columen, getVehicleName(source), false, false ) addEventHandler("onClientGUIChanged", Edits, function ( element ) tonumber( guiGetText( element ) ) end ) Link to comment
#DRAGON!FIRE Posted March 14, 2014 Share Posted March 14, 2014 local Edit = guiCreateEdit( 0, 0, 0, 0, "", true ) local list = guiCreateGridList ( 0, 0, 0, 0, true ) guiGridListAddColumn( list, "Vehicles", 0.80 ) guiEditSetMaxLength( Edit, 3 ) addEventHandler( "onClientGUIChanged", resourceRoot, function ( element ) if ( element == Edit ) then if not ( tonumber( guiGetText( element ) ) ) then return guiSetText( element, "" ) else Row = guiGridListAddRow( list ) guiGridListSetItemText( list, Row, 1, "Car ID "..tonumber( guiGetText( element ) ), false, false ) end end end ) Link to comment
EH10 Posted March 15, 2014 Author Share Posted March 15, 2014 Event: "onClientGUIClick" guiGridListGetSelectedItem guiGridListGetItemText table isElement destroyElement createVehicle warpPedIntoVehicle # Client Side local Edit = guiCreateEdit( 0, 0, 0, 0, "", true ) local list = guiCreateGridList ( 0, 0, 0, 0, true ) guiGridListAddColumn( list, "Vehicles", 0.80 ) guiEditSetMaxLength( Edit, 3 ) addEventHandler( "onClientGUIClick", Button, function () guiGridListGetSelectedItem( list ) Row = guiGridListAddRow( list ) guiGridListGetItemText( list, Row, 1 ) triggerServerEvent( "onVehiclehit", localPlayer) end ) # Server Side local vehicle = {} addEvent( "onVehiclehit", true ) addEventHandler( "onVehiclehit", root, function () if ( isElement ( vehicle[source] ) ) then destroyElement ( vehicle[source] ) end vehicle[source] = createVehicle ( id, x, y, z ) warpPedIntoVehicle ( source, vehicle[source] ) end ) Event: "onPlayerQuit" isElement destroyElement addEventHandler( "onPlayerQuit", root, function () if ( isElement ( source ) ) then destroyElement ( source ) end end ) مـمـكن تـصـحيـح للـأكـواد Link to comment
EH10 Posted March 16, 2014 Author Share Posted March 16, 2014 و%$ين الناااااااااااااااااسسسسسسسسسسسسسسس Link to comment
</Mr.Tn6eL> Posted March 16, 2014 Share Posted March 16, 2014 Event: "onClientGUIClick" guiGridListGetSelectedItem guiGridListGetItemText table isElement destroyElement createVehicle warpPedIntoVehicle # Client Side local Edit = guiCreateEdit( 0, 0, 0, 0, "", true ) local list = guiCreateGridList ( 0, 0, 0, 0, true ) guiGridListAddColumn( list, "Vehicles", 0.80 ) guiEditSetMaxLength( Edit, 3 ) addEventHandler( "onClientGUIClick", Button, function () guiGridListGetSelectedItem( list ) Row = guiGridListAddRow( list ) guiGridListGetItemText( list, Row, 1 ) triggerServerEvent( "onVehiclehit", localPlayer) end ) # Server Side local vehicle = {} addEvent( "onVehiclehit", true ) addEventHandler( "onVehiclehit", root, function () if ( isElement ( vehicle[source] ) ) then destroyElement ( vehicle[source] ) end vehicle[source] = createVehicle ( id, x, y, z ) warpPedIntoVehicle ( source, vehicle[source] ) end ) Event: "onPlayerQuit" isElement destroyElement addEventHandler( "onPlayerQuit", root, function () if ( isElement ( source ) ) then destroyElement ( source ) end end ) مـمـكن تـصـحيـح للـأكـواد السورس غلط Link to comment
al-Kobra Posted March 16, 2014 Share Posted March 16, 2014 if isElement ( vehicle[source] ) then destroyElement ( vehicle[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