Search the Community
Showing results for tags 'اخواتي مساعده يرحمك الله'.
-
الكلينت function centerWindow (center_window) local screenW, screenH = guiGetScreenSize() local windowW, windowH = guiGetSize(center_window, false) local x, y = (screenW - windowW) /2,(screenH - windowH) /2 guiSetPosition(center_window, x, y, false) end GUI = guiCreateWindow(530, 297, 281, 85, "Hours All", false) guiWindowSetSizable(GUI, false) guiSetVisible(GUI, false) centerWindow (GUI) Label = guiCreateLabel(10, 33, 58, 15, "Amount $::", false, GUI) Hours_Edit = guiCreateEdit(78, 31, 82, 21, "", false, GUI) guiEditSetMaxLength(Hours_Edit, Boton_Send = guiCreateButton(170, 31, 47, 21, "Send", false, GUI) guiSetProperty(Boton_Send, "NormalTextColour", "FFAAAAAA") CopyRight = guiCreateLabel(10, 60, 261, 15, "Hours All", false, GUI) guiSetFont(CopyRight, "default-bold-small") guiLabelSetColor(CopyRight, 254, 120, 21) guiLabelSetHorizontalAlign(CopyRight, "center", false) Boton_Cancelar = guiCreateButton(223, 31, 47, 21, "Cancel", false, GUI) guiSetProperty(Boton_Cancelar, "NormalTextColour", "FFAAAAAA") function Open () guiSetVisible(GUI, true) showCursor(true) end addEvent("Abrir", true) addEventHandler("Abrir", getLocalPlayer(), Open) function close () guiSetVisible(GUI, false) showCursor(false) end addEventHandler("onClientGUIClick", Boton_Cancelar, close, false) function sendm () name = getPlayerName(getLocalPlayer()) cantidad = guiGetText(Hours_Edit) triggerServerEvent("SendHours1",getRootElement(),cantidad,name) end addEventHandler("onClientGUIClick", Boton_Send, sendm, false) === Server ==== function onAdmins ( thePlayer ) local cuenta = getAccountName( getPlayerAccount(thePlayer) ) if isObjectInACLGroup("user."..cuenta, aclGetGroup("Console")) then triggerClientEvent ( "Abrir", thePlayer) else end end addCommandHandler("Hours", onAdmins) function Enviar (cantidad, name) givePlayerHours(getRootElement(), tonumber(cantidad)) outputChatBox("تم توزيع ساعات للآعبين .."..cantidad, getRootElement(), 255, 255, 255, true) end addEvent("SendHours1", true) addEventHandler("SendHours1", getRootElement(), Enviar)