Jump to content

x[مشكلة لوحة الادمن]x سترنق ؟


Recommended Posts

شباب عدلت ع لوحة الادمن بس يقولي خطاء بالسترنق 

function aAction ( type, action, admin, player, data, more )
	if ( aLogMessages[type] ) then
		function aStripString ( string )
			string = tostring ( string )
			string = string.gsub ( string, "$admin", getPlayerName ( admin ) )
			string = string.gsub ( string, "$by_admin_4all", isAnonAdmin4All( admin )    and "" or " by " .. getPlayerName ( admin ) )
			string = string.gsub ( string, "$by_admin_4plr", isAnonAdmin4Victim( admin ) and "" or " by " .. getPlayerName ( admin ) )
			string = string.gsub ( string, "$data2", more or "" )
			if ( player ) then string = string.gsub ( string, "$player", getPlayerName ( player ) ) end
			return tostring ( string.gsub ( string, "$data", data or "" ) )
		end
		local node = aLogMessages[type][action]
		if ( node ) then
			local r, g, b = node["r"], node["g"], node["b"]
			if ( node["all"] ) then exports["notices"]:addNotification ( aStripString ( node["all"] ), _root, r, g, b, "success" ) end
			if ( node["admin"] ) and ( admin ~= player ) then exports["notices"]:addNotification ( aStripString ( node["admin"] ), admin, r, g, b, "success" ) end
			if ( node["player"] ) then exports["notices"]:addNotification (aStripString ( node["player"] ), player, r, g, b, "success" ) end
			if ( node["log"] ) then outputServerLog ( aStripString ( node["log"] ) ) end
		end
	end
end

 

Link to comment
function aAction ( type, action, admin, player, data, more )
	if ( aLogMessages[type] ) then
		function aStripString ( string )
			string = tostring ( string )
			string = string.gsub ( string, "$admin", getPlayerName ( admin ) )
			string = string.gsub ( string, "$by_admin_4all", isAnonAdmin4All( admin )    and "" or " by " .. getPlayerName ( admin ) )
			string = string.gsub ( string, "$by_admin_4plr", isAnonAdmin4Victim( admin ) and "" or " by " .. getPlayerName ( admin ) )
			string = string.gsub ( string, "$data2", more or "" )
			if ( player ) then string = string.gsub ( string, "$player", getPlayerName ( player ) ) end
			return tostring ( string.gsub ( string, "$data", data or "" ) )
		end
		local node = aLogMessages[type][action]
		if ( node ) then
      local node = { }
			local r, g, b = node["r"], node["g"], node["b"]
			if ( node["all"] ) then exports["notices"]:addNotification ( aStripString ( node["all"] ), _root, r, g, b, "success" ) end
			if ( node["admin"] ) and ( admin ~= player ) then exports["notices"]:addNotification ( aStripString ( node["admin"] ), admin, r, g, b, "success" ) end
			if ( node["player"] ) then exports["notices"]:addNotification (aStripString ( node["player"] ), player, r, g, b, "success" ) end
			if ( node["log"] ) then outputServerLog ( aStripString ( node["log"] ) ) end
		end
	end
end

جربه

Link to comment
addEvent ( "onPlayerMoneyChange", false )
addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), function()
	setTimer ( function()
		for id, player in ipairs ( getElementsByType ( "player" ) ) do
			if aPlayers[player] then
				local money = getPlayerMoney ( player )
				local prev = aPlayers[player]["money"]
				if ( money ~= prev ) then
					triggerEvent ( "onPlayerMoneyChange", player, prev, money )
					aPlayers[player]["money"] = money
				end
			end
		end
	end, 1500, 0 )
end )

admin_sync.lua:195 : attemp to index global aPlayer a nill value

اصتلحت بس صارت مشكلة ثانية

 

Edited by yasin0
Link to comment

سويت بس مايظهر الاكسبورت الي سويته ومافي ولا خطاء بالدي بق السورس :

function aAction ( type, action, admin, player, data, more )
	if ( aLogMessages[type] ) then
		function aStripString ( string )
			string = tostring ( string )
			string = string.gsub ( string, "$admin", getPlayerName ( admin ) )
			string = string.gsub ( string, "$by_admin_4all", isAnonAdmin4All( admin )    and "" or " by " .. getPlayerName ( admin ) )
			string = string.gsub ( string, "$by_admin_4plr", isAnonAdmin4Victim( admin ) and "" or " by " .. getPlayerName ( admin ) )
			string = string.gsub ( string, "$data2", more or "" )
			if ( player ) then string = string.gsub ( string, "$player", getPlayerName ( player ) ) end
			return tostring ( string.gsub ( string, "$data", data or "" ) )
		end
		local node = aLogMessages[type][action]
		if ( node ) then
      local node = { }
			local r, g, b = node["r"], node["g"], node["b"]
			if ( node["all"] ) then exports["notices"]:addNotification ( aStripString ( node["all"] ), _root, r, g, b, "success" ) end
			if ( node["admin"] ) and ( admin ~= player ) then exports["notices"]:addNotification ( aStripString ( node["admin"] ), admin, r, g, b, "success" ) end
			if ( node["player"] ) then exports["notices"]:addNotification (aStripString ( node["player"] ), player, r, g, b, "success" ) end
			if (node ["aPlayer"] ) then exports["notices"]:addNotification(aStripString ( node["aPlayer"] ), player, r, g, b, "success" ) end
			if ( node["log"] ) then outputServerLog ( aStripString ( node["log"] ) ) end
		end
	end

 

Link to comment
function aAction ( type, action, admin, player, data, more )
	if ( aLogMessages[type] ) then
		function aStripString ( string )
			string = tostring ( string )
			string = string.gsub ( string, "$admin", getPlayerName ( admin ) )
			string = string.gsub ( string, "$by_admin_4all", isAnonAdmin4All( admin )    and "" or " by " .. getPlayerName ( admin ) )
			string = string.gsub ( string, "$by_admin_4plr", isAnonAdmin4Victim( admin ) and "" or " by " .. getPlayerName ( admin ) )
			string = string.gsub ( string, "$data2", more or "" )
			if ( player ) then string = string.gsub ( string, "$player", getPlayerName ( player ) ) end
			return tostring ( string.gsub ( string, "$data", data or "" ) )
		end
      local node = { }    
		local node = aLogMessages[type][action]
		if ( node ) then
			local r, g, b = node["r"], node["g"], node["b"]
			if ( node["all"] ) then exports["notices"]:addNotification ( aStripString ( node["all"] ), _root, r, g, b, "success" ) end
			if ( node["admin"] ) and ( admin ~= player ) then exports["notices"]:addNotification ( aStripString ( node["admin"] ), admin, r, g, b, "success" ) end
			if ( node["player"] ) then exports["notices"]:addNotification (aStripString ( node["player"] ), player, r, g, b, "success" ) end
			if (node ["aPlayer"] ) then exports["notices"]:addNotification(aStripString ( node["aPlayer"] ), player, r, g, b, "success" ) end
			if ( node["log"] ) then outputServerLog ( aStripString ( node["log"] ) ) end
		end
	end

 

Link to comment

عودت نفس المشكلة

#Edit:

حليت المشكلة لكن الايقونة ماتظهر الي هي info

function aAction ( type, action, admin, player, data, more )
	if ( aLogMessages[type] ) then
		function aStripString ( string )
			string = tostring ( string )
			string = string.gsub ( string, "$admin", getPlayerName ( admin ) )
			string = string.gsub ( string, "$by_admin_4all", isAnonAdmin4All( admin )    and "" or " by " .. getPlayerName ( admin ) )
			string = string.gsub ( string, "$by_admin_4plr", isAnonAdmin4Victim( admin ) and "" or " by " .. getPlayerName ( admin ) )
			string = string.gsub ( string, "$data2", more or "" )
			if ( player ) then string = string.gsub ( string, "$player", getPlayerName ( player ) ) end
			return tostring ( string.gsub ( string, "$data", data or "" ) )
		end
		local node = aLogMessages[type][action]
		if ( node ) then
			local r, g, b = node["r"], node["g"], node["b"]
			if ( node["all"] ) then exports["notices"]:addNotification (_root, aStripString ( node["all"] ),  r, g, b, "info" ) end
			if ( node["admin"] ) and ( admin ~= player ) then exports["notices"]:addNotification ( admin, aStripString ( node["admin"] ),  r, g, b, "info" ) end
			if ( node["player"] ) then exports["notices"]:addNotification (player, aStripString ( node["player"] ),  r, g, b, "info" ) end
			if ( node["log"] ) then outputServerLog ( aStripString ( node["log"] ) ) end
		end
	end
end

 

#Edit:

تم الحل مشكورين المشرف يرجى الاغلاق

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