Jump to content

مساعده في تعديل كود بسيط


Recommended Posts

عندي كود حق مود هو يفتح بزر بس انا ابغاه يفتح بكلمه وهذي اكواد الكلنت


 function guiCreateWindow(x2, y2, width2, height2, titleBarText2, relative2)
  local mainBackground = guiCreateStaticImage(x2, y2, width2, height2, "iMr.noovl.png", relative2)
  local mainBackgroundLabel = guiCreateLabel(0, 0, 0, 0, titleBarText2, false, mainBackground2)
  guiSetEnabled(mainBackgroundLabel, false)
  return mainBackground
end

addEventHandler("onClientResourceStart", resourceRoot,
    function()
ShieldTXD = engineLoadTXD("sh/riot_shield.txd")
engineImportTXD(ShieldTXD, 1631)
ShieldDFF = engineLoadDFF("sh/riot_shield.dff", 487)
engineReplaceModel(ShieldDFF, 1631)
ShieldCOL = engineLoadCOL( "sh/riot_shield.col" )
engineReplaceCOL(ShieldCOL, 1631)
ShopPanel = guiCreateWindow(0.14, 0.15, 0.73, 0.70, "=[  مود ارسال الفلوس  ]=", true)
guiWindowSetSizable(ShopPanel, false)
guiSetVisible(ShopPanel, false)
TabPanel = guiCreateTabPanel(9, 25, 565, 382, false, ShopPanel)
SendButton2 = guiCreateLabel(319, 3, 185, 16, "* The Less Money for Send", false, ShopPanel)
guiSetProperty(SendButton2, "NormalTextColour", "FF41FF00")


Tab5 = guiCreateTab("Send Money", TabPanel)
gridlist = guiCreateGridList(10, 43, 215, 305, false, Tab5)
guiGridListAddColumn(gridlist, "Players", 0.85)
edit1 = guiCreateEdit(10, 8, 188, 28, "", false, Tab5)
edit2 = guiCreateEdit(285, 150, 253, 34, "", false, Tab5)
labelmoney = guiCreateLabel(235, 159, 50, 15, "Money :", false, Tab5)
SendButton = guiCreateButton(347, 228, 128, 35, "Send", false, Tab5)	
 setElementData(SendButton, "tooltip-text", "ارسال", false)
guiSetProperty(SendButton, "NormalTextColour", "FF000BFF")
guiSetProperty(SendButton, "NormalTextColour", "FF0005FF")
guiSetProperty(SendButton, "NormalTextColour", "FF41FF00")
guiSetProperty(SendButton, "NormalTextColour", "FFFF00FC")
img = guiCreateStaticImage(207, 8, 18, 25, "images/Search.png", false, Tab5)
infoforsend = guiCreateLabel(319, 194, 185, 16, "* The Less Money for Send 200$", false, Tab5)
namep = guiCreateLabel(265, 49, 235, 17, "Name Player : N/A", false, Tab5)
moneyp = guiCreateLabel(265, 76, 148, 15, "Player Money : N/A", false, Tab5)
forinfobox = guiCreateLabel(258, 24, 246, 15, "---------------------------- INFO ----------------------------", false, Tab5) 
forinfobox2 = guiCreateLabel(258, 101, 246, 15, "---------------------------- INFO ----------------------------", false, Tab5)
guiSetProperty(forinfobox2, "NormalTextColour", "FF000BFF")
guiSetProperty(forinfobox, "NormalTextColour", "FF000BFF")
guiSetProperty(forinfobox3, "NormalTextColour", "FF000BFF")
guiSetProperty(forinfobox4, "NormalTextColour", "FF000BFF")
forinfobox3 = guiCreateLabel(258, 34, 15, 71, "|\n|\n|\n|\n|\n|\n|\n|", false, Tab5)
forinfobox4 = guiCreateLabel(503, 35, 15, 71, "|\n|\n|\n|\n|\n|\n|\n|", false, Tab5)
addEventHandler("onClientGUIClick",root,function()
local sel = guiGridListGetSelectedItem(gridlist)
local data = guiGridListGetItemText(gridlist, guiGridListGetSelectedItem(gridlist), 1)
if ( source == gridlist ) then
if ( sel ~= -1 ) then
guiSetText(namep,"Name Player : "..data.."")
triggerServerEvent("onGetMoney",localPlayer,data)
end
elseif ( source == SendButton ) then
if ( sel ~= -1 ) then
if ( guiGetText(edit2) ~= "" or guiGetText(edit2) ~= " " or guiGetText(edit2) ~= false ) then
triggerServerEvent("sendMoney",localPlayer,data,guiGetText(edit2))
else
outputChatBox("* Please Write a Money",255,0,0,true)
end
else
outputChatBox("* Please Select a Player",255,0,0,true)
end
end
end)

addEventHandler("onClientGUIChanged",edit1,
	function ()
	local text = guiGetText(edit1)
	if ( text == "" ) then
	putplayers()
	else
	guiGridListClear(gridlist)
    for i,v in ipairs(getElementsByType("player")) do
    if string.find(getPlayerName(v), guiGetText(edit1)) then
	local row = guiGridListAddRow(gridlist)
	guiGridListSetItemText(gridlist, row, 1, getPlayerName(v), false, false)
	end
	end
	end
	end
)
end)

bindKey("F10","down",function ()
guiSetVisible(ShopPanel, not guiGetVisible(ShopPanel))
showCursor(guiGetVisible(ShopPanel))
putplayers()
end)

function putplayers()
if ( guiGetVisible(ShopPanel) ) then
guiGridListClear(gridlist)
for i,v in ipairs ( getElementsByType("player") ) do
local row = guiGridListAddRow(gridlist)
guiGridListSetItemText(gridlist, row, 1, getPlayerName(v), false, false)
end
end
end

addEvent("CountF", true)
addEventHandler("CountF", root, function(player)
  sw, sh = guiGetScreenSize()
  n = 35
  count = "" .. n .. ""
  x, y = sw / 2, sh / 2
  pName = getPlayerName(player)
  playerName = string.gsub(pName, "#%x%x%x%x%x%x", "")
  txt = function()
    dxDrawText("You Have Been Frozen By [  " .. string.gsub(getPlayerName(player), "#%x%x%x%x%x%x", "") .. " ] - You Will Be UnFrozen After : [ " .. count .. " ]", x - 650, y - 500, sw, sh, tocolor(255, 255, 0, 255), 1, "pricedown", "center", "center", false, false, false)
  end
  addEventHandler("onClientRender", root, txt)
  Plus = function()
    n = n - 1
    count = "" .. n .. ""
    playSoundFrontEnd(20)
    if n == 0 then
      setTimer(function()
      removeEventHandler("onClientRender", root, txt)
      playSoundFrontEnd(45)
      triggerServerEvent("endFreeze", getLocalPlayer())
    end, 1000, 1)
    end
  end
  setTimer(Plus, 1000, 35)
end)

addEvent("setMoney", true)
addEventHandler("setMoney", root, function(theMoney)
guiSetText(moneyp,"Player Money : "..theMoney.."")
end)

fileDelete("c.lua")

 

Link to comment
53 minutes ago, #\_oskar_/# said:

addCommandHandler('ss',function ()
guiSetVisible(ShopPanel, not guiGetVisible(ShopPanel))
showCursor(guiGetVisible(ShopPanel))
putplayers()
end)

اكتب ب اف 8 -- ss

كفو زبطت بس عندي اكواد ثانيه ابيك تعدلها كمان

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...