Stranger Posted February 18, 2013 Posted February 18, 2013 السلام عليكم يا شباب الكود هذا والله عجزت عنه يليت لو تضبطوه لاهنتم ا createTeam setTeamFriendlyFire
PaiN^ Posted February 18, 2013 Posted February 18, 2013 --> server addEventHandler( "onResourceStart", getResourceRootElement( getThisResource() ), function ( player ) if ( getElementType ( player ) == "player" ) then for i,Teams in ipairs ( getElementsByType ( "team" ) ) do local team = getTeamFromName ( "إسمـ الفريق" ) if ( team ) then outputChatBox( "A team with the same name already exist !!", player, 255, 0, 0, true ) setTeamFriendlyFire( "إسمـ الفريق", false ) else createTeam( "إسمـ الفريق", 255, 0, 0 ) setTeamFriendlyFire( "إسمـ الفريق", false ) end end end end ) بدل "إسمـ الفريق " بإسمـ فريقك وبيشتغل إن شاء الله
TAPL Posted February 18, 2013 Posted February 18, 2013 --> server addEventHandler( "onResourceStart", getResourceRootElement( getThisResource() ), function ( player ) if ( getElementType ( player ) == "player" ) then for i,Teams in ipairs ( getElementsByType ( "team" ) ) do local team = getTeamFromName ( "إسمـ الفريق" ) if ( team ) then outputChatBox( "A team with the same name already exist !!", player, 255, 0, 0, true ) setTeamFriendlyFire( "إسمـ الفريق", false ) else createTeam( "إسمـ الفريق", 255, 0, 0 ) setTeamFriendlyFire( "إسمـ الفريق", false ) end end end end ) بدل "إسمـ الفريق " بإسمـ فريقك وبيشتغل إن شاء الله lol?
hassan.k.s.a Posted February 18, 2013 Posted February 18, 2013 Example : >>Server Side Only<< team = createTeam("Test",255,255,255) setTeamFriendlyFire(team,false)
Stranger Posted February 18, 2013 Author Posted February 18, 2013 Example : >>Server Side Only<< team = createTeam("Test",255,255,255) setTeamFriendlyFire(team,false) الكودين ماضبطو
iMr.Dawix~# Posted February 18, 2013 Posted February 18, 2013 Example : >>Server Side Only<< team = createTeam("Test",255,255,255) setTeamFriendlyFire(team,false) الكودين ماضبطو !! الكود سيرفر
===|OSAMA|=== Posted February 18, 2013 Posted February 18, 2013 ^ الميتآ صحيحةة , بس انت وضح وش تبي تسوي بالضبطط ؟
Stranger Posted February 18, 2013 Author Posted February 18, 2013 ^ الميتآ صحيحةة , بس انت وضح وش تبي تسوي بالضبطط ؟ خلاص يلبى قلبك كان عندي خطأ وصلحته تسلمون يا شباب
Stranger Posted February 19, 2013 Author Posted February 19, 2013 ' طيب فيه طريقه يعني لو واد مثلاً سجل دخوله على طول يكون في تيم معين ؟
Stranger Posted February 19, 2013 Author Posted February 19, 2013 ' طيب فيه طريقه يعني لو واحد مثلاً سجل دخوله على طول يكون في تيم معين ؟
jafar Posted February 19, 2013 Posted February 19, 2013 (edited) "onPlayerLogin" setPlayerTeam Edited February 19, 2013 by Guest
Stranger Posted February 19, 2013 Author Posted February 19, 2013 كذا صح ؟ لو فيه خطأ عدلوه لاهنتم function createTeamTeamOnStart () TeamTeam = createTeam ( "Team", 0, 255, 0 ) end addEventHandler("onResourceStart", resourceRoot, createTeamTeamOnStart) function setTeamTeam() if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(هنا اسم الحساب)) then setPlayerTeam(هنا اسم الحساب, Team) end end addEventHandler("onPlayerLogin",getRootElement(),setTeamTeam)
===|OSAMA|=== Posted February 19, 2013 Posted February 19, 2013 إذا تبيه لحساب مخصص بقروب أدمن يصير كذآ Team = createTeam ( "Team", 0, 255, 0 ) addEventHandler ( "onPlayerLogin", root, function ( ) if isObjectInACLGroup ( "user.اسم الحساب", aclGetGroup ( "Admin" ) ) then setPlayerTeam ( source, Team ) end end ) أما إذا تبيه لأي حساب بقروب الأدمن يصير كذآ Team = createTeam ( "Team", 0, 255, 0 ) addEventHandler ( "onPlayerLogin", root, function ( ) if isObjectInACLGroup ( "user."..getAccountName ( getPlayerAccount ( source ) ), aclGetGroup ( "Admin" ) ) then setPlayerTeam ( source, Team ) end end ) وإذا تبيه لقروبات ثانية قلي #
3NAD Posted February 19, 2013 Posted February 19, 2013 TeamTeam = createTeam ( "Team", 0, 255, 0 ) function setTeamTeam ( PrivousAccount, RealAccount, AutoLogin ) if RealAccount == "الحساب" then setPlayerTeam ( source, TeamTeam ) end end addEventHandler ( "onPlayerLogin", root, setTeamTeam ) الوظايف هذي getAccountName getPlayerAccount ماتحتاجها . . ليه ؟ Parameters لأن في نفس الإيفنت هذا والباراميترس مثل مانقول بالعامية هي المعرّفات " بـ شد الـ ر و عندك 3 معرفات جاهزة Ps: thePreviousAccount: The account the player was logged into before theCurrentAccount: The account the player logged into just now autoLogin: Whether this login was a result of an autologin طبعاً هذي اللي تضيفها بـ أقواس الفنكشن مثل ماهو عندك بالكود function setTeamTeam ( PrivousAccount, RealAccount, AutoLogin ) طبعاً مو ضروري نفس الإسم يطابقه حرف حرف واتمنى كلامي مافيه اخطاء = )
Stranger Posted February 19, 2013 Author Posted February 19, 2013 إذا تبيه لحساب مخصص بقروب أدمن يصير كذآ Team = createTeam ( "Team", 0, 255, 0 ) addEventHandler ( "onPlayerLogin", root, function ( ) if isObjectInACLGroup ( "user.اسم الحساب", aclGetGroup ( "Admin" ) ) then setPlayerTeam ( source, Team ) end end ) أما إذا تبيه لأي حساب بقروب الأدمن يصير كذآ Team = createTeam ( "Team", 0, 255, 0 ) addEventHandler ( "onPlayerLogin", root, function ( ) if isObjectInACLGroup ( "user."..getAccountName ( getPlayerAccount ( source ) ), aclGetGroup ( "Admin" ) ) then setPlayerTeam ( source, Team ) end end ) وإذا تبيه لقروبات ثانية قلي # يا اسامه انا ابيه يعني احط حساب معين مو لازم في قروب ادمن حصاب عادي
Stranger Posted February 19, 2013 Author Posted February 19, 2013 إذا تبيه لحساب مخصص بقروب أدمن يصير كذآ Team = createTeam ( "Team", 0, 255, 0 ) addEventHandler ( "onPlayerLogin", root, function ( ) if isObjectInACLGroup ( "user.اسم الحساب", aclGetGroup ( "Admin" ) ) then setPlayerTeam ( source, Team ) end end ) أما إذا تبيه لأي حساب بقروب الأدمن يصير كذآ Team = createTeam ( "Team", 0, 255, 0 ) addEventHandler ( "onPlayerLogin", root, function ( ) if isObjectInACLGroup ( "user."..getAccountName ( getPlayerAccount ( source ) ), aclGetGroup ( "Admin" ) ) then setPlayerTeam ( source, Team ) end end ) وإذا تبيه لقروبات ثانية قلي # يا اسامه انا ابيه يعني احط حساب معين مو لازم في قروب ادمن حساب عادي
Stranger Posted February 19, 2013 Author Posted February 19, 2013 TeamTeam = createTeam ( "Team", 0, 255, 0 ) function setTeamTeam ( PrivousAccount, RealAccount, AutoLogin ) if RealAccount == "الحساب" then setPlayerTeam ( source, TeamTeam ) end end addEventHandler ( "onPlayerLogin", root, setTeamTeam ) الوظايف هذي getAccountName getPlayerAccount ماتحتاجها . . ليه ؟ Parameters لأن في نفس الإيفنت هذا والباراميترس مثل مانقول بالعامية هي المعرّفات " بـ شد الـ ر و عندك 3 معرفات جاهزة Ps: thePreviousAccount: The account the player was logged into before theCurrentAccount: The account the player logged into just now autoLogin: Whether this login was a result of an autologin طبعاً هذي اللي تضيفها بـ أقواس الفنكشن مثل ماهو عندك بالكود function setTeamTeam ( PrivousAccount, RealAccount, AutoLogin ) طبعاً مو ضروري نفس الإسم يطابقه حرف حرف واتمنى كلامي مافيه اخطاء = ) تسلم يا عناد
Stranger Posted February 19, 2013 Author Posted February 19, 2013 TeamTeam = createTeam ( "Team", 0, 255, 0 ) function setTeamTeam ( PrivousAccount, RealAccount, AutoLogin ) if RealAccount == "الحساب" then setPlayerTeam ( source, TeamTeam ) end end addEventHandler ( "onPlayerLogin", root, setTeamTeam ) الوظايف هذي getAccountName getPlayerAccount ماتحتاجها . . ليه ؟ Parameters لأن في نفس الإيفنت هذا والباراميترس مثل مانقول بالعامية هي المعرّفات " بـ شد الـ ر و عندك 3 معرفات جاهزة Ps: thePreviousAccount: The account the player was logged into before theCurrentAccount: The account the player logged into just now autoLogin: Whether this login was a result of an autologin طبعاً هذي اللي تضيفها بـ أقواس الفنكشن مثل ماهو عندك بالكود function setTeamTeam ( PrivousAccount, RealAccount, AutoLogin ) طبعاً مو ضروري نفس الإسم يطابقه حرف حرف واتمنى كلامي مافيه اخطاء = ) تسلم يا عناد بس ماضبط
PaiN^ Posted February 19, 2013 Posted February 19, 2013 Team = createTeam( "Team", 0, 255, 0 ) addEventHandler( "onPlayerLogin", root, function ( theCurrentAccount ) if ( theCurrentAccount == "user.إسم الحساب" ) then setPlayerTeam( source, "Team" ) end end )
===|OSAMA|=== Posted February 19, 2013 Posted February 19, 2013 TeamTeam = createTeam ( "Team", 0, 255, 0 ) function setTeamTeam ( PrivousAccount, RealAccount, AutoLogin ) if RealAccount == "الحساب" then setPlayerTeam ( source, TeamTeam ) end end addEventHandler ( "onPlayerLogin", root, setTeamTeam ) الوظايف هذي getAccountName getPlayerAccount ماتحتاجها . . ليه ؟ Parameters لأن في نفس الإيفنت هذا والباراميترس مثل مانقول بالعامية هي المعرّفات " بـ شد الـ ر و عندك 3 معرفات جاهزة Ps: thePreviousAccount: The account the player was logged into before theCurrentAccount: The account the player logged into just now autoLogin: Whether this login was a result of an autologin طبعاً هذي اللي تضيفها بـ أقواس الفنكشن مثل ماهو عندك بالكود function setTeamTeam ( PrivousAccount, RealAccount, AutoLogin ) طبعاً مو ضروري نفس الإسم يطابقه حرف حرف واتمنى كلامي مافيه اخطاء = ) ^ Wrong -_-" ============= Parametersلو يبي تستخدم الـ يصصير كذآ , -- Server Side ! Team = createTeam ( "Team", 0, 255, 0 ) addEventHandler ( "onPlayerLogin", root, function ( _, Account ) if getAccountName ( Account ) == "إسم الحساب" then setPlayerTeam( source, Team ) end end )
Stranger Posted February 19, 2013 Author Posted February 19, 2013 TeamTeam = createTeam ( "Team", 0, 255, 0 ) function setTeamTeam ( PrivousAccount, RealAccount, AutoLogin ) if RealAccount == "الحساب" then setPlayerTeam ( source, TeamTeam ) end end addEventHandler ( "onPlayerLogin", root, setTeamTeam ) الوظايف هذي getAccountName getPlayerAccount ماتحتاجها . . ليه ؟ Parameters لأن في نفس الإيفنت هذا والباراميترس مثل مانقول بالعامية هي المعرّفات " بـ شد الـ ر و عندك 3 معرفات جاهزة Ps: thePreviousAccount: The account the player was logged into before theCurrentAccount: The account the player logged into just now autoLogin: Whether this login was a result of an autologin طبعاً هذي اللي تضيفها بـ أقواس الفنكشن مثل ماهو عندك بالكود function setTeamTeam ( PrivousAccount, RealAccount, AutoLogin ) طبعاً مو ضروري نفس الإسم يطابقه حرف حرف واتمنى كلامي مافيه اخطاء = ) ^ Wrong -_-" ============= Parametersلو يبي تستخدم الـ يصصير كذآ , -- Server Side ! Team = createTeam ( "Team", 0, 255, 0 ) addEventHandler ( "onPlayerLogin", root, function ( _, Account ) if getAccountName ( Account ) == "إسم الحساب" then setPlayerTeam( source, Team ) end end ) تسلم يالغالي اشتغل بس فيه شي لو ابي اضيف حساب ثاني يصير كذا ؟ if getAccountName ( Account ) == "اسم الحساب" or if getAccountName ( Account ) == "اسم الحساب" then
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