yasin0 Posted May 31, 2017 Share Posted May 31, 2017 شباب عدلت ع لوحة الادمن بس يقولي خطاء بالسترنق 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
yasin0 Posted May 31, 2017 Author Share Posted May 31, 2017 15 16 17 18 الي حطيت فيهم export Link to comment
^iiEcoo'x_) Posted May 31, 2017 Share Posted May 31, 2017 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
yasin0 Posted May 31, 2017 Author Share Posted May 31, 2017 (edited) 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 May 31, 2017 by yasin0 Link to comment
^iiEcoo'x_) Posted May 31, 2017 Share Posted May 31, 2017 2 minutes ago, yasin0 said: admin_sync.lua:195 : attemp to index global aPlayer a nill value اصتلحت بس صارت مشكلة ثانية اعطيني السطر اللي بيه الخطأ Link to comment
yasin0 Posted May 31, 2017 Author Share Posted May 31, 2017 ذا الي فيه المشكلة if aPlayers[player] then يكتب لي القيمة nill Link to comment
^iiEcoo'x_) Posted May 31, 2017 Share Posted May 31, 2017 سوي جدول بهذا الاسم aPlayer سوي جدول بهذا الاسم aPlayers Link to comment
yasin0 Posted May 31, 2017 Author Share Posted May 31, 2017 سويت بس مايظهر الاكسبورت الي سويته ومافي ولا خطاء بالدي بق السورس : 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
^iiEcoo'x_) Posted May 31, 2017 Share Posted May 31, 2017 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
yasin0 Posted May 31, 2017 Author Share Posted May 31, 2017 عودت نفس المشكلة #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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now