Jump to content

Ja[B]er[X]Pro

Members
  • Posts

    779
  • Joined

  • Last visited

Everything posted by Ja[B]er[X]Pro

  1. الخطأ عندك كلمة else وهي توضع مع التحقق ب if ... then
  2. الخطأ عندك كلمة else وهي توضع مع التحقق ب if ... then
  3. الوو مساعدة الكود بالصفحة الاولى
  4. الوو مساعدة الكود بالصفحة الاولى
  5. هكذا ؟ sec = {{{{{{},{},{},{}}}}}} local sx, sy = guiGetScreenSize() guiSetInputMode("no_binds_when_editing") GUIEditor = { label = {} } DrugUseWindow = guiCreateWindow(227, 111, 357, 332, "", false) guiWindowSetSizable(DrugUseWindow, false) guiSetAlpha(DrugUseWindow, 0.00) guiSetVisible(DrugUseWindow,false) UseDrug = guiCreateButton(335, 370, 118, 73, "", false) guiSetAlpha(UseDrug, 0.00) GUIEditor.label[6] = guiCreateLabel(483, 415, 91, 18, "© Ja[b]er[X]Pro", false,DrugUseWindow) WeedRadioButton = guiCreateCheckBox(236, 160, 189, 15, "Weed (جاذبية منخفضة)", false, DrugUseWindow) guiSetFont(WeedRadioButton, "default-bold-small") guiSetProperty(WeedRadioButton, "NormalTextColour", "FF50DD2F") GodRadioButton = guiCreateCheckBox(236, 194, 189, 15, "God (دم 200)", false, DrugUseWindow) guiSetFont(GodRadioButton, "default-bold-small") guiSetProperty(GodRadioButton, "NormalTextColour", "FFFD0E0E") SpeedRadioButton = guiCreateCheckBox(236, 227, 189, 15, "Speed (سرعة كبيرة)", false, DrugUseWindow) guiSetFont(SpeedRadioButton, "default-bold-small") guiSetProperty(SpeedRadioButton, "NormalTextColour", "FF2ACCE0") LSDRadioButton = guiCreateCheckBox(236, 261, 189, 15, "LSD (تشويش الرؤية)", false, DrugUseWindow) guiSetFont(LSDRadioButton, "default-bold-small") guiSetProperty(LSDRadioButton, "NormalTextColour", "FF93B950") SteroidsRadioButton = guiCreateCheckBox(236, 294, 189, 15, "Steroids (كل 8 تواني +2 دم)", false, DrugUseWindow) guiSetFont(SteroidsRadioButton, "default-bold-small") guiSetProperty(SteroidsRadioButton, "NormalTextColour", "FF1478F4") HeroinRadioButton = guiCreateCheckBox(236, 328, 189, 15, "Herion (يجعل تقشيرك صعب)", false, DrugUseWindow) guiSetFont(HeroinRadioButton, "default-bold-small") guiSetProperty(HeroinRadioButton, "NormalTextColour", "FFEFE718") addEventHandler("onClientRender",root, function() dxDrawLine(228 - 1, 112 - 1, 228 - 1, 146, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(578, 112 - 1, 228 - 1, 112 - 1, tocolor(0, 0, 0, 255), 1, true) dxDrawLine(228 - 1, 146, 578, 146, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(578, 146, 578, 112 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(228, 112, 350, 34, tocolor(224, 226, 28, 255), false) dxDrawLine(229 - 1, 113 - 1, 229 - 1, 443, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(579, 113 - 1, 229 - 1, 113 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(229 - 1, 443, 579, 443, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(579, 443, 579, 113 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(229, 113, 350, 330, tocolor(247, 17, 17, 100), false) dxDrawText("Drug System", 301, 103, 406, 141, tocolor(255, 255, 255, 255), 3.00, "default", "left", "top", false, false, false, false, false) dxDrawRectangle(340, 377, 103, 56, tocolor(239, 231, 24, 170), false) dxDrawText("Use", 368, 387, 473, 444, tocolor(183, 55, 207, 255), 2.00, "default", "left", "top", false, false, false, false, false) end) bindKey("F2", "down", function() if getPedOccupiedVehicle(localPlayer) and not guiGetVisible(DrugUseWindow) then outputChatBox("You can not use drugs while in a vehicle!",source, 255, 0, 0) return end dxDrawLine(228 - 1, 112 - 1, 228 - 1, 146, tocolor(0, 0, 0, 255), 1, true) dxDrawLine(578, 112 - 1, 228 - 1, 112 - 1, tocolor(0, 0, 0, 255), 1, true) dxDrawLine(228 - 1, 146, 578, 146, tocolor(0, 0, 0, 255), 1, true) dxDrawLine(578, 146, 578, 112 - 1, tocolor(0, 0, 0, 255), 1, true) dxDrawRectangle(228, 112, 350, 34, tocolor(224, 226, 28, 255), true) dxDrawLine(229 - 1, 113 - 1, 229 - 1, 443, tocolor(0, 0, 0, 255), 1, true) dxDrawLine(579, 113 - 1, 229 - 1, 113 - 1, tocolor(0, 0, 0, 255), 1, true) dxDrawLine(229 - 1, 443, 579, 443, tocolor(0, 0, 0, 255), 1, true) dxDrawLine(579, 443, 579, 113 - 1, tocolor(0, 0, 0, 255), 1, true) dxDrawRectangle(229, 113, 350, 330, tocolor(247, 17, 17, 100), true) dxDrawText("Drug System", 301, 103, 406, 141, tocolor(255, 255, 255, 255), 3.00, "default", "left", "top", false, false, true, false, false) dxDrawRectangle(340, 377, 103, 56, tocolor(239, 231, 24, 170), true) dxDrawText("Use", 368, 387, 473, 444, tocolor(183, 55, 207, 255), 2.00, "default", "left", "top", false, false, true, false, false) guiSetVisible(DrugUseWindow, not guiGetVisible(DrugUseWindow)) showCursor(guiGetVisible(DrugUseWindow)) end) DrugBuyWindow = guiCreateWindow(sx/2-(550/2), sy/2-(310/2), 600, 310, "Drugs by Price for GTW-RPG", false) guiWindowSetSizable(DrugBuyWindow, false) guiSetVisible(DrugBuyWindow, false) guiSetAlpha(DrugBuyWindow, 0.98) WeedBuyLabel = guiCreateLabel(25, 38, 205, 15, "Weed (Low gravity)", false, DrugBuyWindow) WeedPriceLabel = guiCreateLabel(67.5, 58, 205, 15, "$900", false, DrugBuyWindow) WeedBuyEdit = guiCreateEdit(47.5, 88, 75, 18, "0", false, DrugBuyWindow) guiLabelSetColor(WeedBuyLabel, 251, 213, 3) guiLabelSetColor(WeedPriceLabel, 0, 255, 0) GodBuyLabel = guiCreateLabel(235, 38, 205, 15, "God (Increased max health)", false, DrugBuyWindow) GodPriceLabel = guiCreateLabel(280, 58, 205, 15, "$3000", false, DrugBuyWindow) GodBuyEdit = guiCreateEdit(260, 88, 75, 18, "0", false, DrugBuyWindow) guiLabelSetColor(GodBuyLabel, 0, 253, 5) guiLabelSetColor(GodPriceLabel, 0, 255, 0) -- SpeedBuyLabel = guiCreateLabel(25, 125, 205, 15, "Speed (Faster action)", false, DrugBuyWindow) SpeedPriceLabel = guiCreateLabel(67.5, 145, 205, 15, "$1100", false, DrugBuyWindow) SpeedBuyEdit = guiCreateEdit(47.5, 175, 75, 18, "0", false, DrugBuyWindow) guiLabelSetColor(SpeedBuyLabel, 250, 2, 194) guiLabelSetColor(SpeedPriceLabel, 0, 255, 0) LSDBuyLabel = guiCreateLabel(235, 125, 205, 15, "LSD (Hallucination)", false, DrugBuyWindow) LSDPriceLabel = guiCreateLabel(280, 145, 205, 15, "$2000", false, DrugBuyWindow) LSDBuyEdit = guiCreateEdit(260, 175, 75, 18, "0", false, DrugBuyWindow) guiLabelSetColor(LSDBuyLabel, 0, 248, 251) guiLabelSetColor(LSDPriceLabel, 0, 255, 0) -- SteroidsBuyLabel = guiCreateLabel(25, 212, 205, 15, "Steroids (+2 hp every 8seconds)", false, DrugBuyWindow) SteroidsPriceLabel = guiCreateLabel(67.5, 232, 205, 15, "$800", false, DrugBuyWindow) SteroidsBuyEdit = guiCreateEdit(47.5, 262, 75, 18, "0", false, DrugBuyWindow) guiLabelSetColor(SteroidsBuyLabel, 2, 248, 60) guiLabelSetColor(SteroidsPriceLabel, 0, 255, 0) HeroinBuyLabel = guiCreateLabel(235, 212, 205, 15, "Heroin (Semi invincibility)", false, DrugBuyWindow) HeroinPriceLabel = guiCreateLabel(280, 232, 205, 15, "$4000", false, DrugBuyWindow) HeroinBuyEdit = guiCreateEdit(260, 262, 75, 18, "0", false, DrugBuyWindow) guiLabelSetColor(HeroinBuyLabel, 201, 48, 196) guiLabelSetColor(HeroinPriceLabel, 0, 255, 0) guiCreateStaticImage(450, 50, 125, 125, "drug.png", false, DrugBuyWindow) Total = guiCreateLabel(410, 200, 35, 16, "Total:", false, DrugBuyWindow) guiSetFont(Total, "default-bold-small") TotalLabel = guiCreateLabel(450, 200, 94, 16, "$0", false, DrugBuyWindow) guiSetFont(TotalLabel, "default-bold-small") guiLabelSetColor(TotalLabel, 0, 255, 0) BuyDrug = guiCreateButton(400, 250, 90, 35, "Buy", false, DrugBuyWindow) CloseBuyDrugPanel = guiCreateButton(500, 250, 90, 35, "Close", false, DrugBuyWindow) function showBuyDrug() guiSetText(TotalLabel, "$0") guiSetText(WeedBuyEdit, "0") guiSetText(GodBuyEdit, "0") guiSetText(SpeedBuyEdit, "0") guiSetText(LSDBuyEdit, "0") guiSetText(SteroidsBuyEdit, "0") guiSetText(HeroinBuyEdit, "0") guiSetVisible(DrugBuyWindow, true) showCursor(true) if drugDealer then guiSetText(DrugBuyWindow, "Buying drugs from "..getPlayerName(drugDealer)) else guiSetText(DrugBuyWindow, "Buying drugs from drug Dealer Ped") end end addEventHandler("onClientGUIChanged", guiRoot, function() if drugDealer then if getElementData(drugDealer, "DurgsDealer") then MaxWeed = (getElementData(drugDealer, "Weed") or 0) + (getElementData(localPlayer, "Weed") or 0) MaxGod = (getElementData(drugDealer, "God") or 0) + (getElementData(localPlayer, "God") or 0) MaxSpeed = (getElementData(drugDealer, "Speed") or 0) + (getElementData(localPlayer, "Speed") or 0) MaxLSD = (getElementData(drugDealer, "LSD") or 0) + (getElementData(localPlayer, "LSD") or 0) MaxSteroids = (getElementData(drugDealer, "Steroids") or 0) + (getElementData(localPlayer, "Steroids") or 0) MaxHeroin = (getElementData(drugDealer, "Heroin") or 0) + (getElementData(localPlayer, "Heroin") or 0) else exports.GTWtopbar:dm("This player does not sell drugs anymore!", 255, 0, 0) drugDealer = nil guiSetVisible(DrugBuyWindow, false) showCursor(false) end else MaxWeed = 10000 MaxGod = 10000 MaxSpeed = 10000 MaxLSD = 10000 MaxSteroids = 10000 MaxHeroin = 10000 end local Text = guiGetText(source) local Text = tonumber(Text) if source == WeedBuyEdit then local Amount = getElementData(localPlayer, "Weed") or 0 if not Text then guiSetText(source, "0") elseif Text+Amount > MaxWeed then guiSetText(source, MaxWeed-Amount >= 0 and MaxWeed-Amount or "0") end WeedCost = tonumber(guiGetText(source)) * tonumber(string.sub(guiGetText(WeedPriceLabel), 2)) elseif source == GodBuyEdit then local Amount = getElementData(localPlayer, "God") or 0 if not Text then guiSetText(source, "0") elseif Text+Amount > MaxGod then guiSetText(source, MaxGod-Amount >= 0 and MaxGod-Amount or "0") end GodCost = tonumber(guiGetText(source)) * tonumber(string.sub(guiGetText(GodPriceLabel), 2)) elseif source == SpeedBuyEdit then local Amount = getElementData(localPlayer, "Speed") or 0 if not Text then guiSetText(source, "0") elseif Text+Amount > MaxSpeed then guiSetText(source, MaxSpeed-Amount >= 0 and MaxSpeed-Amount or "0") end SpeedCost = tonumber(guiGetText(source)) * tonumber(string.sub(guiGetText(SpeedPriceLabel), 2)) elseif source == LSDBuyEdit then local Amount = getElementData(localPlayer, "LSD") or 0 if not Text then guiSetText(source, "0") elseif Text+Amount > MaxLSD then guiSetText(source, MaxLSD-Amount >= 0 and MaxLSD-Amount or "0") end LSDCost = tonumber(guiGetText(source)) * tonumber(string.sub(guiGetText(LSDPriceLabel), 2)) elseif source == SteroidsBuyEdit then local Amount = getElementData(localPlayer, "Steroids") or 0 if not Text then guiSetText(source, "0") elseif Text+Amount > MaxSteroids then guiSetText(source, MaxSteroids-Amount >= 0 and MaxSteroids-Amount or "0") end SteroidsCost = tonumber(guiGetText(source)) * tonumber(string.sub(guiGetText(SteroidsPriceLabel), 2)) elseif source == HeroinBuyEdit then local Amount = getElementData(localPlayer, "Heroin") or 0 if not Text then guiSetText(source, "0") elseif Text+Amount > MaxHeroin then guiSetText(source, MaxHeroin-Amount >= 0 and MaxHeroin-Amount or "0") end HeroinCost = tonumber(guiGetText(source)) * tonumber(string.sub(guiGetText(HeroinPriceLabel), 2)) end local TotalCost = (WeedCost or 0) + (GodCost or 0) + (SpeedCost or 0) + (LSDCost or 0) + (SteroidsCost or 0) + (HeroinCost or 0) guiSetText(TotalLabel, "$"..TotalCost) end) addEventHandler("onClientGUIClick", guiRoot, function() if source == BuyDrug then local WeedAmount = tonumber(guiGetText(WeedBuyEdit))
  6. هكذا ؟ sec = {{{{{{},{},{},{}}}}}} local sx, sy = guiGetScreenSize() guiSetInputMode("no_binds_when_editing") GUIEditor = { label = {} } DrugUseWindow = guiCreateWindow(227, 111, 357, 332, "", false) guiWindowSetSizable(DrugUseWindow, false) guiSetAlpha(DrugUseWindow, 0.00) guiSetVisible(DrugUseWindow,false) UseDrug = guiCreateButton(335, 370, 118, 73, "", false) guiSetAlpha(UseDrug, 0.00) GUIEditor.label[6] = guiCreateLabel(483, 415, 91, 18, "© Ja[b]er[X]Pro", false,DrugUseWindow) WeedRadioButton = guiCreateCheckBox(236, 160, 189, 15, "Weed (جاذبية منخفضة)", false, DrugUseWindow) guiSetFont(WeedRadioButton, "default-bold-small") guiSetProperty(WeedRadioButton, "NormalTextColour", "FF50DD2F") GodRadioButton = guiCreateCheckBox(236, 194, 189, 15, "God (دم 200)", false, DrugUseWindow) guiSetFont(GodRadioButton, "default-bold-small") guiSetProperty(GodRadioButton, "NormalTextColour", "FFFD0E0E") SpeedRadioButton = guiCreateCheckBox(236, 227, 189, 15, "Speed (سرعة كبيرة)", false, DrugUseWindow) guiSetFont(SpeedRadioButton, "default-bold-small") guiSetProperty(SpeedRadioButton, "NormalTextColour", "FF2ACCE0") LSDRadioButton = guiCreateCheckBox(236, 261, 189, 15, "LSD (تشويش الرؤية)", false, DrugUseWindow) guiSetFont(LSDRadioButton, "default-bold-small") guiSetProperty(LSDRadioButton, "NormalTextColour", "FF93B950") SteroidsRadioButton = guiCreateCheckBox(236, 294, 189, 15, "Steroids (كل 8 تواني +2 دم)", false, DrugUseWindow) guiSetFont(SteroidsRadioButton, "default-bold-small") guiSetProperty(SteroidsRadioButton, "NormalTextColour", "FF1478F4") HeroinRadioButton = guiCreateCheckBox(236, 328, 189, 15, "Herion (يجعل تقشيرك صعب)", false, DrugUseWindow) guiSetFont(HeroinRadioButton, "default-bold-small") guiSetProperty(HeroinRadioButton, "NormalTextColour", "FFEFE718") addEventHandler("onClientRender",root, function() dxDrawLine(228 - 1, 112 - 1, 228 - 1, 146, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(578, 112 - 1, 228 - 1, 112 - 1, tocolor(0, 0, 0, 255), 1, true) dxDrawLine(228 - 1, 146, 578, 146, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(578, 146, 578, 112 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(228, 112, 350, 34, tocolor(224, 226, 28, 255), false) dxDrawLine(229 - 1, 113 - 1, 229 - 1, 443, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(579, 113 - 1, 229 - 1, 113 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(229 - 1, 443, 579, 443, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(579, 443, 579, 113 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(229, 113, 350, 330, tocolor(247, 17, 17, 100), false) dxDrawText("Drug System", 301, 103, 406, 141, tocolor(255, 255, 255, 255), 3.00, "default", "left", "top", false, false, false, false, false) dxDrawRectangle(340, 377, 103, 56, tocolor(239, 231, 24, 170), false) dxDrawText("Use", 368, 387, 473, 444, tocolor(183, 55, 207, 255), 2.00, "default", "left", "top", false, false, false, false, false) end) bindKey("F2", "down", function() if getPedOccupiedVehicle(localPlayer) and not guiGetVisible(DrugUseWindow) then outputChatBox("You can not use drugs while in a vehicle!",source, 255, 0, 0) return end dxDrawLine(228 - 1, 112 - 1, 228 - 1, 146, tocolor(0, 0, 0, 255), 1, true) dxDrawLine(578, 112 - 1, 228 - 1, 112 - 1, tocolor(0, 0, 0, 255), 1, true) dxDrawLine(228 - 1, 146, 578, 146, tocolor(0, 0, 0, 255), 1, true) dxDrawLine(578, 146, 578, 112 - 1, tocolor(0, 0, 0, 255), 1, true) dxDrawRectangle(228, 112, 350, 34, tocolor(224, 226, 28, 255), true) dxDrawLine(229 - 1, 113 - 1, 229 - 1, 443, tocolor(0, 0, 0, 255), 1, true) dxDrawLine(579, 113 - 1, 229 - 1, 113 - 1, tocolor(0, 0, 0, 255), 1, true) dxDrawLine(229 - 1, 443, 579, 443, tocolor(0, 0, 0, 255), 1, true) dxDrawLine(579, 443, 579, 113 - 1, tocolor(0, 0, 0, 255), 1, true) dxDrawRectangle(229, 113, 350, 330, tocolor(247, 17, 17, 100), true) dxDrawText("Drug System", 301, 103, 406, 141, tocolor(255, 255, 255, 255), 3.00, "default", "left", "top", false, false, true, false, false) dxDrawRectangle(340, 377, 103, 56, tocolor(239, 231, 24, 170), true) dxDrawText("Use", 368, 387, 473, 444, tocolor(183, 55, 207, 255), 2.00, "default", "left", "top", false, false, true, false, false) guiSetVisible(DrugUseWindow, not guiGetVisible(DrugUseWindow)) showCursor(guiGetVisible(DrugUseWindow)) end) DrugBuyWindow = guiCreateWindow(sx/2-(550/2), sy/2-(310/2), 600, 310, "Drugs by Price for GTW-RPG", false) guiWindowSetSizable(DrugBuyWindow, false) guiSetVisible(DrugBuyWindow, false) guiSetAlpha(DrugBuyWindow, 0.98) WeedBuyLabel = guiCreateLabel(25, 38, 205, 15, "Weed (Low gravity)", false, DrugBuyWindow) WeedPriceLabel = guiCreateLabel(67.5, 58, 205, 15, "$900", false, DrugBuyWindow) WeedBuyEdit = guiCreateEdit(47.5, 88, 75, 18, "0", false, DrugBuyWindow) guiLabelSetColor(WeedBuyLabel, 251, 213, 3) guiLabelSetColor(WeedPriceLabel, 0, 255, 0) GodBuyLabel = guiCreateLabel(235, 38, 205, 15, "God (Increased max health)", false, DrugBuyWindow) GodPriceLabel = guiCreateLabel(280, 58, 205, 15, "$3000", false, DrugBuyWindow) GodBuyEdit = guiCreateEdit(260, 88, 75, 18, "0", false, DrugBuyWindow) guiLabelSetColor(GodBuyLabel, 0, 253, 5) guiLabelSetColor(GodPriceLabel, 0, 255, 0) -- SpeedBuyLabel = guiCreateLabel(25, 125, 205, 15, "Speed (Faster action)", false, DrugBuyWindow) SpeedPriceLabel = guiCreateLabel(67.5, 145, 205, 15, "$1100", false, DrugBuyWindow) SpeedBuyEdit = guiCreateEdit(47.5, 175, 75, 18, "0", false, DrugBuyWindow) guiLabelSetColor(SpeedBuyLabel, 250, 2, 194) guiLabelSetColor(SpeedPriceLabel, 0, 255, 0) LSDBuyLabel = guiCreateLabel(235, 125, 205, 15, "LSD (Hallucination)", false, DrugBuyWindow) LSDPriceLabel = guiCreateLabel(280, 145, 205, 15, "$2000", false, DrugBuyWindow) LSDBuyEdit = guiCreateEdit(260, 175, 75, 18, "0", false, DrugBuyWindow) guiLabelSetColor(LSDBuyLabel, 0, 248, 251) guiLabelSetColor(LSDPriceLabel, 0, 255, 0) -- SteroidsBuyLabel = guiCreateLabel(25, 212, 205, 15, "Steroids (+2 hp every 8seconds)", false, DrugBuyWindow) SteroidsPriceLabel = guiCreateLabel(67.5, 232, 205, 15, "$800", false, DrugBuyWindow) SteroidsBuyEdit = guiCreateEdit(47.5, 262, 75, 18, "0", false, DrugBuyWindow) guiLabelSetColor(SteroidsBuyLabel, 2, 248, 60) guiLabelSetColor(SteroidsPriceLabel, 0, 255, 0) HeroinBuyLabel = guiCreateLabel(235, 212, 205, 15, "Heroin (Semi invincibility)", false, DrugBuyWindow) HeroinPriceLabel = guiCreateLabel(280, 232, 205, 15, "$4000", false, DrugBuyWindow) HeroinBuyEdit = guiCreateEdit(260, 262, 75, 18, "0", false, DrugBuyWindow) guiLabelSetColor(HeroinBuyLabel, 201, 48, 196) guiLabelSetColor(HeroinPriceLabel, 0, 255, 0) guiCreateStaticImage(450, 50, 125, 125, "drug.png", false, DrugBuyWindow) Total = guiCreateLabel(410, 200, 35, 16, "Total:", false, DrugBuyWindow) guiSetFont(Total, "default-bold-small") TotalLabel = guiCreateLabel(450, 200, 94, 16, "$0", false, DrugBuyWindow) guiSetFont(TotalLabel, "default-bold-small") guiLabelSetColor(TotalLabel, 0, 255, 0) BuyDrug = guiCreateButton(400, 250, 90, 35, "Buy", false, DrugBuyWindow) CloseBuyDrugPanel = guiCreateButton(500, 250, 90, 35, "Close", false, DrugBuyWindow) function showBuyDrug() guiSetText(TotalLabel, "$0") guiSetText(WeedBuyEdit, "0") guiSetText(GodBuyEdit, "0") guiSetText(SpeedBuyEdit, "0") guiSetText(LSDBuyEdit, "0") guiSetText(SteroidsBuyEdit, "0") guiSetText(HeroinBuyEdit, "0") guiSetVisible(DrugBuyWindow, true) showCursor(true) if drugDealer then guiSetText(DrugBuyWindow, "Buying drugs from "..getPlayerName(drugDealer)) else guiSetText(DrugBuyWindow, "Buying drugs from drug Dealer Ped") end end addEventHandler("onClientGUIChanged", guiRoot, function() if drugDealer then if getElementData(drugDealer, "DurgsDealer") then MaxWeed = (getElementData(drugDealer, "Weed") or 0) + (getElementData(localPlayer, "Weed") or 0) MaxGod = (getElementData(drugDealer, "God") or 0) + (getElementData(localPlayer, "God") or 0) MaxSpeed = (getElementData(drugDealer, "Speed") or 0) + (getElementData(localPlayer, "Speed") or 0) MaxLSD = (getElementData(drugDealer, "LSD") or 0) + (getElementData(localPlayer, "LSD") or 0) MaxSteroids = (getElementData(drugDealer, "Steroids") or 0) + (getElementData(localPlayer, "Steroids") or 0) MaxHeroin = (getElementData(drugDealer, "Heroin") or 0) + (getElementData(localPlayer, "Heroin") or 0) else exports.GTWtopbar:dm("This player does not sell drugs anymore!", 255, 0, 0) drugDealer = nil guiSetVisible(DrugBuyWindow, false) showCursor(false) end else MaxWeed = 10000 MaxGod = 10000 MaxSpeed = 10000 MaxLSD = 10000 MaxSteroids = 10000 MaxHeroin = 10000 end local Text = guiGetText(source) local Text = tonumber(Text) if source == WeedBuyEdit then local Amount = getElementData(localPlayer, "Weed") or 0 if not Text then guiSetText(source, "0") elseif Text+Amount > MaxWeed then guiSetText(source, MaxWeed-Amount >= 0 and MaxWeed-Amount or "0") end WeedCost = tonumber(guiGetText(source)) * tonumber(string.sub(guiGetText(WeedPriceLabel), 2)) elseif source == GodBuyEdit then local Amount = getElementData(localPlayer, "God") or 0 if not Text then guiSetText(source, "0") elseif Text+Amount > MaxGod then guiSetText(source, MaxGod-Amount >= 0 and MaxGod-Amount or "0") end GodCost = tonumber(guiGetText(source)) * tonumber(string.sub(guiGetText(GodPriceLabel), 2)) elseif source == SpeedBuyEdit then local Amount = getElementData(localPlayer, "Speed") or 0 if not Text then guiSetText(source, "0") elseif Text+Amount > MaxSpeed then guiSetText(source, MaxSpeed-Amount >= 0 and MaxSpeed-Amount or "0") end SpeedCost = tonumber(guiGetText(source)) * tonumber(string.sub(guiGetText(SpeedPriceLabel), 2)) elseif source == LSDBuyEdit then local Amount = getElementData(localPlayer, "LSD") or 0 if not Text then guiSetText(source, "0") elseif Text+Amount > MaxLSD then guiSetText(source, MaxLSD-Amount >= 0 and MaxLSD-Amount or "0") end LSDCost = tonumber(guiGetText(source)) * tonumber(string.sub(guiGetText(LSDPriceLabel), 2)) elseif source == SteroidsBuyEdit then local Amount = getElementData(localPlayer, "Steroids") or 0 if not Text then guiSetText(source, "0") elseif Text+Amount > MaxSteroids then guiSetText(source, MaxSteroids-Amount >= 0 and MaxSteroids-Amount or "0") end SteroidsCost = tonumber(guiGetText(source)) * tonumber(string.sub(guiGetText(SteroidsPriceLabel), 2)) elseif source == HeroinBuyEdit then local Amount = getElementData(localPlayer, "Heroin") or 0 if not Text then guiSetText(source, "0") elseif Text+Amount > MaxHeroin then guiSetText(source, MaxHeroin-Amount >= 0 and MaxHeroin-Amount or "0") end HeroinCost = tonumber(guiGetText(source)) * tonumber(string.sub(guiGetText(HeroinPriceLabel), 2)) end local TotalCost = (WeedCost or 0) + (GodCost or 0) + (SpeedCost or 0) + (LSDCost or 0) + (SteroidsCost or 0) + (HeroinCost or 0) guiSetText(TotalLabel, "$"..TotalCost) end) addEventHandler("onClientGUIClick", guiRoot, function() if source == BuyDrug then local WeedAmount = tonumber(guiGetText(WeedBuyEdit))
  7. السلام عليكم روحمة الله وبركاته انا معي لوحة مخدرات جوي عدلتها لدي اكس لكن هناك مشاكل sec = {{{{{{},{},{},{}}}}}} local sx, sy = guiGetScreenSize() guiSetInputMode("no_binds_when_editing") GUIEditor = { label = {} } DrugUseWindow = guiCreateWindow(227, 111, 357, 332, "", false) guiWindowSetSizable(DrugUseWindow, false) guiSetAlpha(DrugUseWindow, 0.00) guiSetVisible(DrugUseWindow,false) UseDrug = guiCreateButton(335, 370, 118, 73, "", false) guiSetAlpha(UseDrug, 0.00) GUIEditor.label[6] = guiCreateLabel(483, 415, 91, 18, "© Ja[b]er[X]Pro", false,DrugUseWindow) WeedRadioButton = guiCreateCheckBox(236, 160, 189, 15, "Weed (جاذبية منخفضة)", false, DrugUseWindow) guiSetFont(WeedRadioButton, "default-bold-small") guiSetProperty(WeedRadioButton, "NormalTextColour", "FF50DD2F") GodRadioButton = guiCreateCheckBox(236, 194, 189, 15, "God (دم 200)", false, DrugUseWindow) guiSetFont(GodRadioButton, "default-bold-small") guiSetProperty(GodRadioButton, "NormalTextColour", "FFFD0E0E") SpeedRadioButton = guiCreateCheckBox(236, 227, 189, 15, "Speed (سرعة كبيرة)", false, DrugUseWindow) guiSetFont(SpeedRadioButton, "default-bold-small") guiSetProperty(SpeedRadioButton, "NormalTextColour", "FF2ACCE0") LSDRadioButton = guiCreateCheckBox(236, 261, 189, 15, "LSD (تشويش الرؤية)", false, DrugUseWindow) guiSetFont(LSDRadioButton, "default-bold-small") guiSetProperty(LSDRadioButton, "NormalTextColour", "FF93B950") SteroidsRadioButton = guiCreateCheckBox(236, 294, 189, 15, "Steroids (كل 8 تواني +2 دم)", false, DrugUseWindow) guiSetFont(SteroidsRadioButton, "default-bold-small") guiSetProperty(SteroidsRadioButton, "NormalTextColour", "FF1478F4") HeroinRadioButton = guiCreateCheckBox(236, 328, 189, 15, "Herion (يجعل تقشيرك صعب)", false, DrugUseWindow) guiSetFont(HeroinRadioButton, "default-bold-small") guiSetProperty(HeroinRadioButton, "NormalTextColour", "FFEFE718") bindKey("F2", "down", function() if getPedOccupiedVehicle(localPlayer) and not guiGetVisible(DrugUseWindow) then outputChatBox("You can not use drugs while in a vehicle!",source, 255, 0, 0) return end dxDrawLine(228 - 1, 112 - 1, 228 - 1, 146, tocolor(0, 0, 0, 255), 1, true) dxDrawLine(578, 112 - 1, 228 - 1, 112 - 1, tocolor(0, 0, 0, 255), 1, true) dxDrawLine(228 - 1, 146, 578, 146, tocolor(0, 0, 0, 255), 1, true) dxDrawLine(578, 146, 578, 112 - 1, tocolor(0, 0, 0, 255), 1, true) dxDrawRectangle(228, 112, 350, 34, tocolor(224, 226, 28, 255), true) dxDrawLine(229 - 1, 113 - 1, 229 - 1, 443, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(579, 113 - 1, 229 - 1, 113 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(229 - 1, 443, 579, 443, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(579, 443, 579, 113 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(229, 113, 350, 330, tocolor(247, 17, 17, 100), false) dxDrawText("Drug System", 301, 103, 406, 141, tocolor(255, 255, 255, 255), 3.00, "default", "left", "top", false, false, true, false, false) dxDrawRectangle(340, 377, 103, 56, tocolor(239, 231, 24, 170), true) dxDrawText("Use", 368, 387, 473, 444, tocolor(183, 55, 207, 255), 2.00, "default", "left", "top", false, false, true, false, false) guiSetVisible(DrugUseWindow, not guiGetVisible(DrugUseWindow)) showCursor(guiGetVisible(DrugUseWindow)) end) DrugBuyWindow = guiCreateWindow(sx/2-(550/2), sy/2-(310/2), 600, 310, "Drugs by Price for GTW-RPG", false) guiWindowSetSizable(DrugBuyWindow, false) guiSetVisible(DrugBuyWindow, false) guiSetAlpha(DrugBuyWindow, 0.98) WeedBuyLabel = guiCreateLabel(25, 38, 205, 15, "Weed (Low gravity)", false, DrugBuyWindow) WeedPriceLabel = guiCreateLabel(67.5, 58, 205, 15, "$900", false, DrugBuyWindow) WeedBuyEdit = guiCreateEdit(47.5, 88, 75, 18, "0", false, DrugBuyWindow) guiLabelSetColor(WeedBuyLabel, 251, 213, 3) guiLabelSetColor(WeedPriceLabel, 0, 255, 0) GodBuyLabel = guiCreateLabel(235, 38, 205, 15, "God (Increased max health)", false, DrugBuyWindow) GodPriceLabel = guiCreateLabel(280, 58, 205, 15, "$3000", false, DrugBuyWindow) GodBuyEdit = guiCreateEdit(260, 88, 75, 18, "0", false, DrugBuyWindow) guiLabelSetColor(GodBuyLabel, 0, 253, 5) guiLabelSetColor(GodPriceLabel, 0, 255, 0) -- SpeedBuyLabel = guiCreateLabel(25, 125, 205, 15, "Speed (Faster action)", false, DrugBuyWindow) SpeedPriceLabel = guiCreateLabel(67.5, 145, 205, 15, "$1100", false, DrugBuyWindow) SpeedBuyEdit = guiCreateEdit(47.5, 175, 75, 18, "0", false, DrugBuyWindow) guiLabelSetColor(SpeedBuyLabel, 250, 2, 194) guiLabelSetColor(SpeedPriceLabel, 0, 255, 0) LSDBuyLabel = guiCreateLabel(235, 125, 205, 15, "LSD (Hallucination)", false, DrugBuyWindow) LSDPriceLabel = guiCreateLabel(280, 145, 205, 15, "$2000", false, DrugBuyWindow) LSDBuyEdit = guiCreateEdit(260, 175, 75, 18, "0", false, DrugBuyWindow) guiLabelSetColor(LSDBuyLabel, 0, 248, 251) guiLabelSetColor(LSDPriceLabel, 0, 255, 0) -- SteroidsBuyLabel = guiCreateLabel(25, 212, 205, 15, "Steroids (+2 hp every 8seconds)", false, DrugBuyWindow) SteroidsPriceLabel = guiCreateLabel(67.5, 232, 205, 15, "$800", false, DrugBuyWindow) SteroidsBuyEdit = guiCreateEdit(47.5, 262, 75, 18, "0", false, DrugBuyWindow) guiLabelSetColor(SteroidsBuyLabel, 2, 248, 60) guiLabelSetColor(SteroidsPriceLabel, 0, 255, 0) HeroinBuyLabel = guiCreateLabel(235, 212, 205, 15, "Heroin (Semi invincibility)", false, DrugBuyWindow) HeroinPriceLabel = guiCreateLabel(280, 232, 205, 15, "$4000", false, DrugBuyWindow) HeroinBuyEdit = guiCreateEdit(260, 262, 75, 18, "0", false, DrugBuyWindow) guiLabelSetColor(HeroinBuyLabel, 201, 48, 196) guiLabelSetColor(HeroinPriceLabel, 0, 255, 0) guiCreateStaticImage(450, 50, 125, 125, "drug.png", false, DrugBuyWindow) Total = guiCreateLabel(410, 200, 35, 16, "Total:", false, DrugBuyWindow) guiSetFont(Total, "default-bold-small") TotalLabel = guiCreateLabel(450, 200, 94, 16, "$0", false, DrugBuyWindow) guiSetFont(TotalLabel, "default-bold-small") guiLabelSetColor(TotalLabel, 0, 255, 0) BuyDrug = guiCreateButton(400, 250, 90, 35, "Buy", false, DrugBuyWindow) CloseBuyDrugPanel = guiCreateButton(500, 250, 90, 35, "Close", false, DrugBuyWindow) function showBuyDrug() guiSetText(TotalLabel, "$0") guiSetText(WeedBuyEdit, "0") guiSetText(GodBuyEdit, "0") guiSetText(SpeedBuyEdit, "0") guiSetText(LSDBuyEdit, "0") guiSetText(SteroidsBuyEdit, "0") guiSetText(HeroinBuyEdit, "0") guiSetVisible(DrugBuyWindow, true) showCursor(true) if drugDealer then guiSetText(DrugBuyWindow, "Buying drugs from "..getPlayerName(drugDealer)) else guiSetText(DrugBuyWindow, "Buying drugs from drug Dealer Ped") end end addEventHandler("onClientGUIChanged", guiRoot, function() if drugDealer then if getElementData(drugDealer, "DurgsDealer") then MaxWeed = (getElementData(drugDealer, "Weed") or 0) + (getElementData(localPlayer, "Weed") or 0) MaxGod = (getElementData(drugDealer, "God") or 0) + (getElementData(localPlayer, "God") or 0) MaxSpeed = (getElementData(drugDealer, "Speed") or 0) + (getElementData(localPlayer, "Speed") or 0) MaxLSD = (getElementData(drugDealer, "LSD") or 0) + (getElementData(localPlayer, "LSD") or 0) MaxSteroids = (getElementData(drugDealer, "Steroids") or 0) + (getElementData(localPlayer, "Steroids") or 0) MaxHeroin = (getElementData(drugDealer, "Heroin") or 0) + (getElementData(localPlayer, "Heroin") or 0) else exports.GTWtopbar:dm("This player does not sell drugs anymore!", 255, 0, 0) drugDealer = nil guiSetVisible(DrugBuyWindow, false) showCursor(false) end else MaxWeed = 10000 MaxGod = 10000 MaxSpeed = 10000 MaxLSD = 10000 MaxSteroids = 10000 MaxHeroin = 10000 end local Text = guiGetText(source) local Text = tonumber(Text) if source == WeedBuyEdit then local Amount = getElementData(localPlayer, "Weed") or 0 if not Text then guiSetText(source, "0") elseif Text+Amount > MaxWeed then guiSetText(source, MaxWeed-Amount >= 0 and MaxWeed-Amount or "0") end WeedCost = tonumber(guiGetText(source)) * tonumber(string.sub(guiGetText(WeedPriceLabel), 2)) elseif source == GodBuyEdit then local Amount = getElementData(localPlayer, "God") or 0 if not Text then guiSetText(source, "0") elseif Text+Amount > MaxGod then guiSetText(source, MaxGod-Amount >= 0 and MaxGod-Amount or "0") end GodCost = tonumber(guiGetText(source)) * tonumber(string.sub(guiGetText(GodPriceLabel), 2)) elseif source == SpeedBuyEdit then local Amount = getElementData(localPlayer, "Speed") or 0 if not Text then guiSetText(source, "0") elseif Text+Amount > MaxSpeed then guiSetText(source, MaxSpeed-Amount >= 0 and MaxSpeed-Amount or "0") end SpeedCost = tonumber(guiGetText(source)) * tonumber(string.sub(guiGetText(SpeedPriceLabel), 2)) elseif source == LSDBuyEdit then local Amount = getElementData(localPlayer, "LSD") or 0 if not Text then guiSetText(source, "0") elseif Text+Amount > MaxLSD then guiSetText(source, MaxLSD-Amount >= 0 and MaxLSD-Amount or "0") end LSDCost = tonumber(guiGetText(source)) * tonumber(string.sub(guiGetText(LSDPriceLabel), 2)) elseif source == SteroidsBuyEdit then local Amount = getElementData(localPlayer, "Steroids") or 0 if not Text then guiSetText(source, "0") elseif Text+Amount > MaxSteroids then guiSetText(source, MaxSteroids-Amount >= 0 and MaxSteroids-Amount or "0") end SteroidsCost = tonumber(guiGetText(source)) * tonumber(string.sub(guiGetText(SteroidsPriceLabel), 2)) elseif source == HeroinBuyEdit then local Amount = getElementData(localPlayer, "Heroin") or 0 if not Text then guiSetText(source, "0") elseif Text+Amount > MaxHeroin then guiSetText(source, MaxHeroin-Amount >= 0 and MaxHeroin-Amount or "0") end HeroinCost = tonumber(guiGetText(source)) * tonumber(string.sub(guiGetText(HeroinPriceLabel), 2)) end local TotalCost = (WeedCost or 0) + (GodCost or 0) + (SpeedCost or 0) + (LSDCost or 0) + (SteroidsCost or 0) + (HeroinCost or 0) guiSetText(TotalLabel, "$"..TotalCost) end) addEventHandler("onClientGUIClick", guiRoot, function() if source == BuyDrug then local WeedAmount = tonumber(guiGetText(WeedBuyEdit)) local GodAmount = tonumber(guiGetText(GodBuyEdit)) local SpeedAmount = tonumber(guiGetText(SpeedBuyEdit)) local LSDAmount = tonumber(guiGetText(LSDBuyEdit)) local SteroidsAmount = tonumber(guiGetText(SteroidsBuyEdit)) local HeroinAmount = tonumber(guiGetText(HeroinBuyEdit)) local Cost = tonumber(string.sub(guiGetText(TotalLabel), 2)) if Cost > 0 then if drugDealer then if getElementData(drugDealer, "DurgsDealer") then MaxWeed = getElementData(drugDealer, "Weed") or 0 MaxGod = getElementData(drugDealer, "God") or 0 MaxSpeed = getElementData(drugDealer, "Speed") or 0 MaxLSD = getElementData(drugDealer, "LSD") or 0 MaxSteroids = getElementData(drugDealer, "Steroids") or 0 MaxHeroin = getElementData(drugDealer, "Heroin") or 0 if MaxWeed >= WeedAmount and MaxGod >= GodAmount and MaxSpeed >= SpeedAmount and MaxLSD >= LSDAmount and MaxSteroids >= SteroidsAmount and MaxHeroin >= HeroinAmount then
  8. السلام عليكم روحمة الله وبركاته انا معي لوحة مخدرات جوي عدلتها لدي اكس لكن هناك مشاكل sec = {{{{{{},{},{},{}}}}}} local sx, sy = guiGetScreenSize() guiSetInputMode("no_binds_when_editing") GUIEditor = { label = {} } DrugUseWindow = guiCreateWindow(227, 111, 357, 332, "", false) guiWindowSetSizable(DrugUseWindow, false) guiSetAlpha(DrugUseWindow, 0.00) guiSetVisible(DrugUseWindow,false) UseDrug = guiCreateButton(335, 370, 118, 73, "", false) guiSetAlpha(UseDrug, 0.00) GUIEditor.label[6] = guiCreateLabel(483, 415, 91, 18, "© Ja[b]er[X]Pro", false,DrugUseWindow) WeedRadioButton = guiCreateCheckBox(236, 160, 189, 15, "Weed (جاذبية منخفضة)", false, DrugUseWindow) guiSetFont(WeedRadioButton, "default-bold-small") guiSetProperty(WeedRadioButton, "NormalTextColour", "FF50DD2F") GodRadioButton = guiCreateCheckBox(236, 194, 189, 15, "God (دم 200)", false, DrugUseWindow) guiSetFont(GodRadioButton, "default-bold-small") guiSetProperty(GodRadioButton, "NormalTextColour", "FFFD0E0E") SpeedRadioButton = guiCreateCheckBox(236, 227, 189, 15, "Speed (سرعة كبيرة)", false, DrugUseWindow) guiSetFont(SpeedRadioButton, "default-bold-small") guiSetProperty(SpeedRadioButton, "NormalTextColour", "FF2ACCE0") LSDRadioButton = guiCreateCheckBox(236, 261, 189, 15, "LSD (تشويش الرؤية)", false, DrugUseWindow) guiSetFont(LSDRadioButton, "default-bold-small") guiSetProperty(LSDRadioButton, "NormalTextColour", "FF93B950") SteroidsRadioButton = guiCreateCheckBox(236, 294, 189, 15, "Steroids (كل 8 تواني +2 دم)", false, DrugUseWindow) guiSetFont(SteroidsRadioButton, "default-bold-small") guiSetProperty(SteroidsRadioButton, "NormalTextColour", "FF1478F4") HeroinRadioButton = guiCreateCheckBox(236, 328, 189, 15, "Herion (يجعل تقشيرك صعب)", false, DrugUseWindow) guiSetFont(HeroinRadioButton, "default-bold-small") guiSetProperty(HeroinRadioButton, "NormalTextColour", "FFEFE718") bindKey("F2", "down", function() if getPedOccupiedVehicle(localPlayer) and not guiGetVisible(DrugUseWindow) then outputChatBox("You can not use drugs while in a vehicle!",source, 255, 0, 0) return end dxDrawLine(228 - 1, 112 - 1, 228 - 1, 146, tocolor(0, 0, 0, 255), 1, true) dxDrawLine(578, 112 - 1, 228 - 1, 112 - 1, tocolor(0, 0, 0, 255), 1, true) dxDrawLine(228 - 1, 146, 578, 146, tocolor(0, 0, 0, 255), 1, true) dxDrawLine(578, 146, 578, 112 - 1, tocolor(0, 0, 0, 255), 1, true) dxDrawRectangle(228, 112, 350, 34, tocolor(224, 226, 28, 255), true) dxDrawLine(229 - 1, 113 - 1, 229 - 1, 443, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(579, 113 - 1, 229 - 1, 113 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(229 - 1, 443, 579, 443, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(579, 443, 579, 113 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(229, 113, 350, 330, tocolor(247, 17, 17, 100), false) dxDrawText("Drug System", 301, 103, 406, 141, tocolor(255, 255, 255, 255), 3.00, "default", "left", "top", false, false, true, false, false) dxDrawRectangle(340, 377, 103, 56, tocolor(239, 231, 24, 170), true) dxDrawText("Use", 368, 387, 473, 444, tocolor(183, 55, 207, 255), 2.00, "default", "left", "top", false, false, true, false, false) guiSetVisible(DrugUseWindow, not guiGetVisible(DrugUseWindow)) showCursor(guiGetVisible(DrugUseWindow)) end) DrugBuyWindow = guiCreateWindow(sx/2-(550/2), sy/2-(310/2), 600, 310, "Drugs by Price for GTW-RPG", false) guiWindowSetSizable(DrugBuyWindow, false) guiSetVisible(DrugBuyWindow, false) guiSetAlpha(DrugBuyWindow, 0.98) WeedBuyLabel = guiCreateLabel(25, 38, 205, 15, "Weed (Low gravity)", false, DrugBuyWindow) WeedPriceLabel = guiCreateLabel(67.5, 58, 205, 15, "$900", false, DrugBuyWindow) WeedBuyEdit = guiCreateEdit(47.5, 88, 75, 18, "0", false, DrugBuyWindow) guiLabelSetColor(WeedBuyLabel, 251, 213, 3) guiLabelSetColor(WeedPriceLabel, 0, 255, 0) GodBuyLabel = guiCreateLabel(235, 38, 205, 15, "God (Increased max health)", false, DrugBuyWindow) GodPriceLabel = guiCreateLabel(280, 58, 205, 15, "$3000", false, DrugBuyWindow) GodBuyEdit = guiCreateEdit(260, 88, 75, 18, "0", false, DrugBuyWindow) guiLabelSetColor(GodBuyLabel, 0, 253, 5) guiLabelSetColor(GodPriceLabel, 0, 255, 0) -- SpeedBuyLabel = guiCreateLabel(25, 125, 205, 15, "Speed (Faster action)", false, DrugBuyWindow) SpeedPriceLabel = guiCreateLabel(67.5, 145, 205, 15, "$1100", false, DrugBuyWindow) SpeedBuyEdit = guiCreateEdit(47.5, 175, 75, 18, "0", false, DrugBuyWindow) guiLabelSetColor(SpeedBuyLabel, 250, 2, 194) guiLabelSetColor(SpeedPriceLabel, 0, 255, 0) LSDBuyLabel = guiCreateLabel(235, 125, 205, 15, "LSD (Hallucination)", false, DrugBuyWindow) LSDPriceLabel = guiCreateLabel(280, 145, 205, 15, "$2000", false, DrugBuyWindow) LSDBuyEdit = guiCreateEdit(260, 175, 75, 18, "0", false, DrugBuyWindow) guiLabelSetColor(LSDBuyLabel, 0, 248, 251) guiLabelSetColor(LSDPriceLabel, 0, 255, 0) -- SteroidsBuyLabel = guiCreateLabel(25, 212, 205, 15, "Steroids (+2 hp every 8seconds)", false, DrugBuyWindow) SteroidsPriceLabel = guiCreateLabel(67.5, 232, 205, 15, "$800", false, DrugBuyWindow) SteroidsBuyEdit = guiCreateEdit(47.5, 262, 75, 18, "0", false, DrugBuyWindow) guiLabelSetColor(SteroidsBuyLabel, 2, 248, 60) guiLabelSetColor(SteroidsPriceLabel, 0, 255, 0) HeroinBuyLabel = guiCreateLabel(235, 212, 205, 15, "Heroin (Semi invincibility)", false, DrugBuyWindow) HeroinPriceLabel = guiCreateLabel(280, 232, 205, 15, "$4000", false, DrugBuyWindow) HeroinBuyEdit = guiCreateEdit(260, 262, 75, 18, "0", false, DrugBuyWindow) guiLabelSetColor(HeroinBuyLabel, 201, 48, 196) guiLabelSetColor(HeroinPriceLabel, 0, 255, 0) guiCreateStaticImage(450, 50, 125, 125, "drug.png", false, DrugBuyWindow) Total = guiCreateLabel(410, 200, 35, 16, "Total:", false, DrugBuyWindow) guiSetFont(Total, "default-bold-small") TotalLabel = guiCreateLabel(450, 200, 94, 16, "$0", false, DrugBuyWindow) guiSetFont(TotalLabel, "default-bold-small") guiLabelSetColor(TotalLabel, 0, 255, 0) BuyDrug = guiCreateButton(400, 250, 90, 35, "Buy", false, DrugBuyWindow) CloseBuyDrugPanel = guiCreateButton(500, 250, 90, 35, "Close", false, DrugBuyWindow) function showBuyDrug() guiSetText(TotalLabel, "$0") guiSetText(WeedBuyEdit, "0") guiSetText(GodBuyEdit, "0") guiSetText(SpeedBuyEdit, "0") guiSetText(LSDBuyEdit, "0") guiSetText(SteroidsBuyEdit, "0") guiSetText(HeroinBuyEdit, "0") guiSetVisible(DrugBuyWindow, true) showCursor(true) if drugDealer then guiSetText(DrugBuyWindow, "Buying drugs from "..getPlayerName(drugDealer)) else guiSetText(DrugBuyWindow, "Buying drugs from drug Dealer Ped") end end addEventHandler("onClientGUIChanged", guiRoot, function() if drugDealer then if getElementData(drugDealer, "DurgsDealer") then MaxWeed = (getElementData(drugDealer, "Weed") or 0) + (getElementData(localPlayer, "Weed") or 0) MaxGod = (getElementData(drugDealer, "God") or 0) + (getElementData(localPlayer, "God") or 0) MaxSpeed = (getElementData(drugDealer, "Speed") or 0) + (getElementData(localPlayer, "Speed") or 0) MaxLSD = (getElementData(drugDealer, "LSD") or 0) + (getElementData(localPlayer, "LSD") or 0) MaxSteroids = (getElementData(drugDealer, "Steroids") or 0) + (getElementData(localPlayer, "Steroids") or 0) MaxHeroin = (getElementData(drugDealer, "Heroin") or 0) + (getElementData(localPlayer, "Heroin") or 0) else exports.GTWtopbar:dm("This player does not sell drugs anymore!", 255, 0, 0) drugDealer = nil guiSetVisible(DrugBuyWindow, false) showCursor(false) end else MaxWeed = 10000 MaxGod = 10000 MaxSpeed = 10000 MaxLSD = 10000 MaxSteroids = 10000 MaxHeroin = 10000 end local Text = guiGetText(source) local Text = tonumber(Text) if source == WeedBuyEdit then local Amount = getElementData(localPlayer, "Weed") or 0 if not Text then guiSetText(source, "0") elseif Text+Amount > MaxWeed then guiSetText(source, MaxWeed-Amount >= 0 and MaxWeed-Amount or "0") end WeedCost = tonumber(guiGetText(source)) * tonumber(string.sub(guiGetText(WeedPriceLabel), 2)) elseif source == GodBuyEdit then local Amount = getElementData(localPlayer, "God") or 0 if not Text then guiSetText(source, "0") elseif Text+Amount > MaxGod then guiSetText(source, MaxGod-Amount >= 0 and MaxGod-Amount or "0") end GodCost = tonumber(guiGetText(source)) * tonumber(string.sub(guiGetText(GodPriceLabel), 2)) elseif source == SpeedBuyEdit then local Amount = getElementData(localPlayer, "Speed") or 0 if not Text then guiSetText(source, "0") elseif Text+Amount > MaxSpeed then guiSetText(source, MaxSpeed-Amount >= 0 and MaxSpeed-Amount or "0") end SpeedCost = tonumber(guiGetText(source)) * tonumber(string.sub(guiGetText(SpeedPriceLabel), 2)) elseif source == LSDBuyEdit then local Amount = getElementData(localPlayer, "LSD") or 0 if not Text then guiSetText(source, "0") elseif Text+Amount > MaxLSD then guiSetText(source, MaxLSD-Amount >= 0 and MaxLSD-Amount or "0") end LSDCost = tonumber(guiGetText(source)) * tonumber(string.sub(guiGetText(LSDPriceLabel), 2)) elseif source == SteroidsBuyEdit then local Amount = getElementData(localPlayer, "Steroids") or 0 if not Text then guiSetText(source, "0") elseif Text+Amount > MaxSteroids then guiSetText(source, MaxSteroids-Amount >= 0 and MaxSteroids-Amount or "0") end SteroidsCost = tonumber(guiGetText(source)) * tonumber(string.sub(guiGetText(SteroidsPriceLabel), 2)) elseif source == HeroinBuyEdit then local Amount = getElementData(localPlayer, "Heroin") or 0 if not Text then guiSetText(source, "0") elseif Text+Amount > MaxHeroin then guiSetText(source, MaxHeroin-Amount >= 0 and MaxHeroin-Amount or "0") end HeroinCost = tonumber(guiGetText(source)) * tonumber(string.sub(guiGetText(HeroinPriceLabel), 2)) end local TotalCost = (WeedCost or 0) + (GodCost or 0) + (SpeedCost or 0) + (LSDCost or 0) + (SteroidsCost or 0) + (HeroinCost or 0) guiSetText(TotalLabel, "$"..TotalCost) end) addEventHandler("onClientGUIClick", guiRoot, function() if source == BuyDrug then local WeedAmount = tonumber(guiGetText(WeedBuyEdit)) local GodAmount = tonumber(guiGetText(GodBuyEdit)) local SpeedAmount = tonumber(guiGetText(SpeedBuyEdit)) local LSDAmount = tonumber(guiGetText(LSDBuyEdit)) local SteroidsAmount = tonumber(guiGetText(SteroidsBuyEdit)) local HeroinAmount = tonumber(guiGetText(HeroinBuyEdit)) local Cost = tonumber(string.sub(guiGetText(TotalLabel), 2)) if Cost > 0 then if drugDealer then if getElementData(drugDealer, "DurgsDealer") then MaxWeed = getElementData(drugDealer, "Weed") or 0 MaxGod = getElementData(drugDealer, "God") or 0 MaxSpeed = getElementData(drugDealer, "Speed") or 0 MaxLSD = getElementData(drugDealer, "LSD") or 0 MaxSteroids = getElementData(drugDealer, "Steroids") or 0 MaxHeroin = getElementData(drugDealer, "Heroin") or 0 if MaxWeed >= WeedAmount and MaxGod >= GodAmount and MaxSpeed >= SpeedAmount and MaxLSD >= LSDAmount and MaxSteroids >= SteroidsAmount and MaxHeroin >= HeroinAmount then
  9. مشكلة عند الضغط على زر البيع ما يصير شيئ 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
  10. مشكلة عند الضغط على زر البيع ما يصير شيئ 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
  11. الكول شيب له فوائدد كثيرة مثل عمل كول شيب كمنطقة حماية للزومبي او للهجولة او عمل ارض احتلال حرب عصابات setPedFrozen هو للبيد فقط وليس للاعب لذلك استخدم setElementFrozen
  12. سؤال ما فائدة function setText(Text) VarG = Text VarP = Text end setText('Soking')
  13. حذف ولا مسح مسح ولا ابقاء
×
×
  • Create New...