xMr.SAAD Posted January 29, 2014 Share Posted January 29, 2014 السلام عليكم شباب معي مشكله كود انتقال انا حاط تحت بدايه حقتي مشكله هو فوق بدايه يتمشا لاعب ينقله ابيه لـ لمس ماركر فقط ينقله يعني صار يطير في سما هو فوق ماركر ما ينقله لازم يلمسه local SAAD = createMarker( 1016.4337768555,-5008.357421875,3.2609376907349, "cylinder", 15, 0, 0, 0, 0 ) function SAAAD(theElement) if getElementType(theElement) == "player" and (theElement == localPlayer) then fadeCamera(false) setTimer(setElementPosition, 1000, 1, theElement, 2079.673828125, 867.55792236328, 6.9767789840698) setTimer(setPedRotation, 1000, 1, theElement, 270) setTimer(fadeCamera, 1000, 1, true) playSoundFrontEnd(1) end end addEventHandler("onClientMarkerHit", SAAD, SAAAD) ابي حل وشكرا Link to comment
!#NssoR_) Posted January 29, 2014 Share Posted January 29, 2014 مافهمت شي ؟ وش تبي تسوي بضبط Link to comment
shwaeki Posted January 29, 2014 Share Posted January 29, 2014 تفضل اخوي زي طلبك viewtopic.php?f=160&t=68183&p=638120&hilit=%D9%81%D9%88%D9%82+%D9%85%D8%A7%D8%B1%D9%83%D8%B1#p638120 و الرجاء البحث قبل ما تنزل موضوع Link to comment
./BlackBird# Posted January 29, 2014 Share Posted January 29, 2014 local SAAD = createMarker( 1016.4337768555,-5008.357421875,3.2609376907349, "cylinder", 15, 0, 0, 0, 0 ) function SAAAD(theElement) local _,_,z = getElementPosition(theElement) local _,_,z2 = getElementPosition(source) if z2-1 < z and z2+1 > z then if getElementType(theElement) == "player" and (theElement == localPlayer) then fadeCamera(false) setTimer(setElementPosition, 1000, 1, theElement, 2079.673828125, 867.55792236328, 6.9767789840698) setTimer(setPedRotation, 1000, 1, theElement, 270) setTimer(fadeCamera, 1000, 1, true) playSoundFrontEnd(1) end end end addEventHandler("onClientMarkerHit", SAAD, SAAAD) Link to comment
TAPL Posted January 29, 2014 Share Posted January 29, 2014 اللغة العربية في خطر على الأقل حاول تركب جملة مفيده ._. جلست اقرأ الموضوع 10 مرات عشان افهم الي تبيه او على الأقل حسب الي فهمته انك تبي ذا https://forum.multitheftauto.com/viewtopic.php?f=160&t=69694 Link to comment
xMr.SAAD Posted January 29, 2014 Author Share Posted January 29, 2014 طيب ابي كود لـ كتب شات CC لقد انضممت الى الحرب انتظر حتى تبدا الجولة كتب مره ثاني شات يقول لا يوجد عدد كافي من الاعبين اذا صار كتبو لاعبين CC بعد 30 ثانيه ينقلهـ لـ حرب Link to comment
TAPL Posted January 29, 2014 Share Posted January 29, 2014 الطلب مكرر على ما اعتقد ابحث بالمنتدى Link to comment
xMr.SAAD Posted January 29, 2014 Author Share Posted January 29, 2014 تابل ممكن كود دورت ما لقيت Link to comment
al-Kobra Posted January 29, 2014 Share Posted January 29, 2014 Race = { Players = { }; Vehicles = { }; Position = { [1] = { x, y, z }; [2] = { x, y, z }; [3] = { x, y, z }; [4] = { x, y, z }; [5] = { x, y, z }; }; Cars = { { 432 }; { 432 }; }; }; local Timer setRaceStats = function ( stats ) if stats then setElementData ( resourceRoot, "RaceStarted", true ) else Race.Players = 0 setElementData ( resourceRoot, "RaceStarted", false ) outputChatBox ( "* تم إفتتاح السباق", root, 255, 255, 0, true ) end end checkPlayers = function ( ) if Race.Players < 2 then for i, v in ipairs ( Race.Vehicles ) do local player = getElementData ( v, "Owner" ) if player then killPed ( player ) end destroyElement ( v ) end outputChatBox ( "* تم إلغاء السباق بسبب قلة اللاعبين", root, 255, 0, 0, true ) end end getPlayerVehicle = function ( element ) if element then local type = getElementType if type ( element ) == "player" or type ( element ) == "ped" then if isPedInVehicle ( element ) then local vehicle = getPedOccupiedVehicle ( element ) if getVehicleController ( vehicle ) == element then return vehicle end return false end return false end return false end return false end addEventHandler ( "onPlayerChat", root, function ( msg ) if string.find ( msg, "cc" ) then if getElementData ( resourceRoot, "RaceStarted" ) then return outputChatBox ( "* لم ينتهي السباق بعد", source, 255, 0, 0, true ) end if Race.Players < 5 then if not Race.Vehicles[source] then Race.Players = Race.Players+1 if Race.Players == 5 then setRaceStats ( true ) if isTimer ( Timer ) then killTimer ( Timer ) end else if not isTimer ( Timer ) then Timer = setTimer ( checkPlayers, 60000, 1 ) end end Race.Vehicles[source] = createVehicle ( Race.Cars[math.random(#Race.Cars)][1], Race.Position[Race.Players][1], Race.Position[Race.Players][2], Race.Position[Race.Players][3] ) setElementDimension ( Race.Vehicles[source], 1 ) setElementDimension ( source, 1 ) setTimer ( warpPedIntoVehicle, 100, 1, source, Race.Vehicles[source] ) setElementData ( Race.Vehicles[source], "Owner", source ) end else outputChatBox ( "* أكتمل العدد", source, 255, 0, 0, true ) end end end ) addEventHandler ( "onVehicleExplode", resourceRoot, function ( ) if Race.Players == 1 then local player = getElementData ( source, "Owner" ) if isElement ( player ) then if getElementData ( resourceRoot, "RaceStarted" ) then givePlayerMoney ( player, 5000 ) outputChatBox ( "* $5000 لقد ربحت", player, 255, 255, 0, true ) end Race.Vehicles[player] = nil end setTimer ( setRaceStats, 2000, 1, false ) else Race.Players = Race.Players-1 end end ) addEventHandler ( "onElementDestroy", resourceRoot, function ( ) if getElementType ( source ) == "vehicle" then if Race.Players == 1 then local player = getElementData ( source, "Owner" ) if isElement ( player ) then if getElementData ( resourceRoot, "RaceStarted" ) then givePlayerMoney ( player, 5000 ) outputChatBox ( "* $5000 لقد ربحت", player, 255, 255, 0, true ) end Race.Vehicles[player] = nil end setTimer ( setRaceStats, 2000, 1, false ) else Race.Players = Race.Players-1 end end end ) addEventHandler ( "onPlayerQuit", root, function ( ) if Race.Vehicles[source] then if isElement ( Race.Vehicles[source] ) then destroyElement ( Race.Vehicles[source] ) else if Race.Players == 1 then setTimer ( setRaceStats, 2000, 1, false ) else Race.Players = Race.Players-1 end end Race.Vehicles[source] = nil end end ) addEventHandler ( "onVehicleExit", resourceRoot, function ( player ) if getVehicleController ( source ) == player then killPed ( player ) destroyElement ( source ) end end ) addEventHandler ( "onPlayerWasted", root, function ( ) local vehicle = getPlayerVehicle ( source ) if vehicle then local player = getElementData ( vehicle, "Owner" ) if player then if player == source then destroyElement ( vehicle ) end end end end ) setTimer ( function ( ) for _,v in ipairs(Race.Vehicles) do if isElement( v ) and isElementInWater( v ) then killPed ( getVehicleController( v ) ) destroyElement ( v ) end end end, 1000, 0 ) setRaceStats ( false ) هذا الكود حق عناد ,, عدل عليه وخله حق الحرب Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now