Jump to content

فنشكنات مود لبيع الداتا


Recommended Posts

السلام عليكم ورحمة الله وبركاته

أبي طريقة عمل لوحة بقريد ليست بها يقدر الاعبين يبيعون داتا لبعض

مثال معي مود مخدرات

واحد انواع داتا المخدرات اسمها LSD

ابي اسوي الاعبين عند فتح اللوحة

يكون هناك قريد ليست به مخدراته + عددها

وقريد ليست به المخدرات المعروضة للبيع

وايديت لسعر كل 1 داتا منه

وايديت للعدد الذي يبي يبيعه

وعند الشراء ايديت لاختيار الكمية

-----------------------------

ابي الفنشكنات

Link to comment

تعرف انت شلون تسوي قريدليست وكولمن ورو الخخ .. ء

bindKey -- لمن يضغط ع الزر 
guiGridListClear -- عشان م يكون فيه تكرار 
getElementData -- هنا تجيب الداتا سوي لكل انواع المخدرات ( ينفع كلينت ) ء م يحتاج تريقر 
سوي تحقق ان الداتا معاه عشان م يكون القيمة false or nil 
guiGridListAddRow -- اسم المخدرات كولمن 1 
guiGridListSetItemData -- عشان تجبلها بعدين 1 
guiGridListAddRow -- عدد المخدرات كولمن 2 
guiGridListSetItemData -- عشان تجبلها بعدين 2 

الايديت

onClientGUIChanged -- لمن يكتب بالايديت 

تحقق انه نوعه رقم بـ أستخدام

type 

اذا م كان رقم تمسح المكتوب

onClientGUIClick -- لمن يضغط ع زر بيع 

تجيب القيمة الي ادخلها بالايديت باستعمال

guiGetText 

وتجيب داتا الصف الي اختاره باستعمال

guiGridListGetItemData +  guiGridListGetSelectedItem 

يتحقق ان الرقم الي ادخله بالايديت مب اكبر من داتا عدد المخدرات

يضيفها للقريدليست الثانية الحين سوي القريدليست الاول ويوم تخلص منه قلنا عشان نبداء نعلمك بثاني الي هو للكل

Link to comment
تعرف انت شلون تسوي قريدليست وكولمن ورو الخخ .. ء

bindKey -- لمن يضغط ع الزر 
guiGridListClear -- عشان م يكون فيه تكرار 
getElementData -- هنا تجيب الداتا سوي لكل انواع المخدرات ( ينفع كلينت ) ء م يحتاج تريقر 
سوي تحقق ان الداتا معاه عشان م يكون القيمة false or nil 
guiGridListAddRow -- اسم المخدرات كولمن 1 
guiGridListSetItemData -- عشان تجبلها بعدين 1 
guiGridListAddRow -- عدد المخدرات كولمن 2 
guiGridListSetItemData -- عشان تجبلها بعدين 2 

الايديت

onClientGUIChanged -- لمن يكتب بالايديت 

تحقق انه نوعه رقم بـ أستخدام

type 

اذا م كان رقم تمسح المكتوب

onClientGUIClick -- لمن يضغط ع زر بيع 

تجيب القيمة الي ادخلها بالايديت باستعمال

guiGetText 

وتجيب داتا الصف الي اختاره باستعمال

guiGridListGetItemData +  guiGridListGetSelectedItem 

يتحقق ان الرقم الي ادخله بالايديت مب اكبر من داتا عدد المخدرات

يضيفها للقريدليست الثانية الحين سوي القريدليست الاول ويوم تخلص منه قلنا عشان نبداء نعلمك بثاني الي هو للكل

شكراًً لك جداً على المساعدة :fadein::fadein:

Link to comment

اين الاخطاء وخاصةً في اخر اكواد ما عرفت اسويها جيداً

GUIEditor = { 
    label = {}, 
    progressbar = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        sellsystem = guiCreateWindow(34, 72, 728, 399, ".:[sell System]:. 
", false) 
        guiWindowSetSizable(sellsystem, false) 
        guiSetAlpha(sellsystem, 0.93) 
  
        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") 
        GUIEditor.label[1] = 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) 
        GUIEditor.label[2] = guiCreateLabel(13, 259, 96, 15, "Amount :", false, sellsystem) 
        amounte = guiCreateEdit(9, 278, 155, 35, "", false, sellsystem) 
        guiEditSetMasked(amounte, true) 
        GUIEditor.label[3] = guiCreateLabel(13, 323, 96, 15, "Cost per unit :", false, sellsystem) 
        pricee = guiCreateEdit(9, 342, 155, 35, "", false, sellsystem) 
        GUIEditor.progressbar[1] = guiCreateProgressBar(247, 23, 15, 366, false, sellsystem) 
        GUIEditor.label[4] = 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) 
        GUIEditor.label[5] = 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 
) 
  
  
--GLA 
addEventHandler("onClientRander",root, function() 
    if getElementData(localPlayer,"GLA") > 0 then 
        local glar =  guiGridListAddRow (g1) 
        local glat = getElementData(localPlayer,"GLA") 
         guiGridListSetItemText (g1 ,Item, glar,"Luncher", false, false ) 
         guiGridListSetItemText (g1 ,Amount, glar,""..tonumber(glat).."", false, false ) 
    end 
end) 
  
--Weed 
addEventHandler("onClientRander",root, function() 
    if getElementData(localPlayer,"Weed") > 0 then 
        local weed1 =  guiGridListAddRow (g1) 
        local weed2 = getElementData(localPlayer,"Weed") 
         guiGridListSetItemText (g1 ,Item, weed1,"Drug Weed", false, false ) 
         guiGridListSetItemText (g1 ,Amount, weed1,""..tonumber(weed2).."", false, false ) 
    end 
end) 
  
--God 
addEventHandler("onClientRander",root, function() 
    if getElementData(localPlayer,"God") > 0 then 
        local God1 =  guiGridListAddRow (g1) 
        local God2 = getElementData(localPlayer,"God") 
         guiGridListSetItemText (g1 ,Item, God1,"Drug God", false, false ) 
         guiGridListSetItemText (g1 ,Amount, God1,""..tonumber(God2).."", false, false ) 
    end 
end) 
  
--Speed 
addEventHandler("onClientRander",root, function() 
    if getElementData(localPlayer,"Speed") > 0 then 
        local Speed =  guiGridListAddRow (g1) 
        local Speed2 = getElementData(localPlayer,"Speed") 
         guiGridListSetItemText (g1 ,Item, Speed,"Drug Speed", false, false ) 
         guiGridListSetItemText (g1 ,Amount, Speed,""..tonumber(Speed2).."", false, false ) 
    end 
end) 
  
--LSD 
addEventHandler("onClientRander",root, function() 
    if getElementData(localPlayer,"LSD") > 0 then 
        local LSD =  guiGridListAddRow (g1) 
        local LSD1 = getElementData(localPlayer,"LSD") 
         guiGridListSetItemText (g1 ,Item, LSD,"Drug LSD", false, false ) 
         guiGridListSetItemText (g1 ,Amount, LSD,""..tonumber(LSD1).."", false, false ) 
    end 
end) 
  
--Steroids 
addEventHandler("onClientRander",root, function() 
    if getElementData(localPlayer,"Steroids") > 0 then 
        local Steroids =  guiGridListAddRow (g1) 
        local Steroids2 = getElementData(localPlayer,"Steroids") 
         guiGridListSetItemText (g1 ,Item, Steroids,"Drug Steroids", false, false ) 
         guiGridListSetItemText (g1 ,Amount, Steroids,""..tonumber(Steroids2).."", false, false ) 
    end 
end) 
  
--Heroin 
addEventHandler("onClientRander",root, function() 
    if getElementData(localPlayer,"Heroin") > 0 then 
        local Heroin =  guiGridListAddRow (g1) 
        local Heroin1 = getElementData(localPlayer,"Heroin") 
         guiGridListSetItemText (g1 ,Item, Heroin,"Drug Heroin", false, false ) 
         guiGridListSetItemText (g1 ,Amount, Heroin,""..tonumber(Heroin1).."", false, false ) 
    end 
end) 
  
--Coins 
addEventHandler("onClientRander",root, function() 
    if getElementData(localPlayer,"Coins") > 0 then 
        local Coins =  guiGridListAddRow (g1) 
        local Coins1 = getElementData(localPlayer,"Coins") 
         guiGridListSetItemText (g1 ,Item, Coins,"Coins", false, false ) 
         guiGridListSetItemText (g1 ,Amount, Coins,""..tonumber(Coins1).."", false, false ) 
    end 
end) 
  
--[[ Buttoun Close Code]]-- 
addEventHandler("onClientGUIClick",root, function() 
    if (source == closeb) then 
        guiSetVisible(sellsystem,false) 
        showCursor(guiGetVisible(sellsystem)) 
    end 
end) 
  
--[[ Open Window Code]]-- 
bindKey("F7","dwon", function() 
    guiSetVisible(sellsystem, not guiGetVisible(sellsystem) ) 
    showCursor( guiGetVisible(sellsystem) ) 
end) 
  
--[[ Sell System Code]] -- 
  
local Coins1 = getElementData(localPlayer,"Coins") 
local Heroin1 = getElementData(localPlayer,"Heroin") 
local Steroids1 = getElementData(localPlayer,"Steroids") 
local LSD1 = getElementData(localPlayer,"LSD") 
local Speed1 = getElementData(localPlayer,"Speed") 
local God1 = getElementData(localPlayer,"God") 
local weed1 = getElementData(localPlayer,"Weed") 
local gla1 = getElementData(localPlayer,"GLA") 
  
addEventHandler("onClientGUIClick",root, function() 
    if (source == sellb) then 
    if guiGridListGetSelectedItem (g1) then 
    if guiGridListGetItemText(g1,Item) == Luncher then 
        s1 = guiGetText(pricee) 
        s2 = guiGetText(amounte) 
    if guiGetText(amounte) < tonumber(gla1)  or guiGetText(amounte) == tonumber(gla1) 
        guiGridListRemoveRow (g1,Item) 
        guiGridListRemoveRow (g1,Amount) 
            gg = guiGridListAddRow(g2) 
                 guiGridListSetItemText(g2,Item,"Luncher") 
                 guiGridListSetItemText(g2,Amount,""..tonumber(glat).."") 
                 guiGridListSetItemText(g2,Player,""..getPlayerName(localPlayer).."") 
         
                    end 
                end 
            end 
        end 
    end 
end) 
  

Link to comment
مساعدة

عندك أخطاء كثيرة

الخطاء الاول

شوف مثال الويكي

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 :wink:

التصحيح :

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 
) 

ذا القريدليست الاول

Link to comment
مساعدة

عندك أخطاء كثيرة

الخطاء الاول

شوف مثال الويكي

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 
) 

ذا القريدليست الاول

شكراً لك على التصحيح

لان دي اول مرة استخدم القريد ليست

شكراً لك افدتني :):fadein:

Link to comment
  • 3 weeks later...

مشكلة عند الضغط على زر البيع ما يصير شيئ

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 )
--
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
)
 
 
 
 
addEventHandler("onClientGUIClick",root,
function()
if (source == sellb) then
local sel = guiGridListGetSelectedItem (g1)
if sel ~= -1 then
if guiGridListGetItemText(g1,sel,1) == "Luncher" then
s1 = guiGetText(pricee)
s2 = guiGetText(amounte)
if guiGetText(amounte) < getElementData(source,"GLA")  or guiGetText(amounte) == getElementData(source,"GLA") then
guiGridListRemoveRow (g1,1)
guiGridListRemoveRow (g1,2)
gg = guiGridListAddRow(g2)
guiGridListSetItemText(g2,gg,1,"Luncher",false,false)
guiGridListSetItemText(g2,gg,2,tonumber(pricee),false,false)
guiGridListSetItemText(g2,gg,3,getPlayerName(localPlayer),false,false)    
end
end
end
end
end
)
 
 
 
addEventHandler("onClientGUIClick",root,
function()
if (source == sellb) then
local sel = guiGridListGetSelectedItem (g1)
if sel ~= -1 then
if guiGridListGetItemText(g1,sel,1) == "Weed" then
s1 = guiGetText(pricee)
s2 = guiGetText(amounte)
if guiGetText(amounte) < getElementData(source,"Weed")  or guiGetText(amounte) == getElementData(source,"Weed") then
guiGridListRemoveRow (g1,1)
guiGridListRemoveRow (g1,2)
gg1 = guiGridListAddRow(g2)
guiGridListSetItemText(g2,gg1,1,"Weed",false,false)
guiGridListSetItemText(g2,gg1,2,tonumber(pricee),false,false)
guiGridListSetItemText(g2,gg1,3,getPlayerName(localPlayer),false,false)    
end
end
end
end
end
)
 
 
addEventHandler("onClientGUIClick",root,
function()
if (source == sellb) then
local sel = guiGridListGetSelectedItem (g1)
if sel ~= -1 then
if guiGridListGetItemText(g1,sel,1) == "God" then
s1 = guiGetText(pricee)
s2 = guiGetText(amounte)
if guiGetText(amounte) < getElementData(source,"God")  or guiGetText(amounte) == getElementData(source,"God") then
guiGridListRemoveRow (g1,1)
guiGridListRemoveRow (g1,2)
gg2 = guiGridListAddRow(g2)
guiGridListSetItemText(g2,gg2,1,"God",false,false)
guiGridListSetItemText(g2,gg2,2,tonumber(pricee),false,false)
guiGridListSetItemText(g2,gg2,3,getPlayerName(localPlayer),false,false)    
end
end
end
end
end
)
 
 
addEventHandler("onClientGUIClick",root,
function()
if (source == sellb) then
local sel = guiGridListGetSelectedItem (g1)
if sel ~= -1 then
if guiGridListGetItemText(g1,sel,1) == "Speed" then
s1 = guiGetText(pricee)
s2 = guiGetText(amounte)
if guiGetText(amounte) < getElementData(source,"Speed")  or guiGetText(amounte) == getElementData(source,"Speed") then
guiGridListRemoveRow (g1,1)
guiGridListRemoveRow (g1,2)
gg3 = guiGridListAddRow(g2)
guiGridListSetItemText(g2,gg3,1,"Speed",false,false)
guiGridListSetItemText(g2,gg3,2,tonumber(pricee),false,false)
guiGridListSetItemText(g2,gg3,3,getPlayerName(localPlayer),false,false)    
end
end
end
end
end
)
 
 
addEventHandler("onClientGUIClick",root,
function()
if (source == sellb) then
local sel = guiGridListGetSelectedItem (g1)
if sel ~= -1 then
if guiGridListGetItemText(g1,sel,1) == "LSD" then
s1 = guiGetText(pricee)
s2 = guiGetText(amounte)
if guiGetText(amounte) < getElementData(source,"LSD")  or guiGetText(amounte) == getElementData(source,"LSD") then
guiGridListRemoveRow (g1,1)
guiGridListRemoveRow (g1,2)
gg4 = guiGridListAddRow(g2)
guiGridListSetItemText(g2,gg4,1,"LSD",false,false)
guiGridListSetItemText(g2,gg4,2,tonumber(pricee),false,false)
guiGridListSetItemText(g2,gg4,3,getPlayerName(localPlayer),false,false)    
end
end
end
end
end
)
 
 
addEventHandler("onClientGUIClick",root,
function()
if (source == sellb) then
local sel = guiGridListGetSelectedItem (g1)
if sel ~= -1 then
if guiGridListGetItemText(g1,sel,1) == "Steroids" then
s1 = guiGetText(pricee)
s2 = guiGetText(amounte)
if guiGetText(amounte) < getElementData(source,"Steroids")  or guiGetText(amounte) == getElementData(source,"Steroids") then
Link to comment

مشكلة عند الضغط على زر البيع ما يصير شيئ

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 )
--
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
)
 
 
 
 
addEventHandler("onClientGUIClick",root,
function()
if (source == sellb) then
local sel = guiGridListGetSelectedItem (g1)
if sel ~= -1 then
if guiGridListGetItemText(g1,sel,1) == "Luncher" then
s1 = guiGetText(pricee)
s2 = guiGetText(amounte)
if guiGetText(amounte) < getElementData(source,"GLA")  or guiGetText(amounte) == getElementData(source,"GLA") then
guiGridListRemoveRow (g1,1)
guiGridListRemoveRow (g1,2)
gg = guiGridListAddRow(g2)
guiGridListSetItemText(g2,gg,1,"Luncher",false,false)
guiGridListSetItemText(g2,gg,2,tonumber(pricee),false,false)
guiGridListSetItemText(g2,gg,3,getPlayerName(localPlayer),false,false)    
end
end
end
end
end
)
 
 
 
addEventHandler("onClientGUIClick",root,
function()
if (source == sellb) then
local sel = guiGridListGetSelectedItem (g1)
if sel ~= -1 then
if guiGridListGetItemText(g1,sel,1) == "Weed" then
s1 = guiGetText(pricee)
s2 = guiGetText(amounte)
if guiGetText(amounte) < getElementData(source,"Weed")  or guiGetText(amounte) == getElementData(source,"Weed") then
guiGridListRemoveRow (g1,1)
guiGridListRemoveRow (g1,2)
gg1 = guiGridListAddRow(g2)
guiGridListSetItemText(g2,gg1,1,"Weed",false,false)
guiGridListSetItemText(g2,gg1,2,tonumber(pricee),false,false)
guiGridListSetItemText(g2,gg1,3,getPlayerName(localPlayer),false,false)    
end
end
end
end
end
)
 
 
addEventHandler("onClientGUIClick",root,
function()
if (source == sellb) then
local sel = guiGridListGetSelectedItem (g1)
if sel ~= -1 then
if guiGridListGetItemText(g1,sel,1) == "God" then
s1 = guiGetText(pricee)
s2 = guiGetText(amounte)
if guiGetText(amounte) < getElementData(source,"God")  or guiGetText(amounte) == getElementData(source,"God") then
guiGridListRemoveRow (g1,1)
guiGridListRemoveRow (g1,2)
gg2 = guiGridListAddRow(g2)
guiGridListSetItemText(g2,gg2,1,"God",false,false)
guiGridListSetItemText(g2,gg2,2,tonumber(pricee),false,false)
guiGridListSetItemText(g2,gg2,3,getPlayerName(localPlayer),false,false)    
end
end
end
end
end
)
 
 
addEventHandler("onClientGUIClick",root,
function()
if (source == sellb) then
local sel = guiGridListGetSelectedItem (g1)
if sel ~= -1 then
if guiGridListGetItemText(g1,sel,1) == "Speed" then
s1 = guiGetText(pricee)
s2 = guiGetText(amounte)
if guiGetText(amounte) < getElementData(source,"Speed")  or guiGetText(amounte) == getElementData(source,"Speed") then
guiGridListRemoveRow (g1,1)
guiGridListRemoveRow (g1,2)
gg3 = guiGridListAddRow(g2)
guiGridListSetItemText(g2,gg3,1,"Speed",false,false)
guiGridListSetItemText(g2,gg3,2,tonumber(pricee),false,false)
guiGridListSetItemText(g2,gg3,3,getPlayerName(localPlayer),false,false)    
end
end
end
end
end
)
 
 
addEventHandler("onClientGUIClick",root,
function()
if (source == sellb) then
local sel = guiGridListGetSelectedItem (g1)
if sel ~= -1 then
if guiGridListGetItemText(g1,sel,1) == "LSD" then
s1 = guiGetText(pricee)
s2 = guiGetText(amounte)
if guiGetText(amounte) < getElementData(source,"LSD")  or guiGetText(amounte) == getElementData(source,"LSD") then
guiGridListRemoveRow (g1,1)
guiGridListRemoveRow (g1,2)
gg4 = guiGridListAddRow(g2)
guiGridListSetItemText(g2,gg4,1,"LSD",false,false)
guiGridListSetItemText(g2,gg4,2,tonumber(pricee),false,false)
guiGridListSetItemText(g2,gg4,3,getPlayerName(localPlayer),false,false)    
end
end
end
end
end
)
 
 
addEventHandler("onClientGUIClick",root,
function()
if (source == sellb) then
local sel = guiGridListGetSelectedItem (g1)
if sel ~= -1 then
if guiGridListGetItemText(g1,sel,1) == "Steroids" then
s1 = guiGetText(pricee)
s2 = guiGetText(amounte)
if guiGetText(amounte) < getElementData(source,"Steroids")  or guiGetText(amounte) == getElementData(source,"Steroids") then
Link to comment
جابر اتمنى ما تسوي تعليقات مثل

:arrowup::arrowup::arrowup::arrowup:

هذي حركات عليها مخالفه ..

او مشاركتين مزدوجة يعني مع بعض ..

هذا

bump up

يرفعون الموضوع فوق مشان ما ينسوه ض

Link to comment
جابر اتمنى ما تسوي تعليقات مثل

:arrowup::arrowup::arrowup::arrowup:

هذي حركات عليها مخالفه ..

او مشاركتين مزدوجة يعني مع بعض ..

هذا

bump up

يرفعون الموضوع فوق مشان ما ينسوه ض

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...