-
Posts
1,992 -
Joined
-
Last visited
-
Days Won
4
Everything posted by 3NAD
-
اصنع زر اغلاق بـ نفس اللوحة guiCreateButton guiSetVisible showCursor
-
لول الظاهر انك خذيته نسخ ولصق وماقريته على العموم تضيف الصوت بالميتا و عندكـ الكود تعدل اسم الصوت name.mp3 وإذا مشيت بالسيارة راح يشتغل #
-
الصوت يمشي مع السياره؟ ويطلع للي ييسوق بس؟ <<ملقوف يمشي مع السيارة ويسمعه كل الركاب
-
I didn't try it. crouch = false function funcInput ( ) if crouch == false then setPedControlState ( johnny, "crouch", true ) crouch = true else setPedControlState ( johnny, "crouch", false ) crouch = false end end bindKey ( "F4", "down", funcInput )
-
لوول نسيت احط تعريف السيارة بدال اللاعب بـ الكود ذا getElementSpeed ( localPlayer, "kmh" ) على العموم التصحيح -- Client Side function getElementSpeed ( element, unit ) if unit == nil then unit = 0 end if isElement ( element ) then local x,y,z = getElementVelocity ( element ) if ( unit == "mph" or unit == 1 or unit == "1" ) then return ( x^2 + y^2 + z^2 ) ^ 0.5 * 100 else return ( x^2 + y^2 + z^2 ) ^ 0.5 * 1.61 * 100 end else return false end end sound = playSound ( "name.mp3", true ) setSoundVolume ( sound, 0.5 ) setSoundPaused ( sound, true ) setTimer ( function ( ) if isPedInVehicle ( localPlayer ) then local theVehicle = getPedOccupiedVehicle ( localPlayer ) local theSpeed = getElementSpeed ( theVehicle, "kmh" ) if theSpeed > 10 then if isSoundPaused ( sound ) then setSoundPaused ( sound, false ) end else if not isSoundPaused ( sound ) then setSoundPaused ( sound, true ) end end end end , 1000, 0 )
-
@ hassan.k.s.a كودك بيجيب لآق بالسيرفر .. جرب كلنت -- Client Side function getElementSpeed ( element, unit ) if unit == nil then unit = 0 end if isElement ( element ) then local x,y,z = getElementVelocity ( element ) if ( unit == "mph" or unit == 1 or unit == "1" ) then return ( x^2 + y^2 + z^2 ) ^ 0.5 * 100 else return ( x^2 + y^2 + z^2 ) ^ 0.5 * 1.61 * 100 end else return false end end sound = playSound ( "name.mp3", true ) setSoundVolume ( sound, 0.5 ) setSoundPaused ( sound, true ) setTimer ( function ( ) if isPedInVehicle ( localPlayer ) then local theVehicle = getPedOccupiedVehicle ( localPlayer ) local theSpeed = getElementSpeed ( localPlayer, "kmh" ) if theSpeed > 10 then setSoundPaused ( sound, false ) else setSoundPaused ( sound, true ) end end end , 2500, 0 )
-
انا ما بسوي لك الكود اللي تبيه اعتمد على نفسكـ .. playSound
-
So, I can't test the Code without full informations . If my Code was Fault, Just put Full Code !! I have a petty question : - Why you are Angry of me ? looool !!
-
Because, I got like this problem and fixed it by ' tostring ' Definition !
-
مادري ليه , احس ان كودك بيصك باند اي واحد يغير نكه وسيرياله مو مضاف فيذا
-
Hmm.. I guess he get any values ( text or number ) and Convert it to string.
-
ما تقدر تعدله من الأدمنية .. استخدم الكود ذا setElementData ( source, "ID", 5 ) بس إحتمآل كبير يصير تعارض بين لاعبين نفس الأي دي و يضرب القيم معك ذذذذذ
-
@ onPlayerJoin No parameters. player ليه أضفت The source of this event is the player who joined. source == عنصر الإيفنت ذا
-
http://www.lua.org/manual/5.1/manual.html#pdf-tostring
-
function sortTimerj ( plr, timer, time ) if timer and time then if isTimer ( timerjTimer ) then killTimer ( timerjTimer ) end timerjTimer = setTimer ( function ( plr ) time = tostring ( time ) - 70 m, s, cs = msToTimeStr ( time ) fullTime = m..":"..s textItemSetText ( timer, "Time Left : "..tostring ( fullTime ) ) if plr then setElementData ( resourceRoot, getPlayerSerial ( plr ).. "-t", time ) end if ( tonumber ( m ) <= 0 and tonumber ( s ) <= 0 and tonumber ( cs ) <= 0 ) then onTimerFinish(plr,timer) end end , 50 , 0 , plr ) end end if not Working, Put your Full Code !
-
أضف ذا أول الملف function getElementSpeed ( element, unit ) if unit == nil then unit = 0 end if isElement ( element ) then local x,y,z = getElementVelocity(element) if ( unit == "mph" or unit == 1 or unit == "1" ) then return ( x^2 + y^2 + z^2 ) ^ 0.5 * 100 else return ( x^2 + y^2 + z^2 ) ^ 0.5 * 1.61 * 100 end else return false end end وبعدها تطبق عليه .. مثال addCommandHandler ( "checkSpeed", function ( thePlayer ) if isPedInVehicle ( thePlayer ) then local theVehicle = getPedOccupiedVehicle ( thePlayer ) local theSpeed = getElementSpeed ( theVehicle, "kmh" ) if theSpeed > 120 then outputChatBox ( "* Your Speed Is Too High ["..theSpeed.." km/h]", thePlayer, 255, 255, 0, true ) else outputChatBox ( "* Your Speed Is ["..theSpeed.." km/h]", thePlayer, 0, 255, 0, true ) end end end )
-
https://wiki.multitheftauto.com/wiki/OnConsole viewtopic.php?f=160&t=53732&p=521680&hilit=add#p521701