Jump to content

| مساعدةه |


Recommended Posts


هاي لوحه اعملتها بس فيها مشكله , + ضفت عليها انوو لاعب يحدد اسم لاعب ويرسلوو فلوس , بس معي تزبط وزر ارسال لفلوس معرف 
ب button 1 
ممككن مساعده ي شباب #


---- Client --------

GUIEditor = {
    gridlist = {},
    window = {}
}
        wnd = guiCreateWindow(396, 168, 537, 470, "", false)
        guiWindowSetSizable(wnd, false)
        gridlist = guiCreateGridList(10, 60, 224, 398, false, wnd)
        guiGridListAddColumn(gridlist, "Player", 0.9)
        edit = guiCreateEdit(10, 24, 179, 30, "", false, wnd)    
		iamge = guiCreateStaticImage(193, 30, 35, 17, "search.png", false, wnd)
        button1 = guiCreateButton(240, 60, 140, 43, "Soon..", false, wnd)
        button = guiCreateButton(390, 60, 137, 43, "Soon..1", false, wnd)
		
        guiSetVisible (wnd,false)
        guiWindowSetMovable(wnd,false)
        guiWindowSetSizable(wnd,false)
        guiSetVisible(wnd,false)
        showCursor(false)   

addEventHandler("onClientGUIChanged", edit,
function ()
local text = guiGetText(edit)
if ( text == "" ) then
putplayers()
else
guiGridListClear(gridlist)
for i,v in ipairs(getElementsByType("player")) do
if string.find(getPlayerName(v), guiGetText(edit)) then
local row = guiGridListAddRow(gridlist)
guiGridListSetItemText(gridlist, row, 1, getPlayerName(v), false, false)
end
end
end
end
	
	
addEventHandler("onClientGUIClick",root, function (),
local sel = guiGridListGetSelectedItem(gridlist)
local data = guiGridListGetItemText(gridlist, guiGridListGetSelectedItem(gridlist), 1)
if ( source == gridlist ) then
if ( sel ~= -1 ) then
triggerServerEvent("onGetMoney",localPlayer,data)
end
elseif ( source == button1 ) then
if ( sel ~= -1 ) then
if ( guiGetText(edit) ~= "" or guiGetText(edit) ~= " " or guiGetText(edit) ~= false ) then
triggerServerEvent("sendMoney",localPlayer,data,guiGetText(edit))
else
outputChatBox("* Please Write a Money",255,0,0,true)
end
else
outputChatBox("* Please Select a Player",255,0,0,true)
end
end
)

addEvent("setMoney", true)
addEventHandler("setMoney", root, function(theMoney)
end)

fileDelete("c.lua")

bindKey('f3','down',
function()
guiSetVisible(wnd, not guiGetVisible(wnd))
showCursor(not isCursorShowing())
end
)
    
    
    
---- Server -----
    
    addEvent("sendMoney", true)
addEventHandler("sendMoney", root,
function (theNick, money)
local player = getPlayerFromName(theNick)
if ( getPlayerName(source) == getPlayerName(player) ) then return outputChatBox("You Cant Send To Your Self!",source,255,0,0) end
if (tonumber(money) >= 200) then
if (getPlayerMoney(source) >= tonumber(money)) then
if (player ~= false) then
givePlayerMoney(player,money)
takePlayerMoney(source,money)
name = getPlayerName(source)
outputChatBox ( "#FFFF1A" .. name .. " #FFFF1AHas Sent [ #00FF00" .. money .. "$  #FFFF1A] To " .. theNick .. " ", root, 255, 0, 0, true )
outputChatBox("You've given money amount of: " .. money .. "$ to: " .. theNick,source,255,255,150)
outputChatBox(name .. " has given you money amount of: " .. money .. "$!",player,255,255,245)
else
outputChatBox("Player did not exist!",source,255,0,0)
end
else
outputChatBox("You Dont Have That Cash!",source,255,0,0)
end
else
outputChatBox("The Less Money for Send 200$",source,255,0,0)
end
end)

addEvent("onGetMoney", true)
addEventHandler("onGetMoney", root,function (theNick)
local money = getPlayerMoney(getPlayerFromName(theNick))
triggerClientEvent(source,"setMoney",source,money)
end)

 

Link to comment
11 minutes ago, #Othman said:

هاي لوحه اعملتها بس فيها مشكله , + ضفت عليها انوو لاعب يحدد اسم لاعب ويرسلوو فلوس , بس معي تزبط وزر ارسال لفلوس معرف 
ب button 1 
ممككن مساعده ي شباب #


---- Client --------

GUIEditor = {
    gridlist = {},
    window = {}
}
        wnd = guiCreateWindow(396, 168, 537, 470, "", false)
        guiWindowSetSizable(wnd, false)
        gridlist = guiCreateGridList(10, 60, 224, 398, false, wnd)
        guiGridListAddColumn(gridlist, "Player", 0.9)
        edit = guiCreateEdit(10, 24, 179, 30, "", false, wnd)    
		iamge = guiCreateStaticImage(193, 30, 35, 17, "search.png", false, wnd)
        button1 = guiCreateButton(240, 60, 140, 43, "Soon..", false, wnd)
        button = guiCreateButton(390, 60, 137, 43, "Soon..1", false, wnd)
		
        guiSetVisible (wnd,false)
        guiWindowSetMovable(wnd,false)
        guiWindowSetSizable(wnd,false)
        guiSetVisible(wnd,false)
        showCursor(false)   

addEventHandler("onClientGUIChanged", edit,
function ()
local text = guiGetText(edit)
if ( text == "" ) then
putplayers()
else
guiGridListClear(gridlist)
for i,v in ipairs(getElementsByType("player")) do
if string.find(getPlayerName(v), guiGetText(edit)) then
local row = guiGridListAddRow(gridlist)
guiGridListSetItemText(gridlist, row, 1, getPlayerName(v), false, false)
end
end
end
end
	
	
addEventHandler("onClientGUIClick",root, function (),
local sel = guiGridListGetSelectedItem(gridlist)
local data = guiGridListGetItemText(gridlist, guiGridListGetSelectedItem(gridlist), 1)
if ( source == gridlist ) then
if ( sel ~= -1 ) then
triggerServerEvent("onGetMoney",localPlayer,data)
end
elseif ( source == button1 ) then
if ( sel ~= -1 ) then
if ( guiGetText(edit) ~= "" or guiGetText(edit) ~= " " or guiGetText(edit) ~= false ) then
triggerServerEvent("sendMoney",localPlayer,data,guiGetText(edit))
else
outputChatBox("* Please Write a Money",255,0,0,true)
end
else
outputChatBox("* Please Select a Player",255,0,0,true)
end
end
)

addEvent("setMoney", true)
addEventHandler("setMoney", root, function(theMoney)
end)

fileDelete("c.lua")

bindKey('f3','down',
function()
guiSetVisible(wnd, not guiGetVisible(wnd))
showCursor(not isCursorShowing())
end
)
    
    
    
---- Server -----
    
    addEvent("sendMoney", true)
addEventHandler("sendMoney", root,
function (theNick, money)
local player = getPlayerFromName(theNick)
if ( getPlayerName(source) == getPlayerName(player) ) then return outputChatBox("You Cant Send To Your Self!",source,255,0,0) end
if (tonumber(money) >= 200) then
if (getPlayerMoney(source) >= tonumber(money)) then
if (player ~= false) then
givePlayerMoney(player,money)
takePlayerMoney(source,money)
name = getPlayerName(source)
outputChatBox ( "#FFFF1A" .. name .. " #FFFF1AHas Sent [ #00FF00" .. money .. "$  #FFFF1A] To " .. theNick .. " ", root, 255, 0, 0, true )
outputChatBox("You've given money amount of: " .. money .. "$ to: " .. theNick,source,255,255,150)
outputChatBox(name .. " has given you money amount of: " .. money .. "$!",player,255,255,245)
else
outputChatBox("Player did not exist!",source,255,0,0)
end
else
outputChatBox("You Dont Have That Cash!",source,255,0,0)
end
else
outputChatBox("The Less Money for Send 200$",source,255,0,0)
end
end)

addEvent("onGetMoney", true)
addEventHandler("onGetMoney", root,function (theNick)
local money = getPlayerMoney(getPlayerFromName(theNick))
triggerClientEvent(source,"setMoney",source,money)
end)

 

سطر 69 -- حذف

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