Jump to content

Booo

Members
  • Posts

    335
  • Joined

  • Last visited

Everything posted by Booo

  1. مثآل مثآل ماطلبت شي يآصإحبي شف مثلاً الحين بتسوي سكربت اذا دخل الواحد لسيرفرك تبي تغير اسمه وتحط له في بداية اسمه [زائر] تابع معي يآصاحبي function join ( ) local name = getPlayerName ( source ) local newname = string.format("[Guest]~%s", name) setPlayerName ( source, newname ) end addEventHandler ( "onPlayerJoin", getRootElement(), join ) بيطلع اسمك زي كذا [Guest]~мσмσ~χ~ѕнωαєкι اتمنى انك فهمت!!
  2. السلام عليكم ورحمة الله وبركاته ياشباب كلكم تعرفون سكربت GuiEditor انا عندي مشكلله اذا سويت الواجهه وجيت بنسخ الاكواد القى الاكواد صافه طابور وراء بعض !! زي كذا GUIEditor_Window = {} GUIEditor_Tab = {} GUIEditor_Button = {} فيه احد يعرف كيف اترك كل كود بسطر !! مثل كذا GUIEditor_Window = {} بسطر بعدين الكود الي بعده بسطر جديد GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} وكل الاكواد ..
  3. حيآك الله مثال على وش ؟؟
  4. الله يسلمك من كل شر منور الموضوع يآكابتن
  5. بسم الله الرحمن الرحيم الحمدلله رب العآلمين والصلإة والسلام على من لانبي بعده محمد صلى الله عليه وسلم آما بعد : مدخل للشرح لو بغيت تسوي تعديل على اسامي لاعبين الي يدخلون سيرفرك مثلاً نقول تببي تحط لهم زخرفة على الاسامي او تحط اسم تاج مثل "زائر" هنا يجي إستخدام string.format وظيفه متخصصه في تنسيق السلسلة النصية function Report(Users) outputChatBox(“USERNAME ID MONEY”) for Username, User in pairs(Users) do outputChatBox(string.format(“%-15s %6d %6d”, Username, User.ID, User.MONEY)) end end booo = { ahmed = {ID = 39, MONEY = 1119}, mohamed = {ID = 22, MONEY = 1181}, hammad = {ID = 53, MONEY = 1110} } Report(booo) رآح يطلع الكود string.format كيف تعمل ؟ جميع العناصر المتخصصه بالتنسيق تبدا بعلامة نسبه مئوية % مثال outputChatBox(string.format(“-->%s<--”, “booo”)) نلاحظ ان %s هي تستخدم للسلسله النصيه outputChatBox(string.format(“-->%15s<--”, “booo”)) * الرقم الي بين المئوية والسلسله النصية هي المسافه الي يكتبها من اول سطر ثم يحط السلسلة النصيه outputChatBox(string.format(“-->%-15s<--”, “booo”)) * اذا كان الرقم بالسالب بيأخذ المسافه من يمين outputChatBox(string.format(“-->%d<--”, 35)) نلاحظ ان %d هي تستخدم ل الارقام الصحيحة outputChatBox(string.format(“-->%6d<--”, 35)) * رقم 6 هي المسافه الي ياخذها من اول السطر ثم يحط الرقم outputChatBox(string.format("%-15s %6d %6d”,"ahmed",39, 1119)) عندما تكتب %% وراء بعض ، تطلع علامة مئوية زي المثال outputChatBox(string.format(“i give u money %d%%!”, 100)) outputChatBox(string.format(“%d-%s”, 35,"35")) outputChatBox(string.format(“i give u %f ! ”, 99.99)) %f تستخدم للتعامل مع الارقام العشرية outputChatBox(string.format(“%.0f | %.1f | %.2f | %.3f”, 99.99,99.99,99.99,99.99)) outputChatBox(string.format(“%5.0f | %5.1f | %5.2f | %5.3f”, 99.99,99.99,99.99,99.99)) outputChatBox(string.format(“%6.1f”, 123456)) outputChatBox(string.format([[ >> -->%2.2s<-- >> -->%2.2s<-- >> -->%2.2s<--]], “a”, “ab”, “abc”)) استخدام علامة التنصيص للسلسة النصيه مثال %q outputChatBox(string.format(“%q”, “booo”)) استخدام علامة الهيكس للسلسه مثال %x او %X outputChatBox(string.format(“%x, %X”, 255, 255)) استخدام علامة الثمآني للسلسلة octal output مثال %o outputChatBox(string.format(“%o”, 31)) استخدام علامة الإسس للسلسلة مثال %e او %E test11 = string.format("%e, %E", math.pi,math.pi) لتحويل ارقام البايت لى حروف نسخدم %c مثال test10 = string.format("%c%c%c", 76,117,97) -- char Lua ملإحظهه: %d و %i جميعها تستخدم لتحويل الرقم الى ارقام صحيحه string.format ("%i", 123.456) --> 123 وهذا وصلى الله وسلم على نبينا محمد
  6. بسم الله الرحمن الرحيم الوظيفة GetFewPlayersOnTeams فآيدة الوظيفه ترجع لك الفريق الي يملك عدد لاعبين آقل صيغة الوظيفة team getFewPlayersOnTeams ( element team1,element team2) كود الوظيفة function getFewPlayersOnTeams(team1,team2) if (isElement(team1) and getElementType(team1) == "team") and (isElement(team2) and getElementType(team2) == "team") then local team1C = countPlayersInTeam (team1) local team2C = countPlayersInTeam (team2) if team1C == team2C then return team1 else if team1C == math.min(team1C,team2C) then return team1 else return team2 end end end return false end مثآل function setPlayerToTeam(source) local redteam = getTeamFromName ( "Red" ) local blueteam = getTeamFromName ( "Blue" ) if redteam and blueteam then local theteam = getFewPlayersOnTeams(redteam,blueteam) if theteam then setPlayerTeam(source,theteam) local PlayerName = getPlayerName ( source ) outputChatBox ( " " .. joinedPlayerName .. " Joined "..getTeamName(theteam).." team !" , root, 255, 255, 255 ) end else createTeam ("Red",255,0,0) createTeam ("Blue",0,0,255) setPlayerToTeam(source) end end addEventHandler ( "onPlayerJoin", getRootElement(), setPlayerToTeam ) https://wiki.multitheftauto.com/wiki/Ge ... ersOnTeams
  7. وعليكم السلام هذي ياقلبي صوره ويسوي لها تحريك فوق تحت
  8. Booo

    Gridlist

    try this ; GUIEditor.gridlist[2] = guiCreateGridList(12, 27, 142, 174, false, GUIEditor.window[2]) local columns = guiGridListAddColumn(GUIEditor.gridlist[2], "Teams", 0.9) for _,t in ipairs(getElementsByType("team"))do guiGridListSetItemText(GUIEditor.gridlist[2],guiGridListAddRow(GUIEditor.gridlist[2]),1,getTeamName(t),false,false) end *if not work copy all your code
  9. جرب السكربت هذا https://forum.multitheftauto.com/viewtopic.php?f=161&t=61212
  10. مايكرو يخوي جاوب على سؤالي الي بالرسايل لاتتهرب السؤال
  11. وعليكم السلام ورحمة الله وبركاته كلم الدعم الفني الي خاذي السيرفر منهم وقل لهم الموقع مقفل لاتقول لا هجمات دوس ولا شي الدعم هو الي بيشوف المشكله، واذا كان هجمات دوس على موقعك بيكلمون الداتا سنتر عن ايبيهات الهجوم وانت موقعك بيرجع ان شاء الله خلال يومين او ثلاث سؤال تعرف ارقام الايبهات الي مسويه هجوم عليك ؟
  12. حيآك الله ويآليت تحط الكود الي ضبطته علشآن غيرك يستفيد
  13. تأكد يخوي الكود مااأشوف فيه شي تأكد انك قفلت السكربت وسويت تحديث له ترا التعديل بملف السيرفر
  14. وعليكم السلام ورحمة الله وبركاته setTimer( guiSetVisible, 10000, -- الوقت بعد 10 ثواني 1, -- شغل الوقت مره وحده false) -- اخفاء الوحه عن الظهور
  15. جرب الكود هذا اول شي اذا ماضبط جرب الثاني وعطنا تجربتك مع الإكواد local helhRBL = false function addRBL ( ) if not helhRBL then local txd = engineLoadTXD ( "1.txd" ) engineImportTXD ( txd, 4867 ) helhRBL = true else engineRestoreModel ( 4867 ) helhRBL = false end end addEventHandler("onClientGUIClick", root, function () if ( source == A1 ) then addRBL ( ) elseif ( source == A2 ) then addRBL ( ) end end ) الكود الثاني local helhRBL = false function addRBL ( ) if not helhRBL then local txd = engineLoadTXD ( "1.txd" ) engineImportTXD ( txd, 4867 ) local dff = engineLoadDFF("1.dff",4867) engineReplaceModel(dff, 4867) helhRBL = true else engineRestoreModel ( 4867 ) helhRBL = false end end addEventHandler("onClientGUIClick", root, function () if ( source == A1 ) then addRBL ( ) elseif ( source == A2 ) then addRBL ( ) end end )
  16. وعليكم السلام ورحمة الله وبركاته عندك أكواد زآيده ماادري وش وضعها .! عالعموم سوى نسخ للكود وشف يزبط مععك .. AircraftIdSpawn = { { 1430.9000244141,596.09997558594,14 }, } local base = createBlip (1386.28809,583.47192,10.91094,23) setBlipVisibleDistance (base, 23) local group1 = '[MFA]' local group2 = 'SyR' output = function( text, element, r, g, b, vaule ) exports["guimessages"]:outputServer(element, text, r, g, b) end function start() end addEventHandler('onResourceStart', resourceRoot, start) function mm() end onAbadyWasted = function() if getElementData ( source , "Group" ) == groupName then function sp( source ) setElementPosition( source, 1384.70386,548.67749,1008.09998 ) setElementInterior ( source, 0 ) setElementDimension ( source, 0 ) setPedArmor( hPlayer, 200 ) setElementHealth( hPlayer, 200 ) setPedSkin( source, 230 ) setPedArmor( source, 100 ) end setTimer(sp,1000,1,source) end end addEventHandler ( "onPlayerSpawn", getRootElement(), onAbadyWasted ) TableCars = {} addEvent('gvoa', true) addEventHandler('gvoa', root, function( nameCar ) if TableCars[source] and isElement( TableCars[source] ) then destroyElement( TableCars[source] ) end local id = getVehicleIDFromName( nameCar ) if id == 487 or id == 425 or id == 548 or id == 520 or id == 469 then local x, y, z = unpack( AircraftIdSpawn[math.random(#AircraftIdSpawn)] ) TableCars[source] = createVehicle( id, x, y, z ) else local x,y,z = getElementPosition( source ) TableCars[source] = createVehicle( id, x, y, z ) end warpPedIntoVehicle ( source, TableCars[source] ) addVehicleUpgrade(TableCars[source], 1147) addVehicleUpgrade(TableCars[source], 1041) addVehicleUpgrade(TableCars[source], 1035) addVehicleUpgrade(TableCars[source], 1010) addVehicleUpgrade(TableCars[source], 1087) addVehicleUpgrade(TableCars[source], 1171) addVehicleUpgrade(TableCars[source], 1149) setVehiclePaintjob(TableCars[source], 1) end ) addEventHandler('onPlayerQuit', root, function() if isElement( TableCars[source] ) then destroyElement( TableCars[source] ) end end ) addEventHandler( "onVehicleStartEnter", resourceRoot, function(thepla) if getElementData( thepla, 'Group' ) == group1 or getElementData( thepla, 'Group' ) == group2 then outputChatBox( "** Welcome To Groups Car", thepla, 255, 0, 0, true ) else cancelEvent( ) outputChatBox( "** This Vehicle For Group [ [MFA] ]", thepla, 255, 0, 0, true ) end end )
  17. انت الحين حدد الي تبيه بالضبط علشان نقددر نساعدك تبي تحفظ البيانات بـ xml والا سقل او وش تبي بالضبط علشان نضبط كؤدك
  18. كفوك الطيب الله يعآفيك هذا طلبك الثاني ملف سيرفر addEvent("s",true) addEventHandler("s",getRootElement(),function() setCameraTarget(source) fadeCamera(source,false,1) fadeCamera(source,true,3) end) addEvent("1",true) addEventHandler("1",getRootElement(),function(id) if getElementData(source,"vehB") and isElement(getElementData(source,"vehB")) then destroyElement(getElementData(source,"vehB")) end setCameraTarget(source) fadeCamera(source,false,1) fadeCamera(source,true,3) ve = createVehicle(id, 1865.8835449219,-2620.5539550781,13.546875) setElementData(source,"vehB",ve) warpPedIntoVehicle(source, ve) if getPlayerMoney(source) >= 500000 then takePlayerMoney(source, 500000) outputChatBox("* ~| Buy [ Car ] |~",0,150,250,true) else outputChatBox("* Don't Have Money",250,0,0,true) end setVehicleDamageProof(ve, true) setTimer(function() setVehicleColor(ve, math.random(0, 255),math.random(0, 255),math.random(0, 255)) end, 500,0) end)
  19. GUIEditor = { gridlist = {}, button = {}, window = {}, } GUIEditor.window[1] = guiCreateWindow(0, 0, 249, 390, ":: Garage Created T6[W]ER ::", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) guiSetVisible(GUIEditor.window[1], false) GUIEditor.gridlist[1] = guiCreateGridList(9, 22, 225, 262, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Cars :", 0.9) for i = 1, 2 do guiGridListAddRow(GUIEditor.gridlist[1]) end guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "بي ام", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "كمارو", false, false) GUIEditor.button[1] = guiCreateButton(36, 291, 171, 38, ":: oK | موافق ::", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF00FBFF") GUIEditor.button[2] = guiCreateButton(36, 340, 171, 38, ":: Close | اغلاق ::", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetFont(GUIEditor.gridlist[1], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF00FBFF") function Spawn() outputChatBox ("* Welcome To Garage ",0,150,250,true) setCameraMatrix(1878.1589355469, -2629.5012207031, 14.546875, 10000, 0, 0) local veh = getPlayerOccupiedVehicle(localPlayer) car = createVehicle(400, 1888.7169189453,-2622.5610351563,16.03125038147) ob = createObject(13646, 1888.7169189453, -2622.5610351563, 12.63125038147) op = createObject(14783, 1888.80005, -2624.3999, 16.6) triggerServerEvent("a",localPlayer) setObjectScale ( op, 2) setObjectScale ( ob, 2) guiSetVisible(GUIEditor.window[1], true) showChat(false) showCursor(true) setTimer(function() setVehicleColor(car, math.random(0, 255),math.random(0, 255),math.random(0, 255)) end, 500,0) end marker = createMarker(1871.3981933594,-2622.1108398438,13.546875,"cylinder",3,0,150,250,170) addEventHandler("onClientMarkerHit", marker, function(pla) if pla == getLocalPlayer() then Spawn() end end) addEventHandler("onClientRender",getRootElement(), function() local x,y,z = getElementRotation ( ob ) setElementRotation(ob,x,y,z +1) local x2,y2,z2 = getElementRotation ( car ) setElementRotation(car,x2,y2,z2 +1) local x, y, z = getElementPosition(car) fxAddGlass(x,y,z,math.random(0, 255),math.random(0, 255),math.random(0, 255),a,-3,count) end) addEventHandler("onClientGUIClick",guiRoot, function() if source == GUIEditor.button[2] then showChat(true) showCursor(false) triggerServerEvent("s",localPlayer) guiSetVisible(GUIEditor.window[1], false) destroyElement(car) elseif source == GUIEditor.button[1] then guiSetVisible(GUIEditor.window[1], false) showChat(true) showCursor(false) triggerServerEvent("1",localPlayer,getElementModel(car)) destroyElement(car) end end) addEventHandler("onClientGUIClick",guiRoot,function() if source == GUIEditor.gridlist[1] then local row, col = guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) local get = guiGridListGetItemText(GUIEditor.gridlist[1], row, 1 ) if row and col and row ~= -1 and col ~= -1 then if get == "بي ام" then setElementModel(car, 405) elseif get == "كمارو" then setElementModel(car, 411) end end end end)
  20. addEventHandler("onClientMarkerHit", root, function() if source == marker then Spawn() end end) عدلها بـالكود هذا addEventHandler("onClientMarkerHit", marker, function(pla) if pla == getLocalPlayer() then Spawn() end end)
  21. وعليكم السلام ورحمة الله وبركاته شف جرب الكود هذا كلنت GUIEditor = { gridlist = {}, button = {}, window = {}, } GUIEditor.window[1] = guiCreateWindow(0, 0, 249, 390, ":: Garage Created T6[W]ER ::", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) guiSetVisible(GUIEditor.window[1], false) GUIEditor.gridlist[1] = guiCreateGridList(9, 22, 225, 262, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Cars :", 0.9) for i = 1, 2 do guiGridListAddRow(GUIEditor.gridlist[1]) end guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "بي ام", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "كمارو", false, false) GUIEditor.button[1] = guiCreateButton(36, 291, 171, 38, ":: oK | موافق ::", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF00FBFF") GUIEditor.button[2] = guiCreateButton(36, 340, 171, 38, ":: Close | اغلاق ::", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetFont(GUIEditor.gridlist[1], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF00FBFF") function Spawn() outputChatBox ("* Welcome To Garage ",0,150,250,true) setCameraMatrix(1878.1589355469, -2629.5012207031, 14.546875, 10000, 0, 0) local veh = getPlayerOccupiedVehicle(localPlayer) car = createVehicle(400, 1888.7169189453,-2622.5610351563,16.03125038147) ob = createObject(13646, 1888.7169189453, -2622.5610351563, 12.63125038147) op = createObject(14783, 1888.80005, -2624.3999, 16.6) triggerServerEvent("a",localPlayer) setObjectScale ( op, 2) setObjectScale ( ob, 2) guiSetVisible(GUIEditor.window[1], true) showChat(false) showCursor(true) setTimer(function() setVehicleColor(car, math.random(0, 255),math.random(0, 255),math.random(0, 255)) end, 500,0) end marker = createMarker(1871.3981933594,-2622.1108398438,13.546875,"cylinder",3,0,150,250,170) addEventHandler("onClientMarkerHit", root, function() if isElementWithinMarker(getLocalPlayer(),marker) then Spawn() end end addEventHandler("onClientRender",getRootElement(), function() local x,y,z = getElementRotation ( ob ) setElementRotation(ob,x,y,z +1) local x2,y2,z2 = getElementRotation ( car ) setElementRotation(car,x2,y2,z2 +1) local x, y, z = getElementPosition(car) fxAddGlass(x,y,z,math.random(0, 255),math.random(0, 255),math.random(0, 255),a,-3,count) end) addEventHandler("onClientGUIClick",guiRoot, function() if source == GUIEditor.button[2] then showChat(true) showCursor(false) triggerServerEvent("s",localPlayer) guiSetVisible(GUIEditor.window[1], false) destroyElement(car) elseif source == GUIEditor.button[1] then guiSetVisible(GUIEditor.window[1], false) showChat(true) showCursor(false) triggerServerEvent("1",localPlayer,getElementModel(car)) destroyElement(car) end end) addEventHandler("onClientGUIClick",guiRoot,function() if source == GUIEditor.gridlist[1] then local row, col = guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) local get = guiGridListGetItemText(GUIEditor.gridlist[1], row, 1 ) if row and col and row ~= -1 and col ~= -1 then if get == "بي ام" then setElementModel(car, 405) elseif get == "كمارو" then setElementModel(car, 411) end end end end)
  22. Hello all SGS on 1.3.4 V only to run update your server [1.3.4] Description: i like "company of heroes" and this MOD same company of heroes Commands list: Screenshots: Download: https://mta-sgs-rush.googlecode.com/svn/sgs.zip More information: https://forum.multitheftauto.com/viewtopic.php?f ... 96fb035234 "if u find any bugs / errors please don't send , i lost the source GM "
×
×
  • Create New...