Jump to content

[help] اضافة رتبة ادمن جديدة


Recommended Posts

سلام عليكم شباب اتمني تكونو بأحسن حال

حاولت اسوي رتبة ادمن جديدة غير الرتب المعروفة في باك اب اول جيمنج

حاولت اسوي رتبة  Server founder

وهذه اسماء الملفات اللي عدلت عليها

integration --> functions_s

	if string.find(forumPerms, SERVERFOUNDER) then

		return exports.anticheat:changeProtectedElementDataEx(thePlayer, "admin_level", 8, true)
    end

 

integration --> g_configs

--MAXIME
mysql = exports.mysql
TESTER = 25
SCRIPTER = 32
LEADSCRIPTER = 79
COMMUNITYLEADER = 14
TRIALADMIN = 18
ADMIN = 17
SENIORADMIN = 64
SERVERFOUNDER = 88 -- رقم السماح بكتابة الاوامر في قاعدة البيانات
LEADADMIN = 15
SUPPORTER = 30
VEHICLE_CONSULTATION_TEAM_LEADER = 39
VEHICLE_CONSULTATION_TEAM_MEMBER = 43
MAPPING_TEAM_LEADER = 44
MAPPING_TEAM_MEMBER = 28
STAFF_MEMBER = {32, 14, 18, 17, 64, 15, 30, 39, 43, 44, 28, 88}
AUXILIARY_GROUPS = {32, 39, 43, 44, 28, 88}
ADMIN_GROUPS = {14, 18, 17, 64, 15, 88}

staffTitles = {
	[1] = {
		[0] = "Player",
		[1] = "Trial Administrator",
		[2] = "Administrator",
		[3] = "Senior Administrator",
		[4] = "Lead Administrator",
		[5] = "Server Managment",
		[6] = "-",
		[7] = "Vice Founder",
		[8] = "Server Founder", -- الفاوندر
	},

 

integration --> g_staff

function isPlayerServerFounder(player)
	if not player or not isElement(player) or not getElementType(player) == "player" then
		return false
	end
	local adminLevel = getElementData(player, "admin_level") or 0
	return (adminLevel >= 8) -- اللفل حق الادمن
end

 

admin-system --> Player --> s_player_commands

 

حاولت اخلي الفاوندر بس هو اللي يسوي امر 

givemoney 

وهذا التغيير موجود في 

admin-system --> Player --> s_player_commands

والامر اهو

function giveMoney(thePlayer, commandName, target, money, ...)
	if exports["integration"]:isPlayerServerFounder(thePlayer) then
		if not (target) or not money or not (...) then
			outputChatBox("SYNTAX: /" .. commandName .. " [Partial Player Nick] [Money] [Reason]", thePlayer, 255, 194, 14)
		else
			local username = getPlayerName(thePlayer)
			local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, target)

			if targetPlayer then
				money = tonumber(money) or 0
				if money and money > 500000 then
					outputChatBox("For security reason, you're only allowed to give a player less than $500,000 at once.", thePlayer, 255, 0, 0)
					return false
				end

				if not exports.global:giveMoney(targetPlayer, money) then
					outputChatBox("Could not give player that amount.", thePlayer, 255, 0, 0)
					return false
				end

 

 

هذه التغييرات فقط اللي سويتها وما سويت شئ غيرها وهذا الخطأ اللي يظهرلي في 

debugscript

Quote

ERROR : admin-system/player/s_player_commands.Lua:1401:failed to call 'integration:isPlayerServerFounder

 

 

ساعدوني رجاءً

10 hours ago, Mohab said:
  • if string.find(forumPerms, SERVERFOUNDER) then
  •  
  • return exports.anticheat:changeProtectedElementDataEx(thePlayer, "admin_level", 8, true)
  • end

ملاحظة SERVERFOUNDER 
عشان الكود دا 

function getAdminGroups() -- this is used in c_adminstats to correspond levels to forum usergroups
	return { SUPPORTER, TRIALADMIN, ADMIN, SENIORADMIN, LEADADMIN, SERVERFOUNDER }
end

 

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