Jump to content

jakson

Members
  • Posts

    146
  • Joined

  • Last visited

Everything posted by jakson

  1. حاول تتعلم مع نفسك لأن الي يضيع وقته في مساعدتك مره ما راح يضيعها تاني
  2. استخدم onResourceStart و هات صيغه الاعب ب getElementByType وحط الداتا للاعب
  3. وضح طلبك و اعرض محولاتك و راح نساعدك أن شاء الله
  4. جرب _________ GUIEditor = { label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.label[1] = guiCreateLabel(20, 176, 234, 76, "تعليمات الزراعة\n1- plant للزارعة\"\n2- seeds لمعرفة عدد البذور\n3- hplant لمعرفة عدد المحاصيل الي تملكها\n4- cplant لبيع المحصول\n ", false) guiLabelSetColor(GUIEditor.label[1], 244, 235, 9) guiSetVisible (GUIEditor.label[1],false) end ) Farms = { label = {}, button = {}, edit = {}, window = {}, memo = {}, } local Cls = createColRectangle ( -1195.2862548828, -1064.8507080078, 192, 145 ) Farms.window[1] = guiCreateWindow(348, 236, 466, 209, "Farms Job ", false) guiWindowSetSizable(Farms.window[1], false) guiSetVisible (Farms.window[1],false) Farms.button[1] = guiCreateButton(10, 159, 45, 40, "Close", false, Farms.window[1]) guiSetFont(Farms.button[1], "default-bold-small") Farms.edit[1] = guiCreateEdit(60, 27, 216, 29, "0", false, Farms.window[1]) Farms.label[2] = guiCreateLabel(10, 27, 50, 15, "Seeds :", false, Farms.window[1]) guiSetFont(Farms.label[2], "default-bold-small") Farms.button[2] = guiCreateButton(10, 73, 120, 39, "Buy", false, Farms.window[1]) guiSetFont(Farms.button[2], "default-bold-small") Farms.label[2] = guiCreateLabel(140, 78, 136, 24, "$".. tonumber(guiGetText ( Farms.edit[1] ))*50 .."", false, Farms.window[1]) guiLabelSetColor(Farms.label[2], 48, 253, 1) guiSetFont(Farms.label[2], "default-bold-small") guiLabelSetHorizontalAlign(Farms.label[2], "center", false) Farms.label[3] = guiCreateLabel(290, 20, 15, 183, "|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n", false, Farms.window[1]) guiSetFont(Farms.label[3], "default-bold-small") Farms.label[4] = guiCreateLabel(290, 26, 15, 183, "|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n", false, Farms.window[1]) guiSetFont(Farms.label[4], "default-bold-small") Farms.memo[1] = guiCreateMemo(297, 19, 159, 180, "1- plant للزارعة\n2- seeds لمعرفة عدد البذر \n3- hplant لمعرفة عدد المحاصيل الي تملكها\n4- cplant لبيع المحصول", false, Farms.window[1]) local getJob = createMarker ( -1059.8812255859, -1195.4334716797, 128.42066955566, "cylinder", 1.5, 255, 255, 0, 170 ) function MarkerHit ( hitPlayer, matchingDimension ) local playerTeam = getPlayerTeam (localPlayer) if ( playerTeam and getTeamName ( playerTeam ) == "Police" ) then return end if hitPlayer == localPlayer then if source == getJob then guiSetVisible (Farms.window[1],true) showCursor (true) end end end addEventHandler ( "onClientMarkerHit", getRootElement(), MarkerHit ) function GUIChanged () if ( source == Farms.edit[1] ) then if tonumber(guiGetText ( Farms.edit[1] )) ~= nil then if tonumber(guiGetText ( Farms.edit[1] )) > 500 then guiSetText(Farms.edit[1],"500") end guiLabelSetColor(Farms.label[2], 48, 253, 1) guiSetText(Farms.label[2],"$".. tonumber(guiGetText ( Farms.edit[1] ))*100 .."") else guiSetText(Farms.edit[1],"0") end end end addEventHandler ( "onClientGUIChanged", getRootElement(), GUIChanged ) addEventHandler ("onClientGUIClick", getRootElement(), function() if (source == Farms.button[1]) then guiSetVisible (Farms.window[1],false) showCursor (false) elseif (source == Farms.button[2]) then if tonumber(guiGetText ( Farms.edit[1] )) > 0 then if tonumber(guiGetText ( Farms.edit[1] )) <= getPlayerMoney(localPlayer) then triggerServerEvent ( "buySeeds", localPlayer,guiGetText ( Farms.edit[1] ),guiGetText ( Farms.edit[1] )*50 ) else guiSetText(Farms.label[2],"you don't have money !") guiLabelSetColor(Farms.label[2], 255, 0, 0) end end end end ) addEvent("setLabel",true) addEventHandler("setLabel",root, function (player,text,r,g,b) if player == localPlayer then guiSetText(Farms.label[2],text) guiLabelSetColor(Farms.label[2], r,g,b) end end ) function ShapeHit( theElement, matchingDimension ) local playerTeam = getPlayerTeam (localPlayer) if ( playerTeam and getTeamName ( playerTeam ) == "Police" ) then return end if ( theElement == getLocalPlayer() ) then if source == Cls then guiSetVisible (GUIEditor.label[1],true) end end end addEventHandler("onClientColShapeHit",getRootElement(),ShapeHit) function ShapeLeave( theElement, matchingDimension ) if ( theElement == getLocalPlayer() ) then if source == Cls then guiSetVisible (GUIEditor.label[1],false) end end end addEventHandler("onClientColShapeLeave",getRootElement(),ShapeLeave) function onPlayerTarget ( ) if isElementWithinColShape ( source, Cls ) then cancelEvent( true ) end end addEventHandler ( "onClientPlayerTarget", getRootElement(), onPlayerTarget ) addEventHandler ( 'onClientPlayerDamage', localPlayer,function ( ) if isElementWithinColShape ( source, Cls ) then cancelEvent ( ) end end )
  5. اعرض الكود الي يخلي لما الاعب يدخل المركر البانل حق الوظيفه تفتح و راح اساعدك أن شاء الله ولو بدك ترسله خاص لعدم تكرار الكلام فل توبك تنور وراح اساعدك بردو أن شاء الله تحياتي
  6. مشكور علي مساهماتك علي مساعده الغير يدوم اخي ⁦
  7. Any error Shown in debug? I think you forgot to add one more end ? You should add 4 ends not 3
  8. Replace this to this local targetid = getPlayerFromName(target) if targetid then
  9. لازم تسوي تحقيق من السلاح
  10. جربت تشوف المشكله تحصل مع السيارات من ال في اي بي بنل دي فقط ولا مع كل السيارات الي بل سيرفر؟ ولو المشكله بتيجي من السيارات الي بل بنل دي فقط يبقي عيد النظر علي اكوادك و شوف وين الاين الي انت حاطه الي يخلي السياره ما تدمج أو ما تنفجر بي معني اصح
  11. ولله انا ماعنت افهم اي شيئ منك ! الله يكون بل عون اخي ?
  12. يعني الكود شغال تمام ولاكن لما السياره تتعطل و يجي الاعب يشغل السياره من الزر في الوحه تصبح السياره قابله للتفجير ؟
  13. jakson

    Pages

    Sorry brother, we cant help you about the spawners, that's really annoying if you took days to make a something and atlastest someone come to stole this idea for his server or a copycat server , put yourself in this situation if you made a server before years and you was working hard to make something good for players and someone come to stole all ideas of your scripts you will not be mad ? And sad for that ? If you want to copy another server you should learn by yourself none can help you to steal Years of fatigue of someone .
  14. jakson

    Pages

    Hello, I was will help you about the pages but when I opened my local sv and I tested this lines you put above I saw something like you are trying to copy saur spawners idea so sorry for that we cant help you to steal an idea from another server. Good luck.
  15. ايش نوع الشيئ الي تحتاج برمجته ولو كان مو صعب جدا راح أسويها لك مجانا
  16. jakson

    problem

    explain more please ? you can use setElementFrozen
  17. اسف لو كنت بوخت معك فل كلام عن طريقه قولي حقودي لك انا اعتزرلك لائنك عربي متلي يعني اخوات فا اعتزرلك علي اي شيئ مستفز قلته لك ولله قاعد ضميري يئىنبني لائني اتكلمت معك بطريقه مو حلوه ** بس احب اقولك انا مو من جماعه الهاي لاكس ولا نيله انا يمكن أقل من اي حد وانا اسامحك علي طريقتك بردو و اتمني انك تقبل اعتزاري ⁦
  18. Maybe he gave u a useless topic So you need to search for a this system on mta website because that topic he posted for u it miss alot of things like to warp player into a vehicle or remove the player from the vehicle (U can find that in any arrest system) Try to find that on https://community.multitheftauto.com/index.php?p=resources Or if u can made it by yourself Tell me and I will tell u what u need to use to make it works
  19. اسف اتكلم كدا لائن تعليمي يختلف عن تعليمك انا مانا سعودي ? فا أحاول اتكلم مع الناس بلغتهم بالتوفيق ?
  20. ما راح يفهم انجليزي لأن كنت شفته في توبك قبل كدا فل بيج الانجليزي وما قلت الكود الي انا شرحتله أن الكود ممكن يساعده أن يسوي الي هو يريده + انا مو فاضي أن اسوي كود مثل هاذا كا اجزنبل لا احد + وش دخلك بل موضوع عندك شيئ تقدر تساعده بيه قوله لاكن لا تكون حقودي ?
  21. <script src="client.Lua" type="client" cache="false"/> مثال
  22. --Server Side function addPed(thePlayer) local x, y, z = getElementPosition( thePlayer ); x = x + math.cos( math.rad( getPlayerRotation( thePlayer ) ) ) * 2; y = y - math.sin( math.rad( getPlayerRotation( thePlayer ) ) ) * 2; if (thePed) then destroyElement(thePed) end thePed = createPed ( math.random( 10, 270 ), x, y, z) triggerClientEvent ( "followPlayer", Ped, thePlayer, true ) end addCommandHandler ( "ped", addPed ) --Client Side local followTo local follower addEvent("followPlayer", true) addEventHandler("followPlayer", root, function (thePlayer, value) if (isElement(source) and isElement(thePlayer) ) then if (value) then followTo = thePlayer follower = source removeEventHandler( "onClientRender", root, FollowToPlayer) addEventHandler( "onClientRender", root, FollowToPlayer) else removeEventHandler( "onClientRender", root, FollowToPlayer) end end end) function FollowToPlayer() local ped = follower -- الكركتر الي راح تصنعها تمشي وراك local plr = followTo -- الاعب الي هو انت if ped then local x, y, z = getElementPosition( plr ); local px, py, pz = getElementPosition( ped ); local distance = getDistanceBetweenPoints3D( x, y, z, px, py, pz ) if distance < 3.5 then setPedControlState( ped, "forwards", false ); if ( isPedDucked( plr ) ~= isPedDucked( ped ) ) then setPedControlState( ped, "crouch", isPedDucked( getLocalPlayer( ) )); return end else setPedControlState( ped, "forwards", true ); if distance < 6.0 then if isPedDucked( plr ) ~= isPedDucked( ped ) then setPedControlState( ped, "crouch", false ); setPedControlState( ped, "crouch", true ); setPedControlState( ped, "walk", false ); setPedControlState( ped, "sprint", false ); return else setPedControlState( ped, "walk", true ); setPedControlState( ped, "sprint", false ); end elseif distance < 10.0 then setPedControlState( ped, "walk", false ); setPedControlState( ped, "sprint", true ); else setPedControlState( ped, "walk", false ); setPedControlState( ped, "sprint", true ); end local X, Y = 0, 0; X = math.abs( x - px ); Y = math.abs( y - py ); faceMe = math.deg( math.atan2( Y , X ) ); if ( x >= px ) and ( y > py ) then -- north-east faceMe = 90 - faceMe elseif ( x <= px ) and ( y > py ) then -- north-west faceMe = 270 + faceMe elseif ( x >= px ) and ( y <= py ) then -- south-east faceMe = 90 + faceMe elseif ( x < px ) and ( y <= py ) then -- south-west faceMe = 270 - faceMe end setPedRotation( ped, faceMe ); setPedLookAt( ped, x, y, z + .5 ); end end end _setPedRotation = setPedRotation function setPedRotation( ped, rot ) return _setPedRotation( ped, 360 - rot ); end خد هاذا الكود كا مثال⁦ و حاول أطبق خطواطه او تحمل مود شرطه منشور و تحاول انك تاخذ فكره من المود غير كدا ماحد راح يقدر يساعدك
×
×
  • Create New...