BLACKHACK Posted July 26, 2012 Share Posted July 26, 2012 السلام عليكم أريد اسأل سؤال , كيف أحط أمر (command handler) للكود هذا بحيث أكتب /alive يطلعلي اللاعبين الغير ميتين أو الصاحيين -- Print a list of all the alive players alivePlayers = getAlivePlayers () if ( alivePlayers ) then -- if we got the table alivePlayersList = "none" -- Loop through the table for playerKey, playerValue in ipairs(alivePlayers) do -- add their name to the list if ( alivePlayersList == "none" ) then alivePlayersList = getPlayerName ( playerValue ) else alivePlayersList = alivePlayersList .. ", " .. getPlayerName ( playerValue ) end end outputChatBox ( "Alive Players: " .. alivePlayersList ) end الكود من الويكي Link to comment
Tete omar Posted July 26, 2012 Share Posted July 26, 2012 -- Print a list of all the alive players function alivePlayers() alivePlayers = getAlivePlayers () if ( alivePlayers ) then -- if we got the table alivePlayersList = "none" -- Loop through the table for playerKey, playerValue in ipairs(alivePlayers) do -- add their name to the list if ( alivePlayersList == "none" ) then alivePlayersList = getPlayerName ( playerValue ) else alivePlayersList = alivePlayersList .. ", " .. getPlayerName ( playerValue ) end end outputChatBox ( "Alive Players: " .. alivePlayersList ) end addCommandHandler("alive",alivePlayers) Link to comment
BLACKHACK Posted July 27, 2012 Author Share Posted July 27, 2012 ايش معنى او ايش تسوي alivePlayers addCommandHandler("alive",alivePlayers) وهل هي ضروريه ؟ Link to comment
Tete omar Posted July 27, 2012 Share Posted July 27, 2012 ايش معنى او ايش تسوي alivePlayersaddCommandHandler("alive",alivePlayers) وهل هي ضروريه ؟ عفواً؟. طيب طلما ما تعرف ايش معناها وايش تسوي ليش تحط الموضوع من الأصل ؟! Link to comment
BLACKHACK Posted July 28, 2012 Author Share Posted July 28, 2012 ايش معنى او ايش تسوي alivePlayersaddCommandHandler("alive",alivePlayers) وهل هي ضروريه ؟ عفواً؟. طيب طلما ما تعرف ايش معناها وايش تسوي ليش تحط الموضوع من الأصل ؟! لا أنا عارف انت مش فهمتني Syntax أنا قصدي يعني ايش وظيفتها في الجملة ؟ ولا ممكن اكتب اي شي بها Link to comment
TAPL Posted July 28, 2012 Share Posted July 28, 2012 ذا أسم الفنكشن function alivePlayers() .. addCommandHandler("alive",alivePlayers) Link to comment
BLACKHACK Posted July 29, 2012 Author Share Posted July 29, 2012 الكود ما اشتغل لما اكتب alive ما يحصل شي Link to comment
Tete omar Posted July 29, 2012 Share Posted July 29, 2012 اكيد حاط السكربت client side لازم تحطها server side Link to comment
BLACKHACK Posted July 29, 2012 Author Share Posted July 29, 2012 اكيد حاط السكربت client side لازم تحطها server side من فين ؟ معليش على أسألتي الكثيرة بس أنا حاب اتعلم Link to comment
Tete omar Posted July 29, 2012 Share Posted July 29, 2012 اكيد حاط السكربت client side لازم تحطها server side من فين ؟ معليش على أسألتي الكثيرة بس أنا حاب اتعلم عايدي اسآل بس اسئلة منتقية اعرض ملف meta.xml حق السكربت هنا Link to comment
BLACKHACK Posted July 29, 2012 Author Share Posted July 29, 2012 <meta> <info author="BLACK-HACK" version="1.0.0" type="script" /> <script src="script.lua" type="server"/> </meta> Link to comment
TAPL Posted July 29, 2012 Share Posted July 29, 2012 function alivePlayers(p) alivePlayersList = "none" for i, player in ipairs(getAlivePlayers()) do if alivePlayersList == "none" then alivePlayersList = getPlayerName(player) else alivePlayersList = alivePlayersList..", "..getPlayerName(player) end end outputChatBox("Alive Players: "..alivePlayersList,p,255,255,255) end addCommandHandler("alive",alivePlayers) Link to comment
BLACKHACK Posted July 31, 2012 Author Share Posted July 31, 2012 function alivePlayers(p) alivePlayersList = "none" for i, player in ipairs(getAlivePlayers()) do if alivePlayersList == "none" then alivePlayersList = getPlayerName(player) else alivePlayersList = alivePlayersList..", "..getPlayerName(player) end end outputChatBox("Alive Players: "..alivePlayersList,p,255,255,255) end addCommandHandler("alive",alivePlayers) يعني كود الويكي خطأ ؟ Link to comment
Tete omar Posted July 31, 2012 Share Posted July 31, 2012 function alivePlayers(p) alivePlayersList = "none" for i, player in ipairs(getAlivePlayers()) do if alivePlayersList == "none" then alivePlayersList = getPlayerName(player) else alivePlayersList = alivePlayersList..", "..getPlayerName(player) end end outputChatBox("Alive Players: "..alivePlayersList,p,255,255,255) end addCommandHandler("alive",alivePlayers) يعني كود الويكي خطأ ؟ الويكي عاطياك مثال يعني لو انت منت فاهم وش هالوظيفة / فنكشن تسوي , يعطيك مثال تفهم وش تسوي Link to comment
BLACKHACK Posted July 31, 2012 Author Share Posted July 31, 2012 الكود هذا برضه ما اشتغل Link to comment
TAPL Posted July 31, 2012 Share Posted July 31, 2012 الكود هذا برضه ما اشتغل الكود شغال عندي. Link to comment
Tete omar Posted July 31, 2012 Share Posted July 31, 2012 الكود هذا برضه ما اشتغل الكود شغال 100% ... Link to comment
#[swat]Alooy Posted July 31, 2012 Share Posted July 31, 2012 function alivePlayers() .. addCommandHandler("alive",alivePlayers) server Link to comment
TAPL Posted July 31, 2012 Share Posted July 31, 2012 function alivePlayers() .. addCommandHandler("alive",alivePlayers) server Link to comment
Tete omar Posted August 1, 2012 Share Posted August 1, 2012 (edited) function alivePlayers() .. addCommandHandler("alive",alivePlayers) Edited August 1, 2012 by Guest Link to comment
top sniper Posted August 1, 2012 Share Posted August 1, 2012 function alivePlayers() .. addCommandHandler("alive",alivePlayers) server تستهبل ولا زيادة مشاركات؟ Link to comment
BLACKHACK Posted August 1, 2012 Author Share Posted August 1, 2012 الكود اشتغل شكرا بس في الصباح ما اشتغل ما ادري ليش يمكن كان صااايم ههههههههه Link to comment
Tete omar Posted August 1, 2012 Share Posted August 1, 2012 الكود اشتغل شكرا بس في الصباح ما اشتغل ما ادري ليش يمكن كان صااايم ههههههههه مبروك 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