Jump to content

فاّرس

Members
  • Posts

    4,805
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by فاّرس

  1. وكود تابل كيف ما اشتغل ؟؟ انت متأكد انه بالتيم؟ حق الشرطه؟
  2. وش المشكله ؟ + اذا ماني غلطان ما تقدر تحط متغيرات ارقام,,
  3. جرب, -- Server Side # local Timer = {} local marker = createMarker(...) addEventHandler('onPlayerDamage',root,function(attacker) if attacker and attacker ~= source and getElementType(attacker) == 'player' and getPlayerTeam(attacker) and getTeamName(getPlayerTeam(attacker)) == 'Police' then if getPlayerWantedLevel(source) > 0 and getPlayerTeam(source) and getTeamName(getPlayerTeam(source)) ~= 'Police' then if isTimer(Timer[source]) then killTimer(Timer[source]) Timer[source] = nil end toggleAllControls(source,false,false,false) toggleControl(source,'forwards',true) setControlState(source,'forwards',true) Timer[source] = setTimer(function() local rx,ry,rz,ax,ay,az,px,py,pz = getElementRotation(attacker),getElementPosition(attacker),getElementPosition(source) setElementRotation(source,rx,ry,rz) if getDistanceBetweenPoints3D(ax,ay,az,px,py,pz) <= 5 then toggleControl(source,'forwards',false) else toggleControl(source,'forwards',true) setControlState(source,'forwards',true) end end,50,0,source) end end end ) addEventHandler('onMarkerHit',marker,function(plr) if getElementType(plr) == 'player' then toggleAllControls(plr,true,true,true) end end )
  4. انسخه مره ثانيه , وما يحتاج تسوي اقتباس مافي رد بعدي ذذ
  5. جرب, -- Server Side # local Timer = {} local marker = createMarker(...) addEventHandler('onPlayerDamage',root,function(attacker) if attacker and attacker ~= source and getElementType(attacker) == 'player' and getPlayerTeam(attacker) and getTeamName(getPlayerTeam(attacker)) == 'Police' then if getPlayerWantedLevel(source) > 0 and getPlayerTeam(source) and getTeamName(getPlayerTeam(source)) ~= 'Police' then if isTimer(Timer[source]) then killTimer(Timer[source]) Timer[source] = nil end toggleAllControls(source,false,false,false) toggleControl(source,'forwards',true) setControlState(source,'forwards',true) Timer[source] = setTimer(function() local rx,ry,rz,ax,ay,az,px,py,pz = getElementRotation(attacker),getElementPosition(attacker),getElementPosition(source) setElementRotation(source,rx,ry,rz) if getDistanceBetweenPoints3D(ax,ay,az,px,py,pz) <= 5 then toggleControl(source,'forwards',false) else toggleControl(source,'forwards',true) setControlState(source,'forwards',true) end end,50,0,source) end end end ) addEventHandler('onMarkerHit',marker,function(plr) if getElementType(plr) == 'player' then toggleAllControls(plr,true,true,true) end end )
  6. انت كل طلباتك اكواد جاهزه حاول تسوي شيء ,, كلها تسوي داتا وانتهت السالفه setElementData getElementData setElementPosition
  7. تحتاج انك تسوي داتا وتحط قيمتها اللاعب المهجوم عليه عشان بعدين تقدر تنقله لأن الكود اساسا لازم تمر انت بالاول على الماركر وبعدين هو يمر وراك , يعني هو بيتحقق من المسافه بينكم , تحتاج انك تضيفها setElementPosition وانا بالاساس ما ضفت
  8. lua.lua = راح يكون فيه الكود الثاني new2.lua = راح يكون فيه الكود الاول, + يمكن انت تبي غير الي بالكود , قولنا وش تبي تسوي؟
  9. لم يتم التجربه local Timer = {} local marker = createMarker(...) addEventHandler('onPlayerDamage',root,function(attacker) if attacker and attacker ~= source and getElementType(attacker) == 'player' and getPlayerTeam(attacker) and getTeamName(getPlayerTeam(attacker)) == 'Police' then if getPlayerWantedLevel(source) > 0 and getPlayerTeam(source) and getTeamName(getPlayerTeam(source)) ~= 'Police' then if isTimer(Timer[source]) then killTimer(Timer[source]) Timer[source] = nil end Timer[source] = setTimer(function() local rx,ry,rz,ax,ay,az,px,py,pz = getElementRotation(attacker),getElementPosition(attacker),getElementPosition(source) setElementRotation(source,rx,ry,rz) if getDistanceBetweenPoints3D(ax,ay,az,px,py,pz) <= 5 then toggleAllControls(source,false,true,false) else toggleControl(source,'forwards',true) setControlState(source,'forwards',true) end end,50,0,source) setControlState(source,'forwards',true) end end end ) addEventHandler('onMarkerHit',marker,function(plr) if getElementType(plr) == 'player' then toggleAllControls(plr,true,true,true) end end )
  10. لخبطت بين الكلينت والسيرفر؟ الاول كلينت والثاني سيرفر
  11. اي تنفع بس يعني لازم تستخدمها لسبب مو في اي شيء تستخدمها وقلت لك فوق ليه تستخدمها ذذ تستخدمها عشان تحول من سترنق الى رقم, يعني مثآل, local numberString = '10' outputChatBox(tonumber(numberString)) وستخدمها عشان تتحقق ان الشيء هو رقم مثآل, local Word = 'Hello' if not tonumber(Word) then return end
  12. خخخ ومن قالك ان الكود سيرفر ؟؟ onClientPlayerDamage -__-" ما بتقدر تسوي له كانسل onPlayerDamage هو اصلا كلينت, وبعدين حتى لو حطيت
  13. انشرح سابقا هنا , viewtopic.php?f=164&t=62717 ولكن اعطيك بإختصار , الحين ركز معي, guiGetText حقه هو Syntax الـ, string guiGetText ( element guiElement ) string = '' , "" يقولك ان الشيء الي بتجيبه من اللبل او الاديت او الزر ..., راح يكون سترنق يعني بين علامتين التنصيص هذي setTime طيب نروح لـ bool setTime ( int hour, int minute ) لو تلاحظ, int hour,, int = Integer = يعني عدد صحيح بدون فواصل عشريه لاحظ اقولك عدد صحيح يعني بيكون رقم يعني مو سترنق طيب نشرح الكود addEventHandler("onClientGUIClick",GUIEditor_Button[8], -- حدث اذا ضغط function () -- نفتح وظيفه جديده local time = guiGetText(GUIEditor_Edit[1]) -- نجيب الكلام من الاديت if tonumber(time) and string.len(time) <= 2 and string.len(time) ~= 0 then -- نتحقق ان الي كتبه هو رقم ! ونتحقق انه اصغر من 2 او يساويها ونتحقق ان الي كتبه في الاديت مو صفر يعني ان الاديت مابتكون فاضيه setTime(tonumber(time),0) -- هنا نحط الوقت , طبعا هنا حولنا الستنرق الى رقم عشان الوظيفه لازم تكون عدد , ملاحظه : الوقت بالكلنت بيكون للاعب فقط end -- اغلاق end -- اغلاق ,false) -- اغلاق وعشان ما يكون لأي زر بنفس الاسم
  14. سوي تريقر للسيرفر triggerServerEvent
  15. السياره ما تجي لأنك ما عدلت الاحداثيات, The Killer @ player ?? ثانيا وش وضعه سطر 15 بدل player > source
  16. ههه لا ما اعاملك بشكل موب زين , يعني جد تخيل واحد يجي يقولك ابي كود الشرطه تلحق الحراميه , انت يعني كيف بتفهم وش الي بيصير وكيف ومتى -__-" addEventHandler('onPlayerDamage',root,function(attacker) if attacker and attacker ~= source and getElementType(attacker) == 'player' and getPlayerTeam(attacker) and getTeamName(getPlayerTeam(attacker)) == 'Police' then if getPlayerWantedLevel(source) > 0 and getPlayerTeam(source) and getTeamName(getPlayerTeam(source)) ~= 'Police' then -- ... كودك end end end ) ^ لا تحسب انه يسوي شيء هالكود انا سويته كذا لأنك ما فهمتني كيف يقبض عليه ؟ يعني وش يسوي بالضبط ؟
  17. سوي شرط يتحقق اذا وصل 100 يعطيه فلوس ذذ ضيف ذا مع الكود, if gKills[killer] == 100 then givePlayerMoney(killer,1000) gKills[killer] = 0 end
  18. كيف يعني اعتقال يعني اشرح لنا كيف تبيه خطوه خطوه احنا ما نقرأ افكارك ذذ
  19. كفوك الطيب , حياك الله
  20. -- Client Side # addEventHandler('onClientGUIClick',root,function() if source == K then if not getElementData(resourceRoot,'Respawn') then setElementData(resourceRoot,'Respawn',true) end setElementPosition(localPlayer,-3971.4719238281,-3001.4482421875,85.429931640625) elseif source == Button2 then if not getElementData(resourceRoot,'Respawn2') then setElementData(resourceRoot,'Respawn2',true) end setElementPosition(localPlayer,x,y,z) end end ) addEventHandler('onClientPlayerSpawn',localPlayer,function() if getElementData(resourceRoot,'Respawn') == true then setElementPosition(localPlayer,-3971.4719238281,-3001.4482421875,85.429931640625) elseif getElementData(resourceRoot,'Respawn2') == true then setElementPosition(localPlayer,x,y,z) end end )
  21. حبيبي احنا ما نعرف تقولنا سيرفر جدي وجدتي , عندك شيء تشرحه اشرح -__-" جرب استخدم \n
  22. استبدل TableCars[source] بدلها بـ veh[source] 14 سطر
  23. اولا ما تقدر تقتل نفسك لأن الكود لازم يكون فيه شخص يقتل آخر , ثانيا الكلام ما يظهر لأن اللبل احداثياته معوقه -__-"
  24. طيب قتلت احد؟ لأنه الكود ما اشوف فيه خطأ
×
×
  • Create New...