Anubhav Posted June 11, 2016 Share Posted June 11, 2016 Shaman123 said: it's not what i mean, i want the all the 1000$ up there, they're not the same line as the other rows. how to fix it? here is the gridlist/rows part: skins = { {"M4", 31}, {"AK47", 30}, {"Shotgun", 25}, {"Sniper", 34}, } cost = { "1000$", "1000$", "1000$", "1000$" } window = guiCreateWindow(0.31, 0.21, 0.38, 0.63, "Weapon Shop", true) guiWindowSetSizable(window, false) guiSetVisible(window, false) spawnG = guiCreateGridList(0.02, 0.04, 0.56, 0.94, true, window) guiGridListSetSelectionMode ( spawnG, 2 ) local column1 = guiGridListAddColumn(spawnG, "Weapons:", 0.5) local column2 = guiGridListAddColumn(spawnG, "Cost:", 0.5) for i,skins in ipairs(skins) do row = guiGridListAddRow(spawnG) guiGridListSetItemText(spawnG, row, 1, tostring(skins[1]), false, false) guiGridListSetItemData(spawnG, row, 1, tostring(skins[2])) end for key,cost in pairs(cost) do local row = guiGridListAddRow(spawnG) guiGridListSetItemText ( spawnG, row, 2, cost, false, false ) end guiGridListAddRow(spawnG) spawnbtn = guiCreateButton(0.63, 0.31, 0.30, 0.11, "Buy", true, window) cancel = guiCreateButton(0.63, 0.54, 0.30, 0.11, "Cancel", true, window) function buyweapon() if ( source == spawnbtn ) then local row, col = guiGridListGetSelectedItem( spawnG ) local name = guiGridListGetItemText( spawnG, row, col ) if name == "M4" then local id = 31 triggerServerEvent("spawn", getLocalPlayer(), id) elseif name == "AK47" then local id = 30 triggerServerEvent("spawn2", getLocalPlayer(), id) elseif name == "Shotgun" then local id = 25 triggerServerEvent("spawn3", getLocalPlayer(), id) elseif name == "Sniper" then local id = 34 triggerServerEvent("spawn4", getLocalPlayer(), id) end end end addEventHandler("onClientGUIClick",root,buyweapon) Dude wtf? I'm trying to help you. The row is created FOR BOTH COLUMNS which i'm trying to say you are creating extra rows for the money column. You need see: guiGridListSetItemText استخدم حدث وحط اسم اللاعب باللبل زي كذا: l = guiCreateLabel( x,y,width,height,getPlayerName(localPlayer),relative) Link to comment
7amoody10111 Posted June 11, 2016 Share Posted June 11, 2016 السلام عليكم ابي كودين يا شباب الكود الاول ابي يطلع اسم الاعب في الليبل انا جربت كود حقي وماضبط ابي اشوف من عندكم الكود الثاني ابي يطلع لي في الليبل عدد الاعبين الا انا قتلتهم Link to comment
فاّرس Posted June 11, 2016 Share Posted June 11, 2016 الكود الاول استخدم, getPlayerName guiSetText الكود الثاني انت مسوي نظام حفظ القتل او شي زي كذا ولا لا؟ Link to comment
Adham Posted June 11, 2016 Share Posted June 11, 2016 (edited) الطلب الاول : كلنت : addEventHandler("onClientRender", root, function () guiSetText ( Name, "Your Name : ".. getPlayerName ( localPlayer ):gsub("#%x%x%x%x%x%x", "") .."" ) end) Name = اسم الابال تبعك Edited June 11, 2016 by Guest Link to comment
Adham Posted June 11, 2016 Share Posted June 11, 2016 كيف بدون حدث افرد الاعب غير اسمه ؟ Link to comment
فاّرس Posted June 11, 2016 Share Posted June 11, 2016 (edited) "onClientPlayerChangeNick" استخدم حدث وحط اسم اللاعب باللبل زي كذا: l = guiCreateLabel( x,y,width,height,getPlayerName(localPlayer),relative) Edited June 11, 2016 by Guest Link to comment
7amoody10111 Posted June 11, 2016 Author Share Posted June 11, 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