Jump to content

ممكن مساعده ضروريه من اي شخص محترف


Recommended Posts

السلام عليكم ورحمة الله وبركاته

يا اخوان محتاج احول ذا المود

من ساعات لعدد قتل زومبي

Zombie kills

Client

  
local Key = "F6" 
  
local Admin = { 
{"Moderator","Moderator","20"}, 
{"SuperModerator","SuperModerator","45"}, 
{"Admin","Admin","75"}, 
{"HED.ADMIN","HED.ADMIN","105"}, 
{"Big.Admin","Big.Admin","150"}, 
{"oneradmin","oneradmin","300"}, 
} 
  
---------------------- 
-- Setting 
---------------------- 
  
  
GiveAdmin = { 
    Window = {}, 
    gridlist = {}, 
    button = {}, 
    label = {}, 
} 
  
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 
  
GiveAdmin.Window[1] = guiCreateWindow(445, 132, 310, 339, "==[ساعات الرتب]==", false); 
centerWindow(GiveAdmin.Window[1]); 
guiSetVisible(GiveAdmin.Window[1],false); 
guiWindowSetSizable(GiveAdmin.Window[1], false); 
guiSetAlpha(GiveAdmin.Window[1], 1.00); 
guiSetProperty(GiveAdmin.Window[1], "CaptionColour", "FF0383FB"); 
  
GiveAdmin.label[1] = guiCreateLabel(8, 19, 411, 33, "مرحبا بك في نظام الرتب :", false, GiveAdmin.Window[1]); 
guiSetFont(GiveAdmin.label[1], "default-bold-small") 
guiLabelSetColor(GiveAdmin.label[1], 255, 0, 0) 
GiveAdmin.gridlist[1] = guiCreateGridList(9, 51, 294, 236, false, GiveAdmin.Window[1]); 
guiGridListAddColumn(GiveAdmin.gridlist[1], "#", 0.2) 
guiGridListAddColumn(GiveAdmin.gridlist[1], "الرتبة #", 0.2); 
guiGridListAddColumn(GiveAdmin.gridlist[1], "القروب #", 0.2); 
guiGridListAddColumn(GiveAdmin.gridlist[1], "الساعات #", 0.2); 
GiveAdmin.label[2] = guiCreateLabel(10, 303, 167, 26, "Created By : BassamSyria", false, GiveAdmin.Window[1]); 
guiSetFont(GiveAdmin.label[2], "default-bold-small"); 
guiLabelSetColor(GiveAdmin.label[2], 41, 255, 0); 
GiveAdmin.button[1] = guiCreateButton(186, 302, 115, 26, "اختيار الرتبة #", false, GiveAdmin.Window[1]); 
guiSetFont(GiveAdmin.button[1], "default-bold-small"); 
guiSetProperty(GiveAdmin.button[1], "NormalTextColour", "FFF5FF00"); 
  
  
for k,v in ipairs ( Admin ) do 
row = guiGridListAddRow(GiveAdmin.gridlist[1]); 
guiGridListSetItemText(GiveAdmin.gridlist[1],row,1,''..k..'-',false,false); 
guiGridListSetItemText(GiveAdmin.gridlist[1],row,2,v[1],false,false); 
guiGridListSetItemText(GiveAdmin.gridlist[1],row,3,v[2],false,false); 
guiGridListSetItemText(GiveAdmin.gridlist[1],row,4,v[3],false,false); 
guiGridListSetItemColor(GiveAdmin.gridlist[1],row,1,255,255,0); 
guiGridListSetItemColor(GiveAdmin.gridlist[1],row,2,0,255,0) 
guiGridListSetItemColor(GiveAdmin.gridlist[1],row,3,255,255,0); 
guiGridListSetItemColor(GiveAdmin.gridlist[1],row,4,0,255,0); 
guiSetFont(GiveAdmin.gridlist[1],"default-bold-small"); 
end 
  
xMainFunctions_ = function ( ) 
 local row, col = guiGridListGetSelectedItem ( GiveAdmin.gridlist[1] )  
local Group = tostring ( guiGridListGetItemText(GiveAdmin.gridlist[1],row,3 )); 
local Price = tostring ( guiGridListGetItemText(GiveAdmin.gridlist[1],row,4 )); 
local Name = tostring ( guiGridListGetItemText(GiveAdmin.gridlist[1],row,2 )); 
   if ( row and col and row ~= -1 and col ~= -1 ) then 
triggerServerEvent("Accept:the:request",localPlayer,Group,Price,Name); 
  else 
  outputChatBox("* الرجاء اختيار رتبةة !",255,0,0,true); 
  end 
end 
addEventHandler("onClientGUIClick",GiveAdmin.button[1],xMainFunctions_,false); 
  
xBindFunction_ = function () 
    guiSetVisible(GiveAdmin.Window[1],not guiGetVisible(GiveAdmin.Window[1])); 
    showCursor(guiGetVisible(GiveAdmin.Window[1])); 
end 
bindKey(Key,"down",xBindFunction_); 

Server

xAddToGroupFunction_ = function ( Group,Price,Name ) 
    local account = getAccountName(getPlayerAccount(source)); 
    if isGuestAccount(getPlayerAccount(source)) then return outputChatBox(" * يجب عليك التسجيل اولاَ",source,255,0,0,true); end 
    if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("** لديك هذهـ الرتبة فعـلا  ! ",source,255,0,0,true); end 
    local sValue = getElementData( source,'PlayTime' ) 
    if not sValue then sValue = '0:0:0' end 
    local data = split(sValue,':') 
    local hour = tonumber( data[1] )   
    if hour == nil or not tonumber(hour) then hour = 0 end 
    if ( hour >= tonumber(Price))  then 
        aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account); 
        outputChatBox("** تم اضافة الرتبة بنجاح | "..Name,source,0,255,0,true); 
    else 
        outputChatBox("**ليس لديك ساعات كافية",source,255,0,0,true); 
    end 
end 
addEvent("Accept:the:request",true) 
addEventHandler("Accept:the:request",root,xAddToGroupFunction_) 

Link to comment

-- Server Side --

xAddToGroupFunction_ = function ( Group,Price,Name ) 
    local account = getAccountName(getPlayerAccount(source)); 
    if isGuestAccount(getPlayerAccount(source)) then return outputChatBox(" * يجب عليك التسجيل اولاَ",source,255,0,0,true); end 
    if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("** لديك هذهـ الرتبة فعـلا  ! ",source,255,0,0,true); end 
    local sValue = getElementData( source,'Zombie kills' ) 
    if not sValue then sValue = '0' end 
    local kills = tonumber( sValue )   
    if kills == nil or not kills then kills = 0 end 
    if (kills >= tonumber(Price)) then 
        aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account); 
        outputChatBox("** تم اضافة الرتبة بنجاح | "..Name,source,0,255,0,true); 
    else 
        outputChatBox("**ليس لديك ساعات كافية",source,255,0,0,true); 
    end 
end 
addEvent("Accept:the:request",true) 
addEventHandler("Accept:the:request",root,xAddToGroupFunction_) 

Link to comment
-- Server Side --
xAddToGroupFunction_ = function ( Group,Price,Name ) 
    local account = getAccountName(getPlayerAccount(source)); 
    if isGuestAccount(getPlayerAccount(source)) then return outputChatBox(" * يجب عليك التسجيل اولاَ",source,255,0,0,true); end 
    if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("** لديك هذهـ الرتبة فعـلا  ! ",source,255,0,0,true); end 
    local sValue = getElementData( source,'Zombie kills' ) 
    if not sValue then sValue = '0' end 
    local kills = tonumber( sValue )   
    if kills == nil or not kills then kills = 0 end 
    if (kills >= tonumber(Price)) then 
        aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account); 
        outputChatBox("** تم اضافة الرتبة بنجاح | "..Name,source,0,255,0,true); 
    else 
        outputChatBox("**ليس لديك ساعات كافية",source,255,0,0,true); 
    end 
end 
addEvent("Accept:the:request",true) 
addEventHandler("Accept:the:request",root,xAddToGroupFunction_) 

قسم انك محترف يا اخي كفوو

وشكراً

قسم كفوووو

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