Jump to content

===|OSAMA|===

Members
  • Posts

    463
  • Joined

  • Last visited

Everything posted by ===|OSAMA|===

  1. https://community.multitheftauto.com/index.php?p=resources&s=details&id=1514
  2. ^ تصحيح : برستيج واسامة ذذ + العفو -_-"
  3. الطلب الأول ^ -- Client Side ! addEventHandler ( "onClientGUIClick", اسم الزر, function ( ) triggerServerEvent ( "setTeam", localPlayer ) end ) -- Server Side ! addEvent ( "setTeam", true ) addEventHandler ( "setTeam", root, function ( ) setPlayerTeam ( source, getTeamFromName ( "اسم التيم" ) ) end ) الطلب الثآني ^ https://forum.multitheftauto.com/viewtopic.php?f=160&t=55016&p=532012#p532012
  4. local Object = createObject ( ID, x, y, z, rx, ry, rz ) local Marker = createMarker ( x, y, z, "cylinder", size, 0, 0, 0, 0 ) function OpenObject ( player ) if isElementWithinMarker ( player, Marker ) then local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "Group Name" ) ) then if not Open then moveObject ( Object, 1500, moveX, moveY, moveZ ) else moveObject ( Object, 1500, x, y, z ) end Open = not Open else outputChatBox ( "* You must be 'Group Name' !", player, 200, 0, 0, true ) end end end addEventHandler ( "onResourceStart", resourceRoot, function ( ) for _, v in ipairs ( getElementsByType ( "player" ) ) do bindKey ( v, "tab", "down", OpenObject ) end end ) addEventHandler ( "onPlayerJoin", root, function ( ) bindKey ( source, "tab", "down", OpenObject ) end ) الإستبدآل , السسطر الأول , ID = رقم الأوبجكت x, y, z = إحداثيات الأوبجكت rx, ry, rz = إحداثيات دوران الأوبجكت / إذا تبيه بدون دوران خلها كلها صفر ( 0 ) ذذ السسطر الثآني , x, y, z = إحداثيات الماركر الي إذا كنت فيه وتكبس زر تاب يفتح البوابة او يقفلها size = حجم الماركر السسطر السآبع , Group Name = إسم القروب الي تبي الأوبجكت يفتح له فقط السسطر التآسع , moveX, moveY, moveZ = إحداثيات الأوبجكت عند تحريكه السسطر الحآدي عشر ( 11 ) ذذ , x, y, z = إحداثيات الأوبجكت عند رجوعه / خلها مثل احداثيات إنشاء الأوبجكت الي بالسطر الأول السسطر الخآمس عششر ( 15 ) ذذ , Group Name = إسم القروب الي تبي الأوبجكت يفتح له فقط
  5. -- Client Side -_-" ! marker = createMarker ( 1538.8000488281, -1627.8000488281, 13.39999961853, "cylinder", 5, 255, 0, 0, 170 ) door = createObject ( 2990, 1540.5, -1627.6999511719, 16.299999237061, 0, 0, 272 ) GUIEditor_Button = {} GUIEditor_Label = {} wido = guiCreateWindow ( 267, 343, 319, 121, "By yazan", false ) guiSetVisible ( wido, false ) GUIEditor_Button[1] = guiCreateButton ( 24, 63, 137, 49, "open", false, wido ) GUIEditor_Button[2] = guiCreateButton ( 164, 64, 132, 48, "close", false, wido ) GUIEditor_Label[1] = guiCreateLabel ( 106, 30, 97, 23, "لفتح او اغلق الباب", false, wido ) addEventHandler ( "onClientMarkerHit", marker, function ( player ) if ( player == localPlayer ) then guiSetVisible ( wido, true ) showCursor ( true ) end end ) addEventHandler ( "onClientMarkerLeave", marker, function ( leftElement ) if ( leftElement == localPlayer ) and ( guiGetVisible ( wido ) == true ) then guiSetVisible ( wido, false ) showCursor ( false ) end end ) addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == GUIEditor_Button[1] ) then moveObject ( door, 5000, -2646.6999511719, 1359.3000488281, 7.8000001907349 ) guiSetVisible ( wido, false ) outputChatBox ( '#FFFF00 تم فتح الباب', 255, 255, 0, true ) elseif ( source == GUIEditor_Button[2] ) then moveObject ( door, 5000, 1540.5, -1627.6999511719, 16.299999237061 ) guiSetVisible ( wido, false ) outputChatBox ( '#FFFF00 تم غلق الباب', 255, 255, 0, true ) end end )
  6. إستبدل سطر رقم 4 الي بكود تيتي بذآ , outputChatBox ( "You've been automatically logged in", source, 0, 255, 0 ) لأنه السطر الي بكودهـ كلنت مهوب سيرفر # يعطيك العافيه حبي اسامه على التنبيه ,. حيآكـ الله #
  7. إستبدل سطر رقم 4 الي بكود تيتي بذآ , outputChatBox ( "You've been automatically logged in", source, 0, 255, 0 ) لأنه السطر الي بكودهـ كلنت مهوب سيرفر #
  8. الله يعآفيكـ .. = )
  9. ^ خرابيط تآيم -- Client Side ! showCursor ( false ) -- إخفاء showCursor ( true ) -- إظهار -- Server Side ! showCursor ( thePlayer, false ) -- إخفاء showCursor ( thePlayer, true ) -- إظهار ( thePlayer ) ملاحظة : هنا العنصر ليس ثآبت ^ والله ماني حمار اعرف فنكشن الكراوسر بس ووالله كتبته مستعجل جالس اصمم لي سكربت . شفيكـ معصصب ، حَصَل خخير
  10. ^ خرابيط تآيم -- Client Side ! showCursor ( false ) -- إخفاء showCursor ( true ) -- إظهار -- Server Side ! showCursor ( thePlayer, false ) -- إخفاء showCursor ( thePlayer, true ) -- إظهار ( thePlayer ) ملاحظة : هنا العنصر ليس ثآبت ^
  11. الطلب الأول ماني فاهمه إذا تقصد تحديد مكآن اللاعب فـ إستخدم 'onClientGUIClick' setElementPosition وبالنسبة للطلب الثآني 'onClientGUIClick' guiGetText triggerServerEvent outputChatBox
  12. أممممم أنت تقصد انه لما تحرك الكاميرا بالماوس تدخل بالأوبجكت .. إذا قصدكـ كذآ , مافي لها حل ، والمشكلة ذي تصير في بعض الأوقات وتحديداً مع الأوبجكتات الي تسويها من الماب إيديتور / بس لحد الآن ما فهمت وش المغزى من إنكـ تخلي الكاميرا ما تدخل للأوبجكت =/ , أهم شي أن الأوبجكت مهو خيآل ذذ
  13. آهآ , ططيب قلي رقم الأوبجكت خلني أشوفه لككـ ذذ .. #
  14. أمممممم =| إذا إنككـ حآط الوضع التجريبي بالماب إيديتور من أف 6 , بعض اوقات يكون الأوبجكت خيآل .. ججرب حط الوضع التجريبي حق أف 5 وشف وش يصير معككـ .. #
  15. حيآككـ الله .. #
  16. + "onClientGUIClick" ^ For Example: addEventHandler ( "onClientGUIClick", إسم الزر, function ( ) guiSetVisible ( إسم النافذة, true ) guiBringToFront ( إسم النافذة ) end ) إسم النافذة = إسم النافذة الي تبيها تظهر لما تكبس على الزر #
  17. كذآ لو كانت فلوس اللاعب أقل من 100 رح يسحبهآ , وتصير فلوس اللاعب بالسسآلب ، يصصير كذآ ^ -- Server Side ! function TMFN ( ) if getPlayerMoney ( source ) >= 100 then takePlayerMoney ( source, 100 ) outputChatBox ( "#C0C0C0You have been withdrawn #FF0000$ 100 #C0C0C0for you died", source, 255, 0, 0, true ) end end addEventHandler ( "onPlayerWasted", root, TMFN ) كذآ يصير إذا كانت فلوس اللاعب أكبر أو تساوي 100 يسحب الفلوس أما إذا اقل من مية ما يسحب , عشان لا تصير الفلوس بالسسآلب .. #
  18. -- server addCommandHandler("pos", function (player) local x,y,z = getElementPosition(player) outputChatBox("* x : " .. x .. " y : " .. y .. " z : " .. z .. "",root,0,255,0,true) end ) LoL outputChatBox("* x : " .. x .. " y : " .. y .. " z : " .. z .. "",root,0,255,0,true) -- root ?? يصصير كذآ , addCommandHandler("pos", function (player) local x,y,z = getElementPosition(player) outputChatBox ( "* x : " .. x .. " y : " .. y .. " z : " .. z .. "", player, 0, 255, 0, true ) end )
  19. ^ الكل عندكم أخطاء ×_× -- Client Side ! GUIEditor = { label = {}, button = {}, edit = {}, window = {}, } GUIEditor.window[1] = guiCreateWindow(351, 179, 661, 423, "Login Panel By AlooyFTW", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.edit[1] = guiCreateEdit(260, 65, 294, 51, "", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(260, 154, 294, 51, "", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(10, 291, 280, 76, "Login", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "sa-gothic") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "C8FFFFFF") GUIEditor.label[1] = guiCreateLabel(16, 65, 189, 53, "UserName", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "sa-header") guiLabelSetColor(GUIEditor.label[1], 16, 0, 193) GUIEditor.label[2] = guiCreateLabel(19, 154, 176, 51, "Password", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[2], "sa-header") guiLabelSetColor(GUIEditor.label[2], 16, 0, 193) GUIEditor.button[5] = guiCreateButton(342, 292, 280, 76, "Register", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[5], "sa-gothic") guiSetProperty(GUIEditor.button[5], "NormalTextColour", "C8FFFFFF") fadeCamera(false) setTimer ( function ( ) guiLabelSetColor( GUIEditor.label[1],math.random(0, 255), math.random(0, 255), math.random(0, 255)) end,100,0,true) setTimer ( function ( ) guiLabelSetColor( GUIEditor.label[2],math.random(0, 255), math.random(0, 255), math.random(0, 255)) end,100,0,true) guiSetVisible (GUIEditor.window[1], true) showCursor ( true ) addEventHandler ("onClientGUIClick", root, function ( ) if ( source == GUIEditor.button[1] ) then triggerServerEvent("login", localPlayer, localPlayer, guiGetText ( GUIEditor.edit[1] ), guiGetText ( GUIEditor.edit[2] ) ) elseif ( source == GUIEditor.button[5] ) then triggerServerEvent("register", localPlayer, localPlayer, guiGetText ( GUIEditor.edit[1] ), guiGetText ( GUIEditor.edit[2] ) ) end end ) addEvent ( "hideWindow", true ) addEventHandler ( "hideWindow", root, function ( ) guiSetVisible ( GUIEditor.window[1], false ) fadeCamera ( true ) showCursor ( false ) end ) -- Server Side ! addEvent ( "login", true ) addEventHandler ( "login", root, function (player, user, pass) local account = getAccount ( user, pass ) if ( account ~= true ) then if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Logged in Sucessfuly With User : #00FF00[ " .. user .. " ]!", player, 255, 255, 0 , true ) setElementModel ( player, 287 ) triggerClientEvent ( player, "hideWindow", player ) else outputChatBox ( "Login Error!", player, 255, 255, 0 ) end else outputChatBox ( "Wrong Username or Password!", player, 255, 255, 0 ) end end ) addEvent ( "register", true ) addEventHandler ( "register", root, function ( player, user, pass ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Registerd and Logged in Sucessfuly!", player, 255, 255, 0 ) setElementModel ( player, 287 ) triggerClientEvent ( player, "hideWindow", player ) else outputChatBox ( "You Are Already Logged in !", player, 255, 255, 0 ) end else account = addAccount ( user, pass ) if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Registerd and Logged in Sucessfuly - Please Remember Your User/Password!", player, 255, 255, 0 ) outputChatBox ( "Register Details : [ Username ] : #00FF00" .. user .. " #FFFF1A[ Password ] : #00FF00" .. pass .. "", player, 255, 255, 0 , true ) setElementModel ( player, 287 ) triggerClientEvent ( player, "hideWindow", player ) else outputChatBox ( "Register/Login error!", player, 255, 255, 0 ) end end end )
  20. هاذا كلنت addEventHandler( 'onClientGUIClick', guiRoot, function ( ) if source == cc then triggerServerEvent( 'car', localPlayer ) end end ) الأكواد جميعهآ صح , وجربتها وشغالة 100% ذذ بإختصار , الي يكبس الزر هآذ يركب السيارة وما عاد يقدر ينزل منها , والي ما يكبس الزر هاذ يقدر ينزل من السيارة . . #
  21. بدل ما تسوي ألف مود تقدر تختصرها بمود واحد من خلال جدول .. على النحو التآلي , -- Client Side ! Markers = { [1] = { 1556, -1608.4000244141, 13.39999961853 }, [2] = { x, y, z }, [3] = { x, y, z }, } addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) for _, TheMarkers in ipairs ( Markers ) do TheMarker = createMarker ( TheMarkers[1], TheMarkers[2], TheMarkers[3] - 1, "cylinder", 2, 255, 25, 90, 250 ) end end ) GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Window[1] = guiCreateWindow(258,129,228,368,"By yaZan",false) guiSetVisible(GUIEditor_Window[1],false) GUIEditor_Button[1] = guiCreateButton(32,66,173,70,"LS",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(17,25,197,36,"police car",false,GUIEditor_Window[1]) GUIEditor_Button[6] = guiCreateButton(34,138,173,70,"HPv1000",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(34,209,173,70,"Enforcer",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(34,280,173,70,"ranger",false,GUIEditor_Window[1]) addEventHandler ( "onClientMarkerHit", resourceRoot, function ( hitPlayer ) if hitPlayer == localPlayer then local team = getPlayerTeam ( hitPlayer ) if team and getTeamName ( team ) == "police" then guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) guiSetInputEnabled ( guiGetVisible ( GUIEditor_Window[1] ) ) end end end ) function givecar ( id ) triggerServerEvent ( "givecar", localPlayer, id ) guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) showCursor ( guiGetVisible(GUIEditor_Window[1] ) ) guiSetInputEnabled ( guiGetVisible ( GUIEditor_Window[1] ) ) end addEventHandler( "onClientGUIClick", root, function ( ) if ( source == GUIEditor_Button[1] ) then givecar(596) elseif ( source == GUIEditor_Button[6] ) then givecar(523) elseif ( source == GUIEditor_Button[3] ) then givecar(427) elseif ( source == GUIEditor_Button[4] ) then givecar(599) end end ) الإستبدآل , السطر الثالث , x, y, z = إحداثيات الماركر السطر الرابع , x, y, z = إحداثيات الماركر و لو تبي تضيف ماركرات زيادة بس زيد سطر بالجدول + زيد الرقم الي ببداية السطر الجديد + حط الإحداثيات ، مثآل لو تبي تحط ماركر رابع تضيف السطر ذا بعد سطر رقم 4 , [4] = { x, y, z }, ملآحظة : سطر 3 + 4 تقدر تحذفهم , ذول حاطهم لكـ مثآل عشان لما تبي تزيد ماركرات تعرف كيف تسويها = ) -- Server Side ! Vehicles = {} addEvent ( "givecar", true ) addEventHandler ( "givecar", root, function ( id ) if Vehicles [ source ] then destroyElement ( Vehicles [ source ] ) end if tonumber( id ) then local x, y, z = getElementPosition ( source ) Vehicles [ source ] = createVehicle ( tonumber( id ), x, y, z ) if Vehicles [ source ] then warpPedIntoVehicle ( source, Vehicles [ source ] ) end end end )
×
×
  • Create New...