xX|KeMo|Xx Posted February 2, 2013 Share Posted February 2, 2013 السلام عليكم addEventHandler("onPlayerWasted", getRootElement(), function(plr) accountName = getAccountName(getPlayerAccount(plr)) if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Admin" ) ) then executeCommandHandler("add",plr,tostring(getElementData(plr,"ID"))) else aclGroupAddObject (aclGetGroup("Admin"), "user."..accountName) executeCommandHandler("add",plr,tostring(getElementData(plr,"ID"))) aclGroupRemoveObject (aclGetGroup("Admin"), "user."..accountName) end local r, g, b = getPlayerNametagColor ( source ) local color = string.format("#%02X%02X%02X", r, g, b) local playerTeam = getTeamName(getPlayerTeam(source)) or "N/A" outputChatBox ( "*** #Ffffff[ #ffff00" .. name .. " ] #00cc00has add to game #ffffff[ ".. color.. ""..playerTeam.." #ffffff]", getRootElement(), 255, 255, 0, true ) end ) في مشكله بهاذا الكود ؟ واذا في مشكله ياليت تصلحنها وشكرآ Link to comment
===|OSAMA|=== Posted February 2, 2013 Share Posted February 2, 2013 plr ليه حآط بالفنكشن onPlayerWasted وأنت مستخدم حدث ^ The source of this event is the player that died or got killed. + " .. name .. " انت حآط بالششآت بدون ما تعرِفهآ : / + getPlayerNametagColor انصحكـ لما تبي تجيب لون التيم لا تستخدم string.format حتى لو انكـ مستخدم أفضل getTeamColor استخدم .. # على ككل حأإل يصصير الكود كذآ , -- Server Side ! addEventHandler ( "onPlayerWasted", root, function ( ) accountName = getAccountName(getPlayerAccount( source )) if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Admin" ) ) then executeCommandHandler("add",source,tostring(getElementData(source,"ID"))) else aclGroupAddObject (aclGetGroup("Admin"), "user."..accountName) executeCommandHandler("add",source,tostring(getElementData(source,"ID"))) aclGroupRemoveObject (aclGetGroup("Admin"), "user."..accountName) end local namee = getPlayerName ( source ) name = string.gsub(namee, "#%x%x%x%x%x%x", "") local playerTeam = getPlayerTeam(source) or "N/A" local r, g, b = getTeamColor ( playerTeam ) local color = string.format("#%02X%02X%02X", r, g, b) outputChatBox ( "*** #Ffffff[ #ffff00" .. name .. " ] #00cc00has add to game #ffffff[ ".. color.. ""..getTeamName(playerTeam).." #ffffff]", root, 255, 255, 0, true ) end ) Link to comment
xX|KeMo|Xx Posted February 3, 2013 Author Share Posted February 3, 2013 plr ليه حآط بالفنكشنonPlayerWasted وأنت مستخدم حدث ^ The source of this event is the player that died or got killed. + " .. name .. " انت حآط بالششآت بدون ما تعرِفهآ : / + getPlayerNametagColor انصحكـ لما تبي تجيب لون التيم لا تستخدم string.format حتى لو انكـ مستخدم أفضل getTeamColor استخدم .. # على ككل حأإل يصصير الكود كذآ , -- Server Side ! addEventHandler ( "onPlayerWasted", root, function ( ) accountName = getAccountName(getPlayerAccount( source )) if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Admin" ) ) then executeCommandHandler("add",source,tostring(getElementData(source,"ID"))) else aclGroupAddObject (aclGetGroup("Admin"), "user."..accountName) executeCommandHandler("add",source,tostring(getElementData(source,"ID"))) aclGroupRemoveObject (aclGetGroup("Admin"), "user."..accountName) end local namee = getPlayerName ( source ) name = string.gsub(namee, "#%x%x%x%x%x%x", "") local playerTeam = getPlayerTeam(source) or "N/A" local r, g, b = getTeamColor ( playerTeam ) local color = string.format("#%02X%02X%02X", r, g, b) outputChatBox ( "*** #Ffffff[ #ffff00" .. name .. " ] #00cc00has add to game #ffffff[ ".. color.. ""..getTeamName(playerTeam).." #ffffff]", root, 255, 255, 0, true ) end ) ولله اني فاشل شكرآ على المساعده Link to comment
===|OSAMA|=== Posted February 3, 2013 Share Posted February 3, 2013 plr ليه حآط بالفنكشنonPlayerWasted وأنت مستخدم حدث ^ The source of this event is the player that died or got killed. + " .. name .. " انت حآط بالششآت بدون ما تعرِفهآ : / + getPlayerNametagColor انصحكـ لما تبي تجيب لون التيم لا تستخدم string.format حتى لو انكـ مستخدم أفضل getTeamColor استخدم .. # على ككل حأإل يصصير الكود كذآ , -- Server Side ! addEventHandler ( "onPlayerWasted", root, function ( ) accountName = getAccountName(getPlayerAccount( source )) if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Admin" ) ) then executeCommandHandler("add",source,tostring(getElementData(source,"ID"))) else aclGroupAddObject (aclGetGroup("Admin"), "user."..accountName) executeCommandHandler("add",source,tostring(getElementData(source,"ID"))) aclGroupRemoveObject (aclGetGroup("Admin"), "user."..accountName) end local namee = getPlayerName ( source ) name = string.gsub(namee, "#%x%x%x%x%x%x", "") local playerTeam = getPlayerTeam(source) or "N/A" local r, g, b = getTeamColor ( playerTeam ) local color = string.format("#%02X%02X%02X", r, g, b) outputChatBox ( "*** #Ffffff[ #ffff00" .. name .. " ] #00cc00has add to game #ffffff[ ".. color.. ""..getTeamName(playerTeam).." #ffffff]", root, 255, 255, 0, true ) end ) ولله اني فاشل شكرآ على المساعده لآ يرجآل عآدي الوآحد يغلطط , بس حبيت انبهكـ = ) العفو حبيبي # Link to comment
xX|KeMo|Xx Posted February 3, 2013 Author Share Posted February 3, 2013 ي مشكله بالكود ما يشتغل يطلع الكلام باشلات بس وضفت لقروب ادمن Link to comment
iMr.Dawix~# Posted February 3, 2013 Share Posted February 3, 2013 حطيته بالميتآ سيرفر؟ Link to comment
xX|KeMo|Xx Posted February 4, 2013 Author Share Posted February 4, 2013 يب اكيد لازم سيرفر Link to comment
===|OSAMA|=== Posted February 4, 2013 Share Posted February 4, 2013 ^ الحين جربت الكود , وضآبط لككن الغلطط الي فيه , أن الكاميرا تضل على اللاعب الثاني , يعني تضل ترآقب لكن الغريب انه لما تسوي من اف 8 ادد يضبط : / على ككل حأإل بهآلحأإلهةة مآرح يفيدكـ غير صآحب المود حق البيس مود , حتى يقلكـ كيف تلغي المراقبة setCameraTarget لأنه انه سويت للمرآقبة لما يموت اللاعب onClientRender لكن بعد ثانية ترجع الكاميرا للاعب الثاني , شكله مسوي تايمر مفتوح ولا حدث بس انا الي محيرني لما اسوي ادد من اف 8 يضبط ! رابط حساب صاحب مود البيس مود : https://forum.multitheftauto.com/memberlist.php?mode=viewprofile&u=28603 رآسله على الرسائل الخأإصةة بالأنجليزي , # Link to comment
TAPL Posted February 4, 2013 Share Posted February 4, 2013 جرب addEventHandler("onPlayerWasted", root, function() setTimer(function(source) local accountName = getAccountName(getPlayerAccount(source)) if isObjectInACLGroup("user." .. accountName, aclGetGroup("Admin")) then executeCommandHandler("add",source,tostring(getElementData(source,"ID"))) else aclGroupAddObject(aclGetGroup("Admin"), "user."..accountName) executeCommandHandler("add",source,tostring(getElementData(source,"ID"))) aclGroupRemoveObject(aclGetGroup("Admin"), "user."..accountName) end local name = string.gsub(getPlayerName(source), "#%x%x%x%x%x%x", "") local playerTeam = getPlayerTeam(source) local TeamName = playerTeam and getTeamName(playerTeam) or "N/A" local r, g, b = getTeamColor(playerTeam) local color = string.format("#%02X%02X%02X", r, g, b) outputChatBox("*** #Ffffff[ #ffff00"..name.." ] #00cc00has add to game #ffffff[ "..color..""..TeamName.." #ffffff]", root, 255, 255, 0, true) end, 2000, 1, source) end ) Link to comment
xX|KeMo|Xx Posted February 5, 2013 Author Share Posted February 5, 2013 جرب addEventHandler("onPlayerWasted", root, function() setTimer(function(source) local accountName = getAccountName(getPlayerAccount(source)) if isObjectInACLGroup("user." .. accountName, aclGetGroup("Admin")) then executeCommandHandler("add",source,tostring(getElementData(source,"ID"))) else aclGroupAddObject(aclGetGroup("Admin"), "user."..accountName) executeCommandHandler("add",source,tostring(getElementData(source,"ID"))) aclGroupRemoveObject(aclGetGroup("Admin"), "user."..accountName) end local name = string.gsub(getPlayerName(source), "#%x%x%x%x%x%x", "") local playerTeam = getPlayerTeam(source) local TeamName = playerTeam and getTeamName(playerTeam) or "N/A" local r, g, b = getTeamColor(playerTeam) local color = string.format("#%02X%02X%02X", r, g, b) outputChatBox("*** #Ffffff[ #ffff00"..name.." ] #00cc00has add to game #ffffff[ "..color..""..TeamName.." #ffffff]", root, 255, 255, 0, true) end, 2000, 1, source) end ) ما اشتغل اخوي تابل Link to comment
TAPL Posted February 5, 2013 Share Posted February 5, 2013 جربت الكود و شغال تأكد أنك ضايفه في قروب أدمن Link to comment
xX|KeMo|Xx Posted February 5, 2013 Author Share Posted February 5, 2013 جربت الكود و شغالتأكد أنك ضايفه في قروب أدمن مشكوور اخوي تابل على المساعده بس به مشكله بسيطه نفس شوبك القديم اول ما اضفت الادد يوم تموت يجيك ادد وتطيح بالهواآاآ Link to comment
TAPL Posted February 6, 2013 Share Posted February 6, 2013 أتوقع أنك تستخدم أحد موداتي الي أنتشرت و هو الي يطيحك في الهوا Link to comment
xX|KeMo|Xx Posted February 6, 2013 Author Share Posted February 6, 2013 أتوقع أنك تستخدم أحد موداتي الي أنتشرت و هو الي يطيحك في الهوا اهاآ ولله شكرآ على المساعده اذا تبيني اشل موداتك ابشر 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