Jump to content

iMr.SFA7

Members
  • Posts

    2,013
  • Joined

  • Last visited

Everything posted by iMr.SFA7

  1. setCloudsEnabled ( false ) setTimer( function ( ) infernustxd = engineLoadTXD("infernus.txd") engineImportTXD(infernustxd, 411) infernusdff = engineLoadDFF("infernus.dff", 411) engineReplaceModel(infernusdff, 411) end,2000,0 ) الي ما خلص تحميلهم ما راح تتبدل لين يخلصوا #
  2. ^ متأكد أنك سويت سطر واحد من الكود ذا؟ text = ".:[حياكم الله بسيرفر جراند العرب]:."
  3. كود تسجيل الدخول؟ زر التشغيل؟
  4. قيم مود جميل لاهنت عليه أن شاء الله يجيك بليل وأنت نايم | =
  5. غالباً ما تكون المشكلة من الأحداثيات !! راجع الأحداثيات الي حاطها !
  6. غالباً ما تكون المشكلة من الأحداثيات ذذذ
  7. function jaber(thePlayer) givePlayerMoney ( thePlayer, 1000000 ) end addCommandHandler ( "Give", jaber ) هذا ~ حيآكـ ذذ أنت لو تدخل الويكي راح تلاحظ أرقمنتات الوظيفة وكم عندها أرقمنت وظيفة أعطاء الفلوس أرقمنتين bool givePlayerMoney ( player thePlayer, int amount ) player thePlayer = اللاعب الي راح تعطيه int amount = الفلوس الي راح تعطيه ذذ
  8. source? عندك أرقمنت زايد
  9. -- M7mdAl7arthy -- -- Skype: M7mdAl7arthy -- -- Updated: 3NAD -- getTDByType = { --[[ { 'car name', car id, 'file Path' }; --]] { '1sHiLuX_Khli-909-2014', 491, 'xCar7' }; { 'Camry 2006', 585, 'xCar17' }; { 'Taho', 502, 'xCar20' }; }; Languages = { ["English"] = { ["Information"] = "Welcome @ 6ArH Server's, \n\nIf you have a bad Video Card ' Law FPS '\nof Real Cars,\n\nYou can stop it by this script..\n\nIt's so easily :\n- Select any car.\n- Press \" Run / Stop Selected \".\n\nYou can open this window again\nby pressing ' / '\n\nWe hope you have fun : )"; ["Run Or Stop"] = "Run / Stop Selected"; ["Run All"] = "Run All"; ["Stop All"] = "Stop All"; }; ["عربي"] = { ["Information"] = "مرحباً بكم في سيرفرات طارهـ,\n\nإذا كآن لديك كرت شاشة سيء ' FPS منخفض '\nو تعاني من الـ ' لاق ' بـسبب السيارات\n\nيمكنك إيقاف السيارات بواسطة هذا السكربت\n\nتابع الخطوات :\n- أختر اي سيارة من القائمة.\n- أضغط ' إيقاف / تشغيل '.\n\nيمكنك فتح هذه النافذة مرة أخرى\nبواسطة الزر ' ظ '\n\n نتمنى لكم قضاء اوقات سعيدة"; ["Run Or Stop"] = "تشغيل / إيقاف"; ["Run All"] = "تشغيل الكل"; ["Stop All"] = "إيقاف الكل"; }; } Enad = { button = {}, window = {}, gridlist = {}, label = {}, combobox = {}, } function guiCreateWindow( x2, y2, width2, height2, titleBarText2, relative2 ) local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2, "Back.png", relative2 ) local mainBackgroundLabel = guiCreateLabel ( 91, 29, 611, 544, titleBarText2, false, mainBackground ) guiSetFont ( mainBackgroundLabel, newFont2 ) guiSetEnabled ( mainBackgroundLabel, false ) return mainBackground end load_ = true i = true addEventHandler("onClientResourceStart", resourceRoot, function() Enad.window[1] = guiCreateWindow(120, 138, 571, 328, "", false) guiWindowSetSizable(Enad.window[1], false) guiSetVisible (Enad.window[1],false ) Enad.gridlist[1] = guiCreateGridList(18, 28, 264, 252, false, Enad.window[1]) Enad.label[1] = guiCreateLabel(294, 59, 266, 252, "Welcome @ 6ArH Server's, \n\nIf you have a bad Video Card ' Law FPS '\nof Real Cars,\n\nYou can stop it by this script..\n\nIt's so easily :\n- Select any car.\n- Press \" Run / Stop Selected \".\n\nYou can open this window again\nby pressing ' / '\n\nWe hope you have fun : )", false, Enad.window[1]) Enad.button[1] = guiCreateButton(36, 285, 126, 34, "Run / Stop Selected", false, Enad.window[1]) guiSetProperty(Enad.button[1], "NormalTextColour", "FFAAAAAA") Enad.combobox[1] = guiCreateComboBox(307, 28, 197, 100, "English", false, Enad.window[1]) Enad.button[2] = guiCreateButton(516, 25, 32, 25, "X", false, Enad.window[1]) guiSetProperty(Enad.button[2], "NormalTextColour", "FFAAAAAA") Enad.button[3] = guiCreateButton(166, 285, 90, 34, "Stop All", false, Enad.window[1]) guiSetProperty(Enad.button[3], "NormalTextColour", "FFAAAAAA") --Enad.button[4] = guiCreateButton(218, 285, 72, 34, "Run All", false, Enad.window[1]) --guiSetProperty(Enad.button[4], "NormalTextColour", "FFAAAAAA") Column2 = guiGridListAddColumn( Enad.gridlist[1], 'ID', .25 ) Column2_ = guiGridListAddColumn( Enad.gridlist[1], 'Vehicle', .60 ) end ) for _, type in ipairs( getTDByType )do local gRow = guiGridListAddRow( Enad.gridlist[1] ) guiGridListSetItemText( Enad.gridlist[1], gRow, Column2, tostring( type[ 2 ] ), false, false ) guiGridListSetItemText( Enad.gridlist[1], gRow, Column2_, tostring( type[ 1 ] ), false, false ) t = guiGridListSetItemData( Enad.gridlist[1], gRow, Column2_, tostring( type[ 3 ] ) ) guiGridListSetItemColor ( Enad.gridlist[1], gRow, Column2, 0, 255, 0 ) end addEventHandler ( "onClientGUIClick", root, function ( ) if source == Enad.button[1] then local iRow, iCol = guiGridListGetSelectedItem( Enad.gridlist[1] ) if( iRow and iCol and iRow ~= -1 and iCol ~= -1 )then local ID = tonumber( guiGridListGetItemText( Enad.gridlist[1], iRow, 1 ) ) local CN = tostring( guiGridListGetItemText( Enad.gridlist[1], iRow, 2 ) ) local filePath = tostring( guiGridListGetItemData( Enad.gridlist[1], iRow, 2 ) ) if( ID ~= '' )then if fileExists( ':'.. filePath ..'/'.. ID ..'.txd' ) and fileExists( ':'.. filePath ..'/'.. ID ..'.dff', ID ) then if not( engineRestoreModel( ID ) )then engineImportTXD( engineLoadTXD( ':'.. filePath ..'/'.. ID ..'.txd' ), ID ) engineReplaceModel( engineLoadDFF( ':'.. filePath ..'/'.. ID ..'.dff', ID ), ID ) guiGridListSetItemColor ( Enad.gridlist[1], iRow, 1, 0, 255, 0 ) load_ = true else guiGridListSetItemColor ( Enad.gridlist[1], iRow, 1, 255, 0, 0 ) load_ = false end guiSetEnabled ( source, false ) setTimer ( guiSetEnabled, 3000, 1, source, true ) else if i == true then guiGridListSetItemColor ( Enad.gridlist[1], iRow, 1, 255, 255, 0 ) i = false setTimer( function( ) i = true end, 5000, 1 ) end end end end elseif source == Enad.button[2] then guiSetVisible ( Enad.window[1], false ) showCursor ( false ) executeCommandHandler ( "onStartPlay_" ) bindKey( '/', 'down', 'rr_' ) elseif source == Enad.button[3] then guiSetEnabled ( source, false ) setTimer ( guiSetEnabled, 10000, 1, source, true ) if not load_ then return end load_ = false for i, type in ipairs( getTDByType )do if fileExists( ':'.. type[3] ..'/'.. type[2] ..'.txd' ) and fileExists( ':'.. type[3] ..'/'.. type[2] ..'.dff', type[2] ) then engineRestoreModel( type[2] ) end end guiGridListClear ( Enad.gridlist[1] ) for _, type in ipairs( getTDByType )do local gRow = guiGridListAddRow( Enad.gridlist[1] ) guiGridListSetItemText( Enad.gridlist[1], gRow, Column2, tostring( type[ 2 ] ), false, false ) guiGridListSetItemText( Enad.gridlist[1], gRow, Column2_, tostring( type[ 1 ] ), false, false ) t = guiGridListSetItemData( Enad.gridlist[1], gRow, Column2_, tostring( type[ 3 ] ) ) guiGridListSetItemColor ( Enad.gridlist[1], gRow, Column2, 255, 0, 0 ) end elseif source == Enad.button[4] then guiSetEnabled ( source, false ) setTimer ( guiSetEnabled, 10000, 1, source, true ) if load_ then return end load_ = true if isTimer ( loadTimer ) then killTimer ( loadTimer ) end loadTimer = setTimer ( function ( ) for i, type in ipairs( getTDByType )do if fileExists( ':'.. type[3] ..'/'.. type[2] ..'.txd' ) and fileExists( ':'.. type[3] ..'/'.. type[2] ..'.dff', type[2] ) then engineImportTXD( engineLoadTXD( ':'.. type[3] ..'/'.. type[2] ..'.txd' ), type[2] ) engineReplaceModel( engineLoadDFF( ':'.. type[3] ..'/'.. type[2] ..'.dff', type[2] ), type[2] ) end end end , 1500, 1 ) guiGridListClear ( Enad.gridlist[1] ) for _, type in ipairs( getTDByType )do local gRow = guiGridListAddRow( Enad.gridlist[1] ) guiGridListSetItemText( Enad.gridlist[1], gRow, Column2, tostring( type[ 2 ] ), false, false ) guiGridListSetItemText( Enad.gridlist[1], gRow, Column2_, tostring( type[ 1 ] ), false, false ) t = guiGridListSetItemData( Enad.gridlist[1], gRow, Column2_, tostring( type[ 3 ] ) ) guiGridListSetItemColor ( Enad.gridlist[1], gRow, Column2, 0, 255, 0 ) end if isTimer ( Timer ) then killTimer ( Timer ) end resetProgress_ ( pp_ ) fadeCamera ( false ) Timer = setTimer ( upgradeValues_, 50, 0, pp_ ) end end ) for i, v in pairs ( Languages ) do guiComboBoxAddItem ( Enad.combobox[1], tostring ( i ) ) end addEventHandler ( "onClientGUIComboBoxAccepted", Enad.combobox[1], function ( ) local text = tostring ( guiComboBoxGetItemText ( source, guiComboBoxGetSelected ( source ) ) ) if text == "" then return end if text == "عربي" then guiLabelSetHorizontalAlign ( Enad.label[1], "right" ) else guiLabelSetHorizontalAlign ( Enad.label[1], "left" ) end guiSetText ( Enad.label[1], Languages[text]["Information"] ) guiSetText ( Enad.button[1], Languages[text]["Run Or Stop"] ) guiSetText ( Enad.button[4], Languages[text]["Run All"] ) guiSetText ( Enad.button[3], Languages[text]["Stop All"] ) end , false ) addCommandHandler( 'openOptionsCar', function( ) if not guiGetVisible ( Enad.window[1] ) then guiSetVisible( Enad.window[1], true ) showCursor( true ) guiBringToFront( Enad.window[1] ) guiSetVisible ( Enad.button[2], true ) end end ) addCommandHandler( 'rr_', function ( ) if not guiGetVisible ( Enad.window[1] ) then guiSetVisible( Enad.window[1], true ) showCursor( true ) guiBringToFront( Enad.window[1] ) guiSetVisible ( Enad.button[2], false ) else guiSetVisible( Enad.window[1], false ) showCursor( false ) end end ) --[[ addCommandHandler( 'reall', function( ) for i, type in ipairs( getTDByType )do if fileExists( ':'.. type[3] ..'/'.. type[2] ..'.txd' ) and fileExists( ':'.. type[3] ..'/'.. type[2] ..'.dff', type[2] ) then if not( engineRestoreModel( type[2] ) )then engineImportTXD( engineLoadTXD( ':'.. type[3] ..'/'.. type[2] ..'.txd' ), type[2] ) engineReplaceModel( engineLoadDFF( ':'.. type[3] ..'/'.. type[2] ..'.dff', type[2] ), type[2] ) end end end end )]] setTimer(function() guiLabelSetColor(Enad.label[1], math.random(0,255), math.random(0,255), math.random(0,255)) end, 800, 0) function say() outputChatBox ("~| (m) آلي عنده مشكلهمن ضعف كرد شاشة اطغط m لايقاف سيرات |~" ,255, 255,0,true ) end setTimer ( say, 60000, 0)
  10. ما أعتقد تقدر تسويها لأن السكربت ما راح يلقى ملف الموتر ذذذ
  11. صورلي وش يقولك الدي بق /debugscript 3 وأطرحلي الجدول كامل بعد ما عدلته ذذ
  12. @ momar5700 ; أدخل ملف الكلينت ورح للسطر الخامس getTDByType = { --[[ { 'car name', car id, 'file Path' }; --]] { 'Camry 2011', 566, 'xCar7' }; { 'Camry 2006', 585, 'xCar17' }; }; هذا الجدول هو الي تضيف منه المواتر وظيفة السكربت عموماً اذا أنت تبي لوحة اللاعبين يحملون منها المواتر الي يبونها طبعاً المواتر تكون خارجية يعني أنت تحط لها ملف وتركبها اذا تبي تزود مواتر ع الجدول فـ ركز بالمثال الي حاطه لك --[[ { 'car name', car id, 'file Path' }; --]] car name ; اسم السيارة الي راح يظهر بالقريد ليست باللوحة ذذ car id ; الأيدي الخاص بالسيارة file Path ; أسم الملف حق السيارة الي ركبته بالسيرفر ذذ مثال getTDByType = { { 'Camry 2011', 566, 'xCar7' }; { 'Camry 2006', 585, 'xCar17' }; { 'Taho', 502, 'xCar20' }; };
  13. 10/10 ; سكربت جميل م عليه كلام أستمر
  14. كل عام وجميع الأمة الأسلامية بخير أن شاء الله #
  15. لا خلنا ندخل الويكي ونراجع أرقمنتات مخرج الشات بالكلنت أول شيء نشوف في أرقمنت للاعب؟ bool outputChatBox ( string text [, int r=231, int g=217, int b=176, bool colorCoded=false ] ) لا بالكلنت مافي أرقمنت للاعب ! addEventHandler ("onClientPlayerJoin", root, function ( ) outputChatBox ("Welcome") end ) خلنا نخليه كذا كذا بتصير وظيفة الكود أذا أي لاعب دخل السيرفر الكلام يجي لـ جميع اللاعبين root ليه لجميع اللاعبين؟ لأنك حاط بالحدث طيب اذا تبيه للاعب الي دخل؟ بدل الروت باللوكال بلاير addEventHandler ("onClientPlayerJoin", localPlayer, function ( ) outputChatBox ("Welcome") end )
  16. الأحداث بالكلنت تستعمل فيها اللوكال بلاير "onClientGUIClick" كـ مثال لو تقرأ الويكي Note: The player who clicked the gui-element is always the localPlayer. اللاعب الي ضغط الزر دائماً هو اللوكال بلاير ! كـ مثآل أبي أنقل اللاعب يوم يضغط الزر بنقل اللوكال بلاير ! addEventHandler ("onClientGUIClick", resourceRoot, function ( ) if ( source == buttton ) then setElementPosition (localPlayer,x,y,z ) end end )
  17. https://wiki.multitheftauto.com/wiki/Writing_Gamemodes
×
×
  • Create New...