+Source|> Posted December 9, 2017 Share Posted December 9, 2017 وش المشكله في الكود ما ينقلني ليش؟ local pl = { { 'البدايه', -2412.80200, -602.26788, 132.56250 }, { 'البنك', -2406.18408, -587.08850, 132.64844 }, } function rf () guiGridListClear( grd ) for i, v in ipairs( pl ) do local row = guiGridListAddRow( grd ) guiGridListSetItemText( grd, row, 1, i..'-', false, false ) guiGridListSetItemColor( grd, row, 1, math.random( 156 ), math.random( 255 ), math.random( 255 ) ) guiGridListSetItemText( grd, row, 2, '~ > [ '..v[1]..' ] < ~', false, false ) guiGridListSetItemColor( grd, row, 2, math.random( 156 ), math.random( 255 ), math.random( 255 ) ) guiGridListSetItemData( grd, row, 2, { int = v[2] } ) end end addEventHandler("onClientGUIClick", root, function( data ) local ss = guiGridListGetSelectedItem( grd ) local tt = guiGridListGetItemText( grd, ss, 2 ) local dd = guiGridListGetItemData( grd, ss, 2 ) local nn = guiGridListGetItemText( grd, guiGridListGetSelectedItem( grd ), 2 ) if source == warp then if ( ss ~= -1 ) then setElementPosition( source, dd ) else outputChatBox( ' #00ffff[ Warp System ] #ff0000 الرجاء إختيار مكان للإنتقال إليه ', 0, 0, 0, true ) end end end ) Link to comment
Ahmed Ly Posted December 9, 2017 Share Posted December 9, 2017 pl = { { 'البدايه', -2412.80200, -602.26788, 132.56250 }, { 'البنك', -2406.18408, -587.08850, 132.64844 }, } function rf () guiGridListClear( grd ) for i, v in ipairs( pl ) do local row = guiGridListAddRow( grd ) guiGridListSetItemText( grd, row, 1, i..'-', false, false ) guiGridListSetItemColor( grd, row, 1, math.random( 156 ), math.random( 255 ), math.random( 255 ) ) guiGridListSetItemText( grd, row, 2, '~ > [ '..v[1]..' ] < ~', false, false ) guiGridListSetItemColor( grd, row, 2, math.random( 156 ), math.random( 255 ), math.random( 255 ) ) guiGridListSetItemData( grd, row, 2, { v[2],v[3],v[4] } ) end end addEventHandler("onClientGUIClick", root, function() if source == warp then local ss = guiGridListGetSelectedItem( grd ) if ( ss ~= -1 ) then local tt = guiGridListGetItemText( grd, ss, 2 ) local x,y,z = unpack(guiGridListGetItemData(grd, ss, 2 )) triggerServerEvent("warp",localPlayer,x,y,z,tt) else outputChatBox( ' #00ffff[ Warp System ] #ff0000 الرجاء إختيار مكان للإنتقال إليه ', 0, 0, 0, true ) end end end ) addEvent("warp",true) addEventHandler("warp",root, function (x,y,z,tt) outputChatBox(""..tt.."",source,255,0,0,true) setElementPosition(source,x,y,z) 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