Ahmed Tawfek Posted August 18, 2016 Share Posted August 18, 2016 السلام عليكم ورحمة الله وبركاته عندي مشكلة في مود الانتقال انا سويته بفلوس بس لما اجي انتقل ما يسحب فلوس من فلوسي font = guiCreateFont( "Font.ttf", 13 ) function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end alamaken = { {"البداية ",212.89436,1912.36755,17.64063}, {"المعرض ",-1631.39099,1199.99060,7.18750}, {"آلدآئري ",1708.423828125, 1429.7236328125, 10.4921875}, {"البنك ",166.07077026367, 1444.1270751953, 10.591223716736}, {"المطار الاول ",1717.6470947266, -2494.1176757813, 13.39999961853}, {"المطار الثاني ",-1223.4300537109, -185.74758911133, 14.39999961853}, {"المطار الثالث ",1411.7646484375, 1482.3529052734, 10.89999961853}, } GUIEditor = { label = {} } local screenW, screenH = guiGetScreenSize() wnd = guiCreateWindow(495, 133, 376, 480, "Server Mlook Egypt Zombie", false) guiWindowSetSizable(wnd, false) grid = guiCreateGridList(39, 21, 302, 410, false, wnd) guiGridListAddColumn(grid, "#", 0.5) guiGridListAddColumn(grid, "الاماكن", 0.5) move = guiCreateButton(115, 432, 130, 39, "انتقال", false, wnd) guiSetVisible(wnd,false) bindKey("f4","down", function () if guiGetVisible(wnd) then guiSetVisible(wnd,false) showCursor(false) guiSetInputEnabled(false) else guiSetVisible(wnd,true) showCursor(true) guiSetInputEnabled(true) end end ) for i,v in ipairs(alamaken) do local row = guiGridListAddRow(grid) guiGridListSetItemText(grid,row,1,'['..i..']',false,false) guiGridListSetItemText(grid,row,2,v[1],false,false) guiGridListSetItemData(grid,row,2,{v[2],v[3],v[4]}) guiGridListSetItemColor(grid,row,1,math.random(0,255),math.random(0,255),math.random(0,155)) guiGridListSetItemColor(grid,row,2,math.random(0,255),math.random(0,255),math.random(0,155)) end addEventHandler("onClientGUIClick",root, function () local sel = guiGridListGetSelectedItem(grid) if source == move then if getPlayerMoney () >= 1000 then if sel ~= -1 then local x,y,z = unpack(guiGridListGetItemData(grid,sel,2)) takePlayerMoney (localPlayer,1000) setElementPosition(localPlayer,x,y,z) else outputChatBox("* من فضلك اختار مكان للانقال اليه",255,0,0) end else outputChatBox("you don't have enough money",255,0,0) end end end) addEventHandler("onClientGUIDoubleClick",root,function() if ( source == grid ) then local sel = guiGridListGetSelectedItem(grid) if getPlayerMoney () >= 1000 then if sel ~= -1 then local x,y,z = unpack(guiGridListGetItemData(grid,sel,1)) takePlayerMoney(localPlayer,1000) setElementPosition(localPlayer,x,y,z) guiSetVisible(wnd,false) showCursor(false) end else outputChatBox("you don't have enough money",255,0,0) end end end) local againStartMove = -150 local endMove = 410 addEventHandler("onClientRender",root,function() local x,y = guiGetPosition(GUIEditor.label[1],false) guiSetPosition(GUIEditor.label[1],x + 2,y,false) if ( x >= endMove ) then guiSetPosition(GUIEditor.label[1],againStartMove,y,false) end end) ارجو حل المشكلة Link to comment
Vunili Posted August 18, 2016 Share Posted August 18, 2016 سو تريقر triggerServerEvent + عندك اخطاء باللوحة Link to comment
Ahmed Tawfek Posted August 18, 2016 Author Share Posted August 18, 2016 ايه هي الاخطاء ؟ Link to comment
Vunili Posted August 18, 2016 Share Posted August 18, 2016 ايه هي الاخطاء ؟ /debugscript 3 Link to comment
[DONE]* Posted August 18, 2016 Share Posted August 18, 2016 الحدث. مكتوب بالحدث بالويكي.. This event is fired when the user double clicks a GUI element. Doesn't work with buttons. onClientGUIDoubleClick يعني ما يشتغل مع الأزرار .. جرب تحط onClientGUIClick ودائما خلي الفلوس من السيرفر .. عشان بالكلينت يصير بقات . Link to comment
Ahmed Tawfek Posted August 19, 2016 Author Share Posted August 19, 2016 يغلق تم حل المشكله 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