ABO-SR777777A Posted March 18, 2013 Share Posted March 18, 2013 السلام عليكم شباب انا سويت كود واقصد فيه اذا دق رقم اربعه يطلع له صوت وكلام ومايقدر يدقه مره ثانيه الا بعد 6 ثواني سويت الكود لو كان في خطأ و شي ساعدوني bindKey("num_4", "down", function() playSound("headshot.mp3") end) outputChatBox ("Instant text!") setTimer ( function() outputChatBox ( "5 second delay text!" ) end, 5000, 1 ) addCommandHandler("gettime", currentTime ؟؟؟ وش الخطآ Link to comment
MSHOOSH Posted March 18, 2013 Share Posted March 18, 2013 (edited) bindKey("num_4", "down", function() playSound("headshot.mp3") outputChatBox ("Instant text!") end) setTimer ( function() outputChatBox ( "5 second delay text!" ) end, 6000, 1 ) addCommandHandler("gettime", currentTime ) ----؟ ضفت ) addCommandHandler("gettime", currentTime ) الحدث : gettime ؟؟ اسم الوظيفة : currentTime ؟؟؟ و مو موجود في الكود الوقت 1 ثانيه = 1000 6 x 1000 = 6000 يفيدوك الشباب Edited March 18, 2013 by Guest Link to comment
Bssol Posted March 18, 2013 Share Posted March 18, 2013 local timer function playTheSound() if not ( isTimer(timer) ) then timer = setTimer(function() end, 6000, 1) playSound("headshot.mp3") outputChatBox ("Instant text!") end end bindKey("num_4", "down", playTheSound) Link to comment
ABO-SR777777A Posted March 18, 2013 Author Share Posted March 18, 2013 local timer function playTheSound() if not ( isTimer(timer) ) then timer = setTimer(function() end, 6000, 1) playSound("headshot.mp3") outputChatBox ("Instant text!") end end bindKey("num_4", "down", playTheSound) الحين سار يطللع كلام ؟؟ وبعد 5 ثواني ينضغط؟ Link to comment
Bssol Posted March 18, 2013 Share Posted March 18, 2013 جاي تسأل؟؟؟؟ ياخي جرب وشوف وش يصير ذذ Link to comment
ABO-SR777777A Posted March 18, 2013 Author Share Posted March 18, 2013 جربته لكن الثواني قليله ابيها 6 ثواني وابي لو انا مثلا بتيم الاول والتيم الثاني واحد دق الزر مااسمع الصوت يسمعه الى بتيم حقه بس Link to comment
MSHOOSH Posted March 18, 2013 Share Posted March 18, 2013 بالنسبه للثواني 1000 = ثانيه 6000 = 6 ثواني + استخدم getPlayerTeam Link to comment
ABO-SR777777A Posted March 18, 2013 Author Share Posted March 18, 2013 يسير كذا local timer function playTheSound() if not ( isTimer(timer) ) then local oldTeamName = getTeamName ( playerTeam ) setTeamName ( playerTeam, newTeamName ) timer = setTimer(function() end, 8000, 1) playSound("headshot.mp3") outputChatBox ("Instant text!") end end bindKey("num_4", "down", playTheSound) Link to comment
MSHOOSH Posted March 18, 2013 Share Posted March 18, 2013 استخدم getPlayerTeam ---ياتي بفريق اللاعب انت استخدمت getTeamName ---ياتي باسم الفريق Link to comment
ABO-SR777777A Posted March 18, 2013 Author Share Posted March 18, 2013 كذا local timer function playTheSound() if not ( isTimer(timer) ) then local oldTeamName = getPlayerTeam ( player ) setTeamName ( playerTeam, newTeamName ) timer = setTimer(function() end, 8000, 1) playSound("headshot.mp3") outputChatBox ("Instant text!") end end bindKey("num_4", "down", playTheSound) Link to comment
MSHOOSH Posted March 18, 2013 Share Posted March 18, 2013 local timer function playTheSound() if not ( isTimer(timer) ) then timer = setTimer(function() end, 8000, 1) S = playSound("headshot.mp3") outputChatBox ("Instant text!") local playerTeam = getPlayerTeam ( source ) if ( playerTeam ) then stopSound ( S ) end end end bindKey("num_4", "down", playTheSound) Link to comment
PaiN^ Posted March 18, 2013 Share Posted March 18, 2013 client : function playTheSound ( ) if not ( isTimer ( timer ) ) then timer = setTimer ( function ( ) end, 8000, 1 ) team = getPlayerTeam ( localPlayer ) if ( team ) and ( getTeamName ( team ) == 'اسم الفريق' ) then playSound ( 'headshot.mp3' ) outputChatBox ( 'Instant text!' ) end end end bindKey ( 'num_4', 'down', playTheSound ) Link to comment
TAPL Posted March 18, 2013 Share Posted March 18, 2013 ^ لا تخربطون كثير جربته لكن الثواني قليله ابيها 6 ثوانيوابي لو انا مثلا بتيم الاول والتيم الثاني واحد دق الزر مااسمع الصوت يسمعه الى بتيم حقه بس إذا تبي كل الي معك بالتيم يسمعون الصوت لازم تسوي الكود سيرفر و تسوي ترقير من السيرفر إلى الكلينت 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