Hussain Posted April 18, 2012 Share Posted April 18, 2012 السلام عليكم ورحمة الله وبركاته اليوم عندي كود يكون اي ادمن يسجل دخوله يجي تيم الادمنيه تلقائياً ولكن مو عآرف ايش يكون Server.lua or Client.lua مع الششرح لو سمحتم و عندي سؤال يا شباب .. هل من الممكن تضيفون على الكود لما يسجل دخوله الادمن بالادمنيه يجي بالشات ان هذا الادمن دخل function createAdminTeamOnStart () AdminTeam = createTeam ( "Admin", 0, 255, 0 )-- create a new team and named it 'Admin' end addEventHandler("onResourceStart", resourceRoot, createAdminTeamOnStart) -- add an event handler function setAdminTeam() if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then -- if he is admin setPlayerTeam(source, AdminTeam) -- set him to admin team end end addEventHandler("onPlayerLogin",getRootElement(),setAdminTeam) -- add an event handler وششكرا Link to comment
TAPL Posted April 18, 2012 Share Posted April 18, 2012 ._. لول المثال ذا أنا الي مسويه بالويكي server.lua function createAdminTeamOnStart () AdminTeam = createTeam ( "Admin", 0, 255, 0 )-- create a new team and named it 'Admin' end addEventHandler("onResourceStart", resourceRoot, createAdminTeamOnStart) -- add an event handler function setAdminTeam() if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then -- if he is admin setPlayerTeam(source, AdminTeam) -- set him to admin team outputChatBox("Admin: "..getPlayerName(source).." has join the server",root,255,255,0) end end addEventHandler("onPlayerLogin",getRootElement(),setAdminTeam) -- add an event handler Link to comment
Hussain Posted April 18, 2012 Author Share Posted April 18, 2012 ._. لول المثال ذا أنا الي مسويه بالويكيserver.lua function createAdminTeamOnStart () AdminTeam = createTeam ( "Admin", 0, 255, 0 )-- create a new team and named it 'Admin' end addEventHandler("onResourceStart", resourceRoot, createAdminTeamOnStart) -- add an event handler function setAdminTeam() if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then -- if he is admin setPlayerTeam(source, AdminTeam) -- set him to admin team outputChatBox("Admin: "..getPlayerName(source).." has join the server",root,255,255,0) end end addEventHandler("onPlayerLogin",getRootElement(),setAdminTeam) -- add an event handler ماشاء الله عليك مشكوور عالتعديل ولكن بسألك هو ماشتغل يمكن من الميتا ؟ انا كاتب فيها Link to comment
TAPL Posted April 18, 2012 Share Posted April 18, 2012 الميتا مضبوط مافيه أخطاء تأكد أنك في قروب أدمن و إذا تبية يضبط مع قروبات ثانية مثلاً الموديتور و غيره جرب ذا الكود function createAdminTeamOnStart () AdminTeam = createTeam ( "Admin", 0, 255, 0 )-- create a new team and named it 'Admin' end addEventHandler("onResourceStart", resourceRoot, createAdminTeamOnStart) -- add an event handler function setAdminTeam() if hasObjectPermissionTo(source,"general.adminpanel",false) then -- if he is admin setPlayerTeam(source, AdminTeam) -- set him to admin team outputChatBox("Admin: "..getPlayerName(source).." has join the server",root,255,255,0) end end addEventHandler("onPlayerLogin",getRootElement(),setAdminTeam) -- add an event handler Link to comment
Hussain Posted April 18, 2012 Author Share Posted April 18, 2012 الميتا مضبوط مافيه أخطاءتأكد أنك في قروب أدمن و إذا تبية يضبط مع قروبات ثانية مثلاً الموديتور و غيره جرب ذا الكود function createAdminTeamOnStart () AdminTeam = createTeam ( "Admin", 0, 255, 0 )-- create a new team and named it 'Admin' end addEventHandler("onResourceStart", resourceRoot, createAdminTeamOnStart) -- add an event handler function setAdminTeam() if hasObjectPermissionTo(source,"general.adminpanel",false) then -- if he is admin setPlayerTeam(source, AdminTeam) -- set him to admin team outputChatBox("Admin: "..getPlayerName(source).." has join the server",root,255,255,0) end end addEventHandler("onPlayerLogin",getRootElement(),setAdminTeam) -- add an event handler يعطييك ربي ألف عافية تأبر قلبي ض1 طيب اخوي اقدر اخلي الي يخش هالتيم مثلآ ياخذ شخصية معينه ؟ واتمنى ما ثقلت عليك Link to comment
X-SHADOW Posted April 18, 2012 Share Posted April 18, 2012 function createAdminTeamOnStart () AdminTeam = createTeam ( "Admin", 0, 255, 0 )-- create a new team and named it 'Admin' end addEventHandler("onResourceStart", resourceRoot, createAdminTeamOnStart) -- add an event handler function setAdminTeam() if hasObjectPermissionTo(source,"general.adminpanel",false) then -- if he is admin setPlayerTeam(source, AdminTeam) -- set him to admin team setElementModel(source, 20) --- 20 رقم الشخصية outputChatBox("Admin: "..getPlayerName(source).." has join the server",root,255,255,0) end end addEventHandler("onPlayerLogin",getRootElement(),setAdminTeam) -- add an event handler Link to comment
Hussain Posted April 18, 2012 Author Share Posted April 18, 2012 function createAdminTeamOnStart () AdminTeam = createTeam ( "Admin", 0, 255, 0 )-- create a new team and named it 'Admin' end addEventHandler("onResourceStart", resourceRoot, createAdminTeamOnStart) -- add an event handler function setAdminTeam() if hasObjectPermissionTo(source,"general.adminpanel",false) then -- if he is admin setPlayerTeam(source, AdminTeam) -- set him to admin team setElementModel(source, 20) --- 20 رقم الشخصية outputChatBox("Admin: "..getPlayerName(source).." has join the server",root,255,255,0) end end addEventHandler("onPlayerLogin",getRootElement(),setAdminTeam) -- add an event handler والله انكم شنبأإت يعطيكم العافية عالمسساعده الله يجعلها في ميزآن حسناتكم والله يزيدكم من علمه 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