عندك أخطاء كثيرة
الخطاء الاول
شوف مثال الويكي
bool guiGridListSetItemText ( element gridList, int rowIndex, int columnIndex, string text, bool section, bool number )
انت محطي بدال الرو كولمن
وبدل الكولمن رو شوف حقتك
local glar = guiGridListAddRow (g1)
guiGridListSetItemText (g1 ,Item, glar,"Luncher", false, false )
محطي الكولمن قبل الرو
واساسا الكولمن مب معرفة
guiGridListAddColumn ( g1, "Item", 0.5 )
الخطا الثاني
bindKey("F7","dwon", function()
الخطا > dwon || down < الصح
عرفت الخطا ؟
محطي الكلمة غلط
الخطا الثالث
if getElementData(localPlayer,"Weed") > 0 then
طيب واحد ماعنده داتا بلاساس
بيكون الناتج حق الداتا [ false ]
يصير التححقق حقك زي كذا
if false > 0 then
ويروح الدي بق يرسلك
attempt to comare number with boolean
الترجمة : محاولة للمقارنه بين عدد و منطقي ~> Google
التصحيح :
if getElementData ( localPlayer, "Coins" ) ~= false and getElementData ( localPlayer, "Coins" ) > 0 then
الكود كامل مع التصحيح
local x, y = guiGetScreenSize ()
addEventHandler ( "onClientResourceStart", resourceRoot,
function ()
--
sellsystem = guiCreateWindow ( ( x - 730 ) / 2 , ( y - 400 ) / 2, 730, 400, ".:[sell System]:.", false )
guiWindowSetSizable ( sellsystem, false )
guiSetAlpha ( sellsystem, 0.85 )
guiSetVisible ( sellsystem, false )
--
closeb = guiCreateButton ( 638, 21, 76, 27, "Close", false, sellsystem )
guiSetProperty ( closeb, "NormalTextColour", "FFFFFFFF" )
--
refreshb = guiCreateButton ( 552, 21, 76, 27, "Refresh", false, sellsystem )
guiSetProperty ( refreshb, "NormalTextColour", "FFFFFFFF" )
--
lbl1 = guiCreateLabel ( 10, 29, 158, 19, "Put an item up for sale", false, sellsystem )
--
g1 = guiCreateGridList ( 10, 58, 219, 179, false, sellsystem )
guiGridListAddColumn ( g1, "Item", 0.5 )
guiGridListAddColumn ( g1, "Amount", 0.5 )
--
lbl2 = guiCreateLabel ( 13, 259, 96, 15, "Amount :", false, sellsystem )
--
amounte = guiCreateEdit ( 9, 278, 155, 35, "", false, sellsystem )
guiEditSetMasked ( amounte, true )
--
lbl3 = guiCreateLabel ( 13, 323, 96, 15, "Cost per unit :", false, sellsystem )
--
pricee = guiCreateEdit ( 9, 342, 155, 35, "", false, sellsystem )
--
progressbar1 = guiCreateProgressBar ( 247, 23, 15, 366, false, sellsystem )
--
lbl4 = guiCreateLabel ( 136, 242, 103, 15, "", false, sellsystem )
--
g2 = guiCreateGridList ( 269, 53, 449, 294, false, sellsystem )
guiGridListAddColumn ( g2, "Item", 0.3 )
guiGridListAddColumn ( g2, "Price $", 0.3 )
guiGridListAddColumn ( g2, "Player", 0.3 )
--
lbl5 = guiCreateLabel ( 272, 351, 138, 15, "Amount of Select Item :", false, sellsystem )
--
amountbuy = guiCreateEdit ( 421, 362, 101, 27, "", false, sellsystem )
--
Buyb = guiCreateButton ( 532, 361, 76, 27, "Buy", false, sellsystem )
guiSetProperty ( Buyb, "NormalTextColour", "FF3CD87A" )
--
sellb = guiCreateButton ( 166, 314, 71, 28, "Sell", false, sellsystem )
guiSetFont ( sellb, "default-bold-small" )
guiSetProperty ( sellb, "NormalTextColour", "FFFFFFFF" )
--
end
)
addEventHandler ( "onClientGUIClick", resourceRoot,
function ()
if source == closeb then
guiSetVisible ( sellsystem, false )
showCursor ( false )
end
end
)
bindKey ( "F7", "down",
function ()
--
guiSetVisible ( sellsystem, not guiGetVisible ( sellsystem ) )
showCursor ( guiGetVisible ( sellsystem ) )
--
if guiGetVisible ( sellsystem ) == true then
guiGridListClear ( g1 )
if getElementData ( localPlayer, "Coins" ) ~= false and getElementData ( localPlayer, "Coins" ) > 0 then
local Coins = guiGridListAddRow ( g1 )
local Coins1 = getElementData ( localPlayer,"Coins" )
guiGridListSetItemText ( g1 , Coins, 1,"Coins", false, false )
guiGridListSetItemText ( g1 , Coins, 2,""..tonumber(Coins1).."", false, false )
end
if getElementData ( localPlayer, "Heroin" ) ~= false and getElementData ( localPlayer, "Heroin" ) > 0 then
local Heroin = guiGridListAddRow (g1)
local Heroin1 = getElementData ( localPlayer, "Heroin" )
guiGridListSetItemText (g1 , Heroin, 1,"Drug Heroin", false, false )
guiGridListSetItemText (g1 , Heroin, 2,""..tonumber ( Heroin1 ) .."", false, false )
end
if getElementData ( localPlayer, "Steroids" ) ~= false and getElementData ( localPlayer, "Steroids" ) > 0 then
local Steroids = guiGridListAddRow (g1)
local Steroids2 = getElementData ( localPlayer, "Steroids" )
guiGridListSetItemText (g1 , Steroids, 1,"Drug Steroids", false, false )
guiGridListSetItemText (g1 , Steroids, 2,""..tonumber(Steroids2).."", false, false )
end
if getElementData ( localPlayer, "LSD" ) ~= false and getElementData ( localPlayer, "LSD" ) > 0 then
local LSD = guiGridListAddRow (g1)
local LSD1 = getElementData ( localPlayer, "LSD" )
guiGridListSetItemText ( g1 , LSD, 1,"Drug LSD", false, false )
guiGridListSetItemText ( g1 , LSD, 2,""..tonumber(LSD1).."", false, false )
end
if getElementData ( localPlayer, "Speed" ) ~= false and getElementData ( localPlayer, "Speed" ) > 0 then
local Speed = guiGridListAddRow (g1)
local Speed2 = getElementData ( localPlayer, "Speed" )
guiGridListSetItemText ( g1 , Speed, 1,"Drug Speed", false, false )
guiGridListSetItemText ( g1 , Speed, 2,""..tonumber(Speed2).."", false, false )
end
if getElementData ( localPlayer, "God" ) ~= false and getElementData ( localPlayer, "God" ) > 0 then
local God1 = guiGridListAddRow (g1)
local God2 = getElementData ( localPlayer, "God" )
guiGridListSetItemText ( g1 , God1, 1,"Drug God", false, false )
guiGridListSetItemText ( g1 , God1, 2,""..tonumber(God2).."", false, false )
end
if getElementData ( localPlayer, "Weed" ) ~= false and getElementData ( localPlayer, "Weed" ) > 0 then
local weed1 = guiGridListAddRow (g1)
local weed2 = getElementData ( localPlayer, "Weed" )
guiGridListSetItemText ( g1 , weed1, 1,"Drug Weed", false, false )
guiGridListSetItemText ( g1 , weed1, 2,""..tonumber(weed2).."", false, false )
end
if getElementData ( localPlayer, "GLA" ) ~= false and getElementData ( localPlayer, "GLA" ) > 0 then
local glar = guiGridListAddRow (g1)
local glat = getElementData ( localPlayer, "GLA" )
guiGridListSetItemText ( g1 , glar, 1,"Luncher", false, false )
guiGridListSetItemText ( g1 , glar, 2,""..tonumber(glat).."", false, false )
end
end
end
)
ذا القريدليست الاول