YourMind Posted April 8, 2016 Share Posted April 8, 2016 local screenW, screenH = guiGetScreenSize() wnd = guiCreateWindow(504, 193, 296, 378, ":: Vehicle Systeam ::", false) guiWindowSetSizable(wnd, false) guiSetAlpha(wnd, 1.00) guiSetVisible(wnd, false) btn = guiCreateButton(16, 264, 270, 37, "Buy", false, wnd) close = guiCreateButton(17, 305, 269, 37, "X", false, wnd) Label = guiCreateLabel(144, 350, 185, 18, "Created By [# | v1.2", false, wnd) guiLabelSetColor(Label, 255, 0, 0) grid = guiCreateGridList(9, 23, 273, 231, false, wnd) guiGridListAddColumn(grid, "Name Vehicle", 0.5) guiGridListAddColumn(grid, "ID", 0.5) bindKey ( "F6", "down", function ( ) guiSetVisible ( wnd, not guiGetVisible ( wnd ) ) showCursor ( guiGetVisible ( wnd ) ) end ) بجد ؟ هو دة شغلك كامل؟ عملت التصميم و فتح بالزر و خلاص ؟ D; Link to comment
#Untied Posted April 8, 2016 Author Share Posted April 8, 2016 local screenW, screenH = guiGetScreenSize() wnd = guiCreateWindow(504, 193, 296, 378, ":: Vehicle Systeam ::", false) guiWindowSetSizable(wnd, false) guiSetAlpha(wnd, 1.00) guiSetVisible(wnd, false) btn = guiCreateButton(16, 264, 270, 37, "Buy", false, wnd) close = guiCreateButton(17, 305, 269, 37, "X", false, wnd) Label = guiCreateLabel(144, 350, 185, 18, "Created By # | v1.2", false, wnd) guiLabelSetColor(Label, 255, 0, 0) grid = guiCreateGridList(9, 23, 273, 231, false, wnd) guiGridListAddColumn(grid, "Name Vehicle", 0.5) guiGridListAddColumn(grid, "ID", 0.5) bindKey ( "F6", "down", function ( ) guiSetVisible ( wnd, not guiGetVisible ( wnd ) ) showCursor ( guiGetVisible ( wnd ) ) end ) addEventHandler("onClientGUIClick",btn, function () local sel = guiGridListGetSelectedItem (grid) if sel ~= -1 then local skinID = guiGridListGetItemData (grid,sel,1) triggerServerEvent("GiveVehicle",localPlayer,ID) guiSetVisible (wnd,false) guiSetInputEnabled(false) showCursor(false) end end ,false) Cars = { {'Monster',9000,580}, {'Frary',545r,570}, } for _, v in ipairs (Cars) do local Row = guiGridListAddRow(grid) guiGridListSetItemText(grid, Row, 1, v[1], false, false) guiGridListSetItemText(grid, Row, 2, v[2], false, false) end addEvent("GiveVehicle" ,true) addEventHandler("GiveVehicle" ,root, function (ID) PMoney = getPlayerMoney(source) if PMoney >= 2500 then GiveVehicle(source ,ID) takePlayerMoney(source,2500) outputChatBox("* تم شراء الشخصيه",source ,0,255,0,false) else outputChatBox("* ليس لديك المال الكافي للشراء",source ,255,0,0,false) end end ) Link to comment
#Untied Posted April 8, 2016 Author Share Posted April 8, 2016 local screenW, screenH = guiGetScreenSize() wnd = guiCreateWindow(504, 193, 296, 378, ":: Vehicle Systeam ::", false) guiWindowSetSizable(wnd, false) guiSetAlpha(wnd, 1.00) guiSetVisible(wnd, false) btn = guiCreateButton(16, 264, 270, 37, "Buy", false, wnd) close = guiCreateButton(17, 305, 269, 37, "X", false, wnd) Label = guiCreateLabel(144, 350, 185, 18, "Created By # | v1.2", false, wnd) guiLabelSetColor(Label, 255, 0, 0) grid = guiCreateGridList(9, 23, 273, 231, false, wnd) guiGridListAddColumn(grid, "Name Vehicle", 0.5) guiGridListAddColumn(grid, "ID", 0.5) bindKey ( "F6", "down", function ( ) guiSetVisible ( wnd, not guiGetVisible ( wnd ) ) showCursor ( guiGetVisible ( wnd ) ) end ) addEventHandler("onClientGUIClick",btn, function () local sel = guiGridListGetSelectedItem (grid) if sel ~= -1 then local skinID = guiGridListGetItemData (grid,sel,1) triggerServerEvent("GiveVehicle",localPlayer,ID) guiSetVisible (wnd,false) guiSetInputEnabled(false) showCursor(false) end end ,false) Cars = { {'Monster',9000,580}, {'Frary',545r,570}, } for _, v in ipairs (Cars) do local Row = guiGridListAddRow(grid) guiGridListSetItemText(grid, Row, 1, v[1], false, false) guiGridListSetItemText(grid, Row, 2, v[2], false, false) end addEvent("GiveVehicle" ,true) addEventHandler("GiveVehicle" ,root, function (ID) PMoney = getPlayerMoney(source) if PMoney >= 2500 then GiveVehicle(source ,ID) takePlayerMoney(source,2500) outputChatBox("* تم شراء الشخصيه",source ,0,255,0,false) else outputChatBox("* ليس لديك المال الكافي للشراء",source ,255,0,0,false) end end ) Link to comment
#Mr.Rajo~,< Posted April 8, 2016 Share Posted April 8, 2016 القسم صار كذا طلب فنكشن انشاء سيارة شوي يطلع بسكربت نظام سيارة كامل لول Link to comment
#Mr.Rajo~,< Posted April 8, 2016 Share Posted April 8, 2016 القسم صار كذا طلب فنكشن انشاء سيارة شوي يطلع بسكربت نظام سيارة كامل لول Link to comment
Ahmed Ly Posted April 8, 2016 Share Posted April 8, 2016 addEvent("GiveVehicle" ,true) addEventHandler("GiveVehicle" ,root, function (ID) PMoney = getPlayerMoney(source) if PMoney >= 2500 then local x,y,z = getElementPosition(source) createVehicle(ID,x,y+1,z) takePlayerMoney(source,2500) outputChatBox("* تم شراء سياره بنجاح",source ,0,255,0,false) else outputChatBox("* ليس لديك المال الكافي للشراء",source ,255,0,0,false) end end ) Link to comment
Ahmed Ly Posted April 8, 2016 Share Posted April 8, 2016 addEvent("GiveVehicle" ,true) addEventHandler("GiveVehicle" ,root, function (ID) PMoney = getPlayerMoney(source) if PMoney >= 2500 then local x,y,z = getElementPosition(source) createVehicle(ID,x,y+1,z) takePlayerMoney(source,2500) outputChatBox("* تم شراء سياره بنجاح",source ,0,255,0,false) else outputChatBox("* ليس لديك المال الكافي للشراء",source ,255,0,0,false) end end ) Link to comment
#Untied Posted April 8, 2016 Author Share Posted April 8, 2016 createVehicle(ID,x,y+1,z) كيف x y z مش فاهمها؟ Link to comment
#Untied Posted April 8, 2016 Author Share Posted April 8, 2016 createVehicle(ID,x,y+1,z) كيف x y z مش فاهمها؟ Link to comment
Ahmed Ly Posted April 8, 2016 Share Posted April 8, 2016 تجيب الاحدثية متع لاعب getElementPosition Link to comment
Ahmed Ly Posted April 8, 2016 Share Posted April 8, 2016 تجيب الاحدثية متع لاعب getElementPosition Link to comment
Abdul KariM Posted April 8, 2016 Share Posted April 8, 2016 Client Cars = { {'Monster',9000,580}, {'Frary',10000,570}, } for i , v in ipairs ( Cars ) do Row = guiGridListAddRow ( grid ) guiGridListSetItemText( grid,Row ,1,v[1],false,false); guiGridListSetItemText( grid,Row ,2,v[2],false,false); guiGridListSetItemData ( grid , Row , 1 , v[3] ) end addEventHandler("onClientGUIClick",resourceRoot, function ( ) if source == btn then local Se = guiGridListGetSelectedItem( grid ) if Se and Se ~= -1 then local Money = guiGridListGetItemText ( grid, Se, 2 ) local iD = guiGridListGetItemData ( grid , Se , 1 ) triggerServerEvent ( "GiveVehicle",localPlayer , Money , iD ) end end end ) ; local table = { } addEvent("GiveVehicle" ,true) addEventHandler("GiveVehicle" ,root, function ( Money , id ) if isElement( table[ source ] ) then destroyElement ( table[ source] ) end local Money_ = getPlayerMoney ( source ) if Money_ >= tonumber ( Money ) then PosX , PosY , PosZ = getElementPosition ( source ) takePlayerMoney( source , tonumber ( Money ) ) table[ source ] = createVehicle( id , PosX , PosY , PosZ ) outputChatBox("* تم شراء الشخصيه",source ,0,255,0,false) else outputChatBox("* ليس لديك المال الكافي للشراء",source ,255,0,0,false) end end ) ; المفروض اي واحد بغى ينزل موضوع , يقول وش هدفه يتعلم البرمجة , ولا نعطيه الكود جاهز ويتوكل انا اشوف كذا افضل بكثير بالتوفيق Link to comment
Abdul KariM Posted April 8, 2016 Share Posted April 8, 2016 Client Cars = { {'Monster',9000,580}, {'Frary',10000,570}, } for i , v in ipairs ( Cars ) do Row = guiGridListAddRow ( grid ) guiGridListSetItemText( grid,Row ,1,v[1],false,false); guiGridListSetItemText( grid,Row ,2,v[2],false,false); guiGridListSetItemData ( grid , Row , 1 , v[3] ) end addEventHandler("onClientGUIClick",resourceRoot, function ( ) if source == btn then local Se = guiGridListGetSelectedItem( grid ) if Se and Se ~= -1 then local Money = guiGridListGetItemText ( grid, Se, 2 ) local iD = guiGridListGetItemData ( grid , Se , 1 ) triggerServerEvent ( "GiveVehicle",localPlayer , Money , iD ) end end end ) ; local table = { } addEvent("GiveVehicle" ,true) addEventHandler("GiveVehicle" ,root, function ( Money , id ) if isElement( table[ source ] ) then destroyElement ( table[ source] ) end local Money_ = getPlayerMoney ( source ) if Money_ >= tonumber ( Money ) then PosX , PosY , PosZ = getElementPosition ( source ) takePlayerMoney( source , tonumber ( Money ) ) table[ source ] = createVehicle( id , PosX , PosY , PosZ ) outputChatBox("* تم شراء الشخصيه",source ,0,255,0,false) else outputChatBox("* ليس لديك المال الكافي للشراء",source ,255,0,0,false) end 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