Jump to content

عندي مشكلة في مود القروبات ما يسوي قروب


Recommended Posts

عندي مشكلة في مود القروبات ما يسوي قروب

كلينت

function makeGroup() 
    if (not guiGetEnabled(createGroupEdit)) then 
        exports.guimessages:sendClientMessage ("You must leave your current group first", 255, 0, 0, "default-bold", true, 0.15) 
        return 
    end 
     
    local name = guiGetText(createGroupEdit) 
    local name = string.gsub(name, " ", "_") 
    if (name and name ~= "" and name:len() > 2) then 
  money = getPlayerMoney (source) 
   if (money < 0) then 
exports.guimessages:sendClientMessage  ("You Must Have 1,000,000$ To Create Your Group !",225,0,0) 
   else 
   takePlayerMoney(0) 
        triggerServerEvent("groupSystem.attemptMakeGroup", root, name) 
    end 
end 
end 

سيرفر

function attemptMakeGroup(name) 
    if (isGuestAccount(getPlayerAccount(client))) then return end 
     
    if (groupTable[name]) then 
        exports.guimessages:sendClientMessage ("There is already a group with this name", client, 255, 0, 0) 
        return 
    end 
     
  
    if (#name > 20) then 
        exports.guimessages:sendClientMessage ("Max group name is 20 characters", client, 255, 0, 0) 
        return 
    end 
     
    if (not getPlayerGroup(client) or getPlayerGroup(client) == "None" or getPlayerGroup == "nil") then 
        local date, time = getTime() 
        local date = date.." - "..time 
        createGroup(name, client, date) 
        setGroup(client, name, date, "Founder") 
        exports.guimessages:sendClientMessage ("Done Create Your Group '"..name.."'", client, 0, 255, 0) 
    end 
end 
addEvent("groupSystem.attemptMakeGroup", true) 
addEventHandler("groupSystem.attemptMakeGroup", root, attemptMakeGroup) 

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