-- Client Side !
addEventHandler("onClientGUIClick",resourceRoot,
function ()
if source == GUIEditor.button[1] then
local t = guiGetText(GUIEditor.edit[1])
if t ~= "" and tonumber(t) then
triggerServerEvent("GiveAll",localPlayer,tonumber(t))
else
outputChatBox("Error in Number",255,0,0)
end
end
end
)
-- Server Side !
addEvent("GiveAll",true)
addEventHandler("GiveAll",root,
function (t)
for i,p in ipairs(getElementsByType("player")) do
local n = getPlayerName(p)
if string.find(n,"[Alex]") then
givePlayerMoney(p,t)
outputChatBox(getPlayerName(source) .. " Has Give You " .. t,p,0,255,0)
end
end
end
)
مو مجرب جربه