-
Posts
4,429 -
Joined
-
Last visited
Everything posted by #DRAGON!FIRE
-
متاكد انه ذا كود ؟؟ ججرب .. amountFix = سعر الأصصلأح amountNitro = سعر النيترو amountFlip = سعر الأنقلأب local amountFix = 1000 local amountNitro = 2000 local amountFlip = 3000 addEventHandler( "onResourceStart", resourceRoot, function ( ) for _,plrs in ipairs( getElementsByType("player") ) do bindKey( plrs, "1", "Down", Fix) bindKey( plrs, "2", "Down", Flip) bindKey( plrs, "3", "Down", Nitro) end end ) addEventHandler( "onPlayerJoin", root, function ( ) bindKey( source, "1", "Down", Fix) bindKey( source, "2", "Down", Flip) bindKey( source, "3", "Down", Nitro) end ) function Fix ( plr ) if ( isPedInVehicle( plr ) ) then if ( getPlayerMoney( plr ) >= tonumber( amountFix ) ) then takePlayerMoney( plr, tonumber( amountFix ) ) fixVehicle( getPedOccupiedVehicle( plr ) ) outputChatBox("#FF0000 ** You've bought Fix !", plr,255,255,255,true) else outputChatBox("#FF0000 ** You Don't Have enough Money.", plr,255,255,255,true) end else outputChatBox("#FF0000 ** You Are not in The Vehicle", plr,255,0,0,true) end end function Flip ( plr ) if ( isPedInVehicle( plr ) ) then if ( getPlayerMoney( plr ) >= tonumber( amountFlip ) ) then takePlayerMoney( plr, tonumber( amountFlip ) ) local rx, ry, rz = getElementRotation(getPedOccupiedVehicle( plr )) setElementRotation ( getPedOccupiedVehicle( plr ), 0, 0, rx > 90 and rx < 279 and rz + 180 or rz ) outputChatBox("#FF0000 ** You've bought Flip !", plr,255,255,255,true) else outputChatBox("#FF0000 ** You Don't Have enough Money.", plr,255,255,255,true) end else outputChatBox("#FF0000 ** You Are not in The Vehicle", plr,255,0,0,true) end end function Nitro ( plr ) if ( isPedInVehicle( plr ) ) then if ( getPlayerMoney( plr ) >= tonumber( amountNitro ) ) then takePlayerMoney( plr, tonumber( amountNitro ) ) addVehicleUpgrade( getPedOccupiedVehicle( plr ), 1010 ) outputChatBox("#FF0000 ** You've bought a nitro !", plr,255,255,255,true) else outputChatBox("#FF0000 ** You Don't Have enough Money.", plr,255,255,255,true) end else outputChatBox("#FF0000 ** You Are not in The Vehicle", plr,255,0,0,true) end end
-
الكود ضابط لكن فيه مشكلة لما ادخل ومعي كونسل يقتلني ابيه ينقل بدون مايقتلني واللي غير الرتب الموجوده بالجدول يقتله local Groups = { "Police.Manger", "Police", "Console", }; function Move ( element ) local acc = getPlayerAccount ( element ) if not isGuestAccount ( acc ) then for i, group in ipairs ( Groups ) do if isObjectInACLGroup ( "user." .. getAccountName ( acc ), aclGetGroup ( group ) ) then setElementPosition( element, x, y, z ) else killPed ( element ) end end end end
-
ممكن يجي لاق .. بس القصة انه انت لو ما شلته بصير في قيم كثيرة بالجدول ممكن تجيب بعض اللاق او بعض الاخطاء .. من الاحسن انك تشيلها
-
للحين ما فهمت .. وش تبي تسوي بالضبط
-
من قلك الجدول للاعب ولأ لسيارة .. هو مسوي البلب على اللاعب .. وشال اللاعب من الجدول
-
الكود عفسة .. وش تبي تسوي بالضبط ؟
-
وليه تسوي السالفة ذي كلها ؟؟ ؟؟ اكيد اكيد لوحة التسجيل يكون فيها تحققات .. ليش تطول الكود وتريقر ومدري وش # اجل ليه اسمها لوحة تسجيل .. هو الي عليه ينفذ الوظايف بعد التحققات وانتهى الأمر + وبهالحالة اللاعب يقوم بتسجيل خروجه ثم يسجل دخوله وبكذا يتخلص من التظليل fadeCamera ممكن يكون فيه مودات ثانية تستخدم وظيفة
-
ويتحقق من وجود النافذة !! ؟ onPlayerLogin كيف تقول يستخدم
-
createObject bindKey getPlayerTeam getTeamFromName moveObject
-
اعتقد انك طرحت موضوع قبل ذا وعطيتك جاهز .. حاول بنفسك ونساعدك
-
fadeCamera - showChat Event: onClientGUIClick fadeCamera showChat
-
Event: "onMarkerHit" getPlayerTeam setElementPosition
-
تيمات محددة ؟ .. ,ولأ كل واحد معاه تيم يقدر ينتقل ؟
-
.. ما فيه تحديد انه اللي دخل لاعب او اي شي فـ انت لازم تعرف اللي دخل .. ممكن اللي يدخل لاعب او سيارة او صوت او بيد الخ onMarkerHit حدث فـ انت بتجي تتحق من تيم اللاعب اسم الفنكشن : getPlayerTeam يعني لاعب .. فـ ممكن تجي تدخل سيارة .. تتحق من التيم حق السيارة ؟ ؟ او ممكن يدخل بيد ذذ فـ عشان كذا نتحقق
-
x, y, z = الاحداثيات اللي ينتقل لها اللاعب .. TeamName = اسم التيم marker = createMarker ( ...... ) local x, y, z = local TeamName = "Your Team" addEventHandler ( "onMarkerHit", marker, function ( element ) if getElementType ( element ) == "player" then if ( getPlayerTeam( element ) and getPlayerTeam( element ) == getTeamFromName( TeamName ) ) then setElementPosition( element, x, y, z ) end end end )
-
Returns the substring of s that starts at i and continues until j; i and j can be negative. If j is absent, then it is assumed to be equal to -1 (which is the same as the string length). In particular, the call string.sub(s,1,j) returns a prefix of s with length j, and string.sub(s, -i) returns a suffix of s with length i. بأختصار فائتدها : تحدد لك بداية او نهاية السلسلة في بعد التكست اللي تحطه 2 ارقمنت الاول يحدد بداية السلسلة .. والثاني يحدد لك نهاية السلسلة مثال بسيط : .. local Text = "ZA7F Forum Mta" addEventHandler( "onResourceStart", resourceRoot, function( ) local GetSub = string.sub ( Text , 5 ) outputChatBox ( "** Text = "..GetSub, getRootElement( ), 255, 0, 0, true ) end )
-
وش فرق كودك عن هذا ؟؟ [quote="TAPL"][lua]addEventHandler("onPlayerJoin", root, function() local ValidSkins = getValidPedModels() setElementModel(source, ValidSkins[math.random(#ValidSkins)]) end) [/lua] كوبي بست مو قصة كوبي بست .. بس فهمت وش الغلط وصصحت الكود حقي عشان يبان انه كان غلط ذذ
-
صح .. معاكم حق , ما بياخذ قيمة وحدة يصير كذا addEventHandler( "onPlayerJoin", root, function ( ) local ValidSkins = getValidPedModels ( ) setElementModel( source, ValidSkins[math.random( #ValidSkins )] ) end )
-
addEventHandler( "onPlayerJoin", root, function ( ) local ValidSkins = getValidPedModels ( ) for k, skin in ipairs( ValidSkins ) do setElementModel(source, math.random( skin ) ) end end ) ما زبط debugscript 3
-
addEventHandler( "onPlayerJoin", root, function ( ) local ValidSkins = getValidPedModels ( ) for k, skin in ipairs( ValidSkins ) do setElementModel(source, math.random( skin ) ) end end )
-
Event: "onPlayerJoin" spawnPlayer math.random او .. Event: "onPlayerSpawn" setElementModel math.random Event: "onClientGUIClick" setElementModel math.random
-
الفائدة منه عشان اللون يتغير بشكل مستمر ..
-
هذا القيم مود الاصلي .. يعني يختلف عن الباقي الباقين فيهم حسابات اكثر واكثر . زي ما قلت لك الشي يعتمد اكثر على قوة حسابك وفهمك للرياضيات . وتقدر انك تجلس تجرب رقم رقم خخ .. وهي بالعموم كذا تجرب لين تضبط معاك .. بس اللي يعرف بالرياضيات اكثر ما يحتاج كذا تقدر تسويها بدون اي حسابات .. بس راح تكون مو مناسبة لكل احجام الشاشات