givePlayerMoney --- من جآنب كيلنت , مجرد رقم ماتسوي شيء
---
GUIEditor = {
button = {},
window = {},
label = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
local screenW, screenH = guiGetScreenSize()
GUIEditor.window[1] = guiCreateWindow((screenW - 271) / 2, (screenH - 453) / 2, 271, 453, "نظام تحويل المال سيرفر مهمات الاجرام", false)
guiWindowSetSizable(GUIEditor.window[1], false)
guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFF7FDFE")
guiSetVisible(GUIEditor.window[1],false)
GUIEditor.button[1] = guiCreateButton(12, 354, 249, 35, "تحويل", false, GUIEditor.window[1])
guiSetFont(GUIEditor.button[1], "default-bold-small")
guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFF7FDFE")
GUIEditor.button[2] = guiCreateButton(14, 397, 247, 35, "خروج", false, GUIEditor.window[1])
guiSetFont(GUIEditor.button[2], "default-bold-small")
guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFF7FDFE")
GUIEditor.label[1] = guiCreateLabel(14, 249, 247, 100, "مرحباً بك في السيرفر \nاذا كنت تريد تحويل المال\nمن وهمي الا حقيقي \nمن فضلك اضغط على تحويل\nاذا كنت لا تريد ذلك من فضلك\nاضغط على زر خروج", false, GUIEditor.window[1])
guiSetFont(GUIEditor.label[1], "default-bold-small")
guiLabelSetColor(GUIEditor.label[1], 247, 253, 254)
guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false)
guiLabelSetVerticalAlign(GUIEditor.label[1], "center")
IMG = guiCreateStaticImage(24, 24, 225, 225, ":MODS-money/money.png", false, GUIEditor.window[1])
end
)
bindKey ( "m" , "down" , function()
guiSetVisible ( GUIEditor.window[1], not guiGetVisible ( GUIEditor.window[1] ) )
showCursor ( guiGetVisible ( GUIEditor.window[1] ) )
end)
addEventHandler("onClientGUIClick",root,
function ()
if source == (GUIEditor.button[1]) then
local PlayerMoney = getPlayerMoney()
if ( PlayerMoney >= 100 ) then
takePlayerMoney(PlayerMoney)
triggerServerEvent('money',localPlayer,PlayerMoney) --- يرسل الفلوس مع الترايقر عشان يعطيه نفس القيمة
outputChatBox('#ff0000*#45A325 تم التحويل', 255, 255, 0,true)
else
outputChatBox('#ff0000*#45A325 لا يتم تحويل اقل من 100 دولار', 255, 0, 0,true)
playSound("money.wav")
elseif source == (GUIEditor.button[2]) then
guiSetVisible(GUIEditor.window[1], false )
showCursor(false)
end
end
end)
--Server
addEvent('money',true)
addEventHandler('money',root,
function (PlayerMoney)
givePlayerMoney(source,PlayerMoney) -- يعطيه فلوس حقيقية عوضاَ عن الوهمية
end)