Jump to content

Ahmed Abo-elezz

Members
  • Posts

    152
  • Joined

  • Last visited

Everything posted by Ahmed Abo-elezz

  1. شباب ممكن تصلحو لى الكود هذا لو سمحتو cr1 = createObject ( 18609, -1649.10278, -2253.58398, 31.98978 ) addEventHandler ("onMarkerHit", jobmarkerb, function () attachElements ( cr1, vehicle [ source ], 3.2, -1.9, 1.4, 0, 0, 90 ) end ) vehicle = {} -------------------------------------------- addEvent("car1khash",true) addEventHandler("car1khash",root, function () if ( isElement ( vehicle [ source ] ) ) then destroyElement ( vehicle [ source ] ) end vehicle [ source ] = createVehicle ( 543, -1647.58228, -2220.03857, 31.67941 ) warpPedIntoVehicle ( source, vehicle [ source ] ) end )
  2. متشكر جدا يااخى وشكرا لكل واحد حاول يساعدنى
  3. يعمل لكن يعمل مع كل الاسلحة واننا اريد ان يعمل مع السكينه فقط
  4. اخى هذا يعمل مع الاسلحة التى تصدر رصاص فقط لكن لا يعمل مع السكينه
  5. هذا كل الكود server side jobmarker = createMarker(-1643.0999755859, -2261.8000488281, 31.599998474121, "cylinder", 4, 255, 255, 255, 0 ) function duty(thePlayer, matchingDimension) if isElementWithinMarker(thePlayer, jobmarker) then createObject ( 18568, -1650, -2261.8999023438, 32.900001525879, 0, 0, 311.49536132813 ) end end انا اريد عندما الرجل يقف فى المركر ويضرب بالسكينة يتم انشاء الاوبجيكت من فضلك ساعدنى
  6. شباب انا اريد كود عند دخول الشخص فى المركر ويضرب رصاص بالسلاح مثلا 27 يتم انشاء اوبجيكت ممكن احد يعطينى الاكواد
  7. انا اريد الشخصية رقم 79 فقط المشكله معى ان عند الضغط على المكان الاسود فى الجريد لست يظهر لى الشخرية رقم 0
  8. شباب انا عملت هذا الكود واريد تصحيحه المشكله انه عندما اضغط فى اى مكان فى الجريد ليست يأتى الى الشخصية 0 من فضلكم صححو لى هذا اريد الغاء الشخصية 0 لا تظهر ابدا MarkerPanalnag = createMarker(-1628.9000244141, -2247, 30.5, "cylinder", 1.5, 255, 255, 255, 0 ) createBlipAttachedTo ( MarkerPanalnag, 56 ) createObject ( 2387, -1628.9000244141, -2247, 30.5, 0, 0, 274 ) createObject ( 341, -1628.8000488281, -2246.1999511719, 30.39999961853, 20, 292, 0 ) GUIEditor = { gridlist = {}, button = {}, window = {}, } GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_gridlist = {} windowjob = guiCreateWindow(950, 300, 240, 437, "الخشاب", false) guiWindowSetSizable(windowjob, false) guiSetVisible(windowjob, false) GUIEditor_gridlist[1] = guiCreateGridList(21, 260, 200, 115, false, windowjob) guiGridListAddColumn(GUIEditor_gridlist[1], "رقم الخشصية", 0.5) guiGridListAddColumn(GUIEditor_gridlist[1], "اسم الشخصية", 0.5) for i = 1, 5 do guiGridListAddRow(GUIEditor_gridlist[1]) end guiGridListSetItemText(GUIEditor_gridlist[1], 0, 1, "79", false, false) guiGridListSetItemText(GUIEditor_gridlist[1], 0, 2, "خشاب 1", false, false) GUIEditor_Button[1] = guiCreateButton(21, 379, 130, 48, "الحصول على الوظيفة", false, windowjob) GUIEditor_Button[2] = guiCreateButton(155, 379, 66, 48, "الغاء", false, windowjob) --------------------------------------------------------------------------------- function joinTeamnag() triggerServerEvent("khashab",localPlayer) local skin = guiGridListGetItemText ( GUIEditor_gridlist[1], guiGridListGetSelectedItem ( GUIEditor_gridlist[1] ), 1 ) if skin ~= 0 then guiSetVisible(windowjob, false) showCursor(false) setElementModel ( localPlayer, skin ) end end -------------------------------------------------------------------------- function SAPDjobnag(hitElement) setElementData ( localPlayer, "ownskin", getElementModel (localPlayer) ) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(windowjob) then guiSetVisible(windowjob, true) showCursor(true) end end end ------------------------------------------------------------------------------------- function setskintestnag() local skin = guiGridListGetItemText ( GUIEditor_gridlist[1], guiGridListGetSelectedItem ( GUIEditor_gridlist[1] ), 1 ) setElementModel ( localPlayer, skin ) end ------------------------------------------------------------------------------------ function removeSAPDWindownag() guiSetVisible(windowjob, false) showCursor(false) setElementModel(localPlayer, getElementData(localPlayer, "ownskin")) end ------------------------------------------ ---------------------------------------------------------------------------------- ---------------------------------------------------------------------------------- addEventHandler ( "onClientGUIClick", GUIEditor_gridlist[1], setskintestnag, false ) addEventHandler("onClientMarkerHit", MarkerPanalnag, SAPDjobnag) addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeamnag, false) addEventHandler("onClientGUIClick", GUIEditor_Button[2] , removeSAPDWindownag, false) addEventHandler("onClientMarkerLeave", marker, SAPDjobleavekhash)
  9. دا جزأ منو بس ضفلى على اللى انا اقصد لو سمحت اريد عند شراء اللعب مثلا M4 الحد الاقصى للروصاص الذى ممكن ان يصل اليه هو 1.000 if(getAccountData(player_account, "GunLicense") == true) then if(weapon_name == "weapon_porrete") then if(player_money >= tonumber(price_porrete)) then giveWeapon(source, 24, 100) takePlayerMoney(source, tonumber(price_porrete)) outputChatBox("Desert eagle لقد اشتريت 100 رصارة من", source, 0, 255, 0) else outputChatBox("انت لا تملك مال كافى لشراء هذا السلاح", source, 255, 0, 0) end elseif(weapon_name == "weapon_m4") then if(player_money >= tonumber(price_m4)) then giveWeapon(source, 31, 100) takePlayerMoney(source, tonumber(price_m4)) outputChatBox("M4 لقد اشتريت 100 رصارة من", source, 0, 255, 0) else outputChatBox("انت لا تملك مال كافى لشراء هذا السلاح", source, 255, 0, 0) end end
  10. ممكن تركب الكود كلو على بعضو لان بعملو مش راضى يشتغل
  11. اريد اضافة الى هذا الكود لا يمك للاعب الا الوصول الى 1000 رصاصة فقط ولا يمكنة تخطى ال1000 رصاصة ممكن احد يساعدنى elseif(weapon_name == "weapon_m4") then if(player_money >= tonumber(price_m4)) then giveWeapon(source, 31, 100) takePlayerMoney(source, tonumber(price_m4)) outputChatBox("M4 لقد اشتريت 100 رصارة من", source, 0, 255, 0) else outputChatBox("انت لا تملك مال كافى لشراء هذا السلاح", source, 255, 0, 0) end
  12. لو سمحتو شباب انا اريد الغاء logout من السرفر الخاص بى ماهو الكود لذلك ؟
  13. من فضلك احد يصحح لى هذا الكود انا اريد عندما يحصل اللاعب على سيارة يتم اخفاء السيارة الاول لكن المشكله عندما يوجد 2 لاعب مثلا واحد منهم اخد سياره والاخر اخد سياره بيتم اخفاء السيراة الخاصه بالشخص الاول انا اريد ان يكون كل شخص يحتوى على سياره خاصه لوحده لا تختفى الا اذا هو استخدم سيارة اخرى addEvent("car1",true) addEventHandler("car1",root, function () if ( isElement ( vehicle ) ) then destroyElement ( vehicle ) end vehicle = createVehicle ( 487, 1948.95215, -2284.68774, 13.54688 ) warpPedIntoVehicle ( source, vehicle ) end )
  14. سعدونى بسرعه لو سمحتو انا اريد عندما اللاعب يحصل عالى الوظفيه هو فقط من يستطع رأية الماركرس و البلب لكن اللاعبين الاخرين لا يرون ذلك الا اذا دخلو الوظيفة ياريت تسعدونى بسرعه وتضحو لى ما هى الاخطاء فى الاسكربت التى تم تعدلها local Markers = { [1]={ 1819.35986, -2430.48096, 13.55469 }, [2]={ -1306.38330, -249.23454, 14.14844 }, [3]={ 365.97522, 2536.92969, 16.66176 }, [4]={ 1557.38379, 1392.78687, 10.85596 } } local Markere = { [1]={ 1983.82495, -2627.80347, 12.54688 }, [2]={ -1275.60242, 19.60469, 13.14844 }, [3]={ 268.06848, 2464.47119, 15.47656 }, [4]={ 11533.20911, 1775.58008, 9.82031 } } local pedCus = { [1]={ 9 }, [2]={ 10 }, [3]={ 14 } } theteam = createTeam("Driver", 255, 255, 0) Teams = { [theteam] = true } Vehs = { [487 or 593] = true } function Teamin ( ) local team = getTeamFromName ( "Driver" ) if team then setPlayerTeam ( source, team ) setPlayerNametagColor ( source, 0, 255, 0 ) outputChatBox("انت الان طيار", source) end end addEvent ( "JoTeam", true) addEventHandler ( "JoTeam", root, Teamin ) ---------------------------- function enterVehicle ( thePlayer, seat, jacked ) if getElementType ( thePlayer ) == "player" then if ( Vehs[getElementModel ( source )] ) and ( not Teams[getPlayerTeam( thePlayer )] ) then removePedFromVehicle( thePlayer ) outputChatBox("الطيار فقط من يستطع القياده", thePlayer) end end end addEventHandler ( "onVehicleEnter", getRootElement(), enterVehicle ) ------------------------------ markert = { } blipt = { } pedt = { } cuss = { } cuse = {} function startJob ( thePlayer ) local x, y, z = unpack ( Markers [ math.random ( #Markers ) ] ) markert [ thePlayer ] = createMarker ( x, y, z, "cylinder", 5.0, 255, 0, 0, 0 ) cuss = { getElementPosition( markert [ thePlayer ] ) } local skins = unpack ( pedCus [ math.random ( #pedCus ) ] ) pedt [ thePlayer ] = createPed( skins, x, y, z ) blipt [ thePlayer ] = createBlipAttachedTo ( markert [ thePlayer ], 58 ) addEventHandler ( "onMarkerHit", markert [ thePlayer ], warpit ) end function inVEH ( thePlayer ) if ( getElementType ( thePlayer ) == "player" and isPedInVehicle ( thePlayer ) ) then if ( getElementModel ( source ) == 487 or 593) then startJob ( thePlayer ) end end end addEventHandler ( "onVehicleEnter", getRootElement(), inVEH ) function warpit ( thePlayer ) if ( getElementType ( thePlayer ) == "player" and isPedInVehicle ( thePlayer ) ) then local vehiclee = getPedOccupiedVehicle ( thePlayer ) if ( getElementModel ( vehiclee ) == 487 or 593 ) then setTimer ( warpPedIntoVehicle, 500, 1, pedt [ thePlayer ], vehiclee, 2 ) destroyJob ( thePlayer ) local x, y, z = unpack ( Markere [ math.random ( #Markere ) ] ) markert [ thePlayer ] = createMarker ( x, y, z - 1, "cylinder", 5.0, 255, 0, 0, 50 ) cuse = { getElementPosition( markert [ thePlayer ] ) } blipt [ thePlayer ] = createBlipAttachedTo ( markert [ thePlayer ], 56 ) addEventHandler ( "onMarkerHit", markert [ thePlayer ], pickmeup ) end end end function pickmeup ( thePlayer ) if ( getElementType ( thePlayer ) == "player" and isPedInVehicle ( thePlayer ) ) then destroyJob ( thePlayer ) local mx, my, mz = unpack ( cuss ) local mmx, mmy, mmz = unpack ( cuse ) local money = getDistanceBetweenPoints2D ( mx, my, mmx, mmy ) finalmoney = 2 * math.floor ( money ) if finalmoney then setTimer( givePlayerMoney, 500, 1, thePlayer, finalmoney ) setTimer ( function ( ) if ( isElement ( pedt [ thePlayer ] ) ) then destroyElement ( pedt [ thePlayer ] ) end startJob ( thePlayer ) end ,500, 1 ) end end end function deleteOnExit ( thePlayer ) if ( isElement ( markert [ thePlayer ] ) ) then destroyElement ( markert [ thePlayer ] ) end if ( isElement ( blipt [ thePlayer ] ) ) then destroyElement ( blipt [ thePlayer ] ) end if ( isElement ( pedt [ thePlayer ] ) ) then destroyElement ( pedt [ thePlayer ] ) end end addEventHandler ( "onVehicleExit", getRootElement(), deleteOnExit ) function destroyJob ( thePlayer ) if ( isElement ( markert [ thePlayer ] ) ) then destroyElement ( markert [ thePlayer ] ) end if ( isElement ( blipt [ thePlayer ] ) ) then destroyElement( blipt [ thePlayer ] ) end end -------------------------------------------------------- addEvent("driver1",true) addEventHandler("driver1",root, function () setPedSkin ( source, 253 ) end ) ----------------------------------- addEvent("driver2",true) addEventHandler("driver2",root, function () setPedSkin ( source, 297 ) end ) ----------------------- addEvent("car1",true) addEventHandler("car1",root, function () if ( isElement ( vehicle ) ) then destroyElement ( vehicle ) end vehicle = createVehicle ( 487, 1948.95215, -2284.68774, 13.54688 ) warpPedIntoVehicle ( source, vehicle ) end ) ------------------------------------ addEvent("car2",true) addEventHandler("car2",root, function () if ( isElement ( vehicle ) ) then destroyElement ( vehicle ) end vehicle = createVehicle ( 593, 1948.95215, -2284.68774, 13.54688 ) warpPedIntoVehicle ( source, vehicle ) end )
  15. please help faaast!!!! i want whan player join job he only can see markers and blips and about other player cant see it only have ajob he can see blips and markers please fix code and show to me edites please faaaaaaaaaaast local Markers = { [1]={ 1819.35986, -2430.48096, 13.55469 }, [2]={ -1306.38330, -249.23454, 14.14844 }, [3]={ 365.97522, 2536.92969, 16.66176 }, [4]={ 1557.38379, 1392.78687, 10.85596 } } local Markere = { [1]={ 1983.82495, -2627.80347, 12.54688 }, [2]={ -1275.60242, 19.60469, 13.14844 }, [3]={ 268.06848, 2464.47119, 15.47656 }, [4]={ 11533.20911, 1775.58008, 9.82031 } } local pedCus = { [1]={ 9 }, [2]={ 10 }, [3]={ 14 } } theteam = createTeam("Driver", 255, 255, 0) Teams = { [theteam] = true } Vehs = { [487 or 593] = true } function Teamin ( ) local team = getTeamFromName ( "Driver" ) if team then setPlayerTeam ( source, team ) setPlayerNametagColor ( source, 0, 255, 0 ) outputChatBox("انت الان طيار", source) end end addEvent ( "JoTeam", true) addEventHandler ( "JoTeam", root, Teamin ) ---------------------------- function enterVehicle ( thePlayer, seat, jacked ) if getElementType ( thePlayer ) == "player" then if ( Vehs[getElementModel ( source )] ) and ( not Teams[getPlayerTeam( thePlayer )] ) then removePedFromVehicle( thePlayer ) outputChatBox("الطيار فقط من يستطع القياده", thePlayer) end end end addEventHandler ( "onVehicleEnter", getRootElement(), enterVehicle ) ------------------------------ markert = { } blipt = { } pedt = { } cuss = { } cuse = {} function startJob ( thePlayer ) local x, y, z = unpack ( Markers [ math.random ( #Markers ) ] ) markert [ thePlayer ] = createMarker ( x, y, z, "cylinder", 5.0, 255, 0, 0, 0 ) cuss = { getElementPosition( markert [ thePlayer ] ) } local skins = unpack ( pedCus [ math.random ( #pedCus ) ] ) pedt [ thePlayer ] = createPed( skins, x, y, z ) blipt [ thePlayer ] = createBlipAttachedTo ( markert [ thePlayer ], 58 ) addEventHandler ( "onMarkerHit", markert [ thePlayer ], warpit ) end function inVEH ( thePlayer ) if ( getElementType ( thePlayer ) == "player" and isPedInVehicle ( thePlayer ) ) then if ( getElementModel ( source ) == 487 or 593) then startJob ( thePlayer ) end end end addEventHandler ( "onVehicleEnter", getRootElement(), inVEH ) function warpit ( thePlayer ) if ( getElementType ( thePlayer ) == "player" and isPedInVehicle ( thePlayer ) ) then local vehiclee = getPedOccupiedVehicle ( thePlayer ) if ( getElementModel ( vehiclee ) == 487 or 593 ) then setTimer ( warpPedIntoVehicle, 500, 1, pedt [ thePlayer ], vehiclee, 2 ) destroyJob ( thePlayer ) local x, y, z = unpack ( Markere [ math.random ( #Markere ) ] ) markert [ thePlayer ] = createMarker ( x, y, z - 1, "cylinder", 5.0, 255, 0, 0, 50 ) cuse = { getElementPosition( markert [ thePlayer ] ) } blipt [ thePlayer ] = createBlipAttachedTo ( markert [ thePlayer ], 56 ) addEventHandler ( "onMarkerHit", markert [ thePlayer ], pickmeup ) end end end function pickmeup ( thePlayer ) if ( getElementType ( thePlayer ) == "player" and isPedInVehicle ( thePlayer ) ) then destroyJob ( thePlayer ) local mx, my, mz = unpack ( cuss ) local mmx, mmy, mmz = unpack ( cuse ) local money = getDistanceBetweenPoints2D ( mx, my, mmx, mmy ) finalmoney = 2 * math.floor ( money ) if finalmoney then setTimer( givePlayerMoney, 500, 1, thePlayer, finalmoney ) setTimer ( function ( ) if ( isElement ( pedt [ thePlayer ] ) ) then destroyElement ( pedt [ thePlayer ] ) end startJob ( thePlayer ) end ,500, 1 ) end end end function deleteOnExit ( thePlayer ) if ( isElement ( markert [ thePlayer ] ) ) then destroyElement ( markert [ thePlayer ] ) end if ( isElement ( blipt [ thePlayer ] ) ) then destroyElement ( blipt [ thePlayer ] ) end if ( isElement ( pedt [ thePlayer ] ) ) then destroyElement ( pedt [ thePlayer ] ) end end addEventHandler ( "onVehicleExit", getRootElement(), deleteOnExit ) function destroyJob ( thePlayer ) if ( isElement ( markert [ thePlayer ] ) ) then destroyElement ( markert [ thePlayer ] ) end if ( isElement ( blipt [ thePlayer ] ) ) then destroyElement( blipt [ thePlayer ] ) end end -------------------------------------------------------- addEvent("driver1",true) addEventHandler("driver1",root, function () setPedSkin ( source, 253 ) end ) ----------------------------------- addEvent("driver2",true) addEventHandler("driver2",root, function () setPedSkin ( source, 297 ) end ) ----------------------- addEvent("car1",true) addEventHandler("car1",root, function () if ( isElement ( vehicle ) ) then destroyElement ( vehicle ) end vehicle = createVehicle ( 487, 1948.95215, -2284.68774, 13.54688 ) warpPedIntoVehicle ( source, vehicle ) end ) ------------------------------------ addEvent("car2",true) addEventHandler("car2",root, function () if ( isElement ( vehicle ) ) then destroyElement ( vehicle ) end vehicle = createVehicle ( 593, 1948.95215, -2284.68774, 13.54688 ) warpPedIntoVehicle ( source, vehicle ) end )
  16. like this i want chat show to player if he got jop dont show to all player function teamSet ( ) local team = getTeamFromName ( "Taxi Driver" ) if team then setPlayerTeam ( source, team ) setPlayerNametagColor ( source, 0, 255, 0 ) setElementModel(source, 57) createVehicle(420, 1777.3017578125, -1891.779296875, 13.157614707947) outputChatBox("you are now driver", thePlayer) else local teamw = getTeamFromName ( "Taxi Driver" ) if teamw then cancelEvent() outputChatBox("You are already driver!", source) end end end
  17. i want code about dont show things to any player in game whan some player start job for example i made job taxi and whan i jon outputchatbox you are driver now my problem whan outputchabox show this show to me and to other player i want it show to me only and if other player get jop show to him only please help me fast
  18. انا اريد ان يكون هذا بشكل مرتب ولييش عشوائى ممكن احد يعدله لى local x, y, z = unpack ( Markere [ math.random ( #Markere ) ] )
  19. for example i want make job taxi i made every thing but i want code example about when car join marker the player will get 100$ and show to him new marker and when he end all markers the event will replay again please anyone written to me code example about it
  20. هل تعرف كيف ان اشغل هذا او اضيف اليه صوره معينه ؟ https://community.multitheftauto.com/in ... ils&id=960
  21. انا اريد وضع علامه على الخريطه بشكل مختلف عن الشكل الافتراضى ماهو الكود الخاص بهذا؟
×
×
  • Create New...