0 Üye ve 1 Ziyaretçi konuyu incelemekte.
Arac = createVehicle ( ID, x, y, z, 0, 0, r )addEventHandler ( "onVehicleStartExit", Arac, function ()cancelEvent ()end )
addEvent("openinf_voditel", true)screenWidth, screenHeight = guiGetScreenSize()function windm () if not getElementData ( localPlayer, "trash_working") then infowind = guiCreateWindow(screenWidth - 700, screenHeight - 500, 200, 229, "Posta Teslimat Görevi", false) infotext = guiCreateMemo(15,20,165,150,"Posta Tesmilat Görevini Bitir Ve ₺20000 Al !",false,infowind) guiMemoSetReadOnly( infotext, true ) guiSetFont(text2, "default-bold-small") showCursor(true) guiSetVisible ( infowind , true) guiWindowSetSizable(infowind, false) Button_Glose = guiCreateButton(10, 174, 90, 45, "İptal", false, infowind) Button_Start = guiCreateButton(100, 174, 90, 45, "Kabul", false, infowind) addEventHandler("onClientGUIClick", Button_Start, kit ) addEventHandler("onClientGUIClick", Button_Glose, noshow ) else for i, v in ipairs ( createdPickups ) do if isElement ( v ) then local pick2 = getElementData ( v, "pick2") if isElement ( pick2 ) then destroyElement ( pick2 ) end local icon = getElementData ( v, "icon" ) if isElement ( icon ) then destroyElement ( icon ) end destroyElement ( v ) end end triggerServerEvent ( "finitoWork_voditel", localPlayer ) setElementData ( localPlayer, "trash_working", false ) endendaddEventHandler("openinf_voditel", root, windm )function noshow () if ( source == Button_Glose ) then destroyElement ( infowind ) showCursor ( false ) endendaddEventHandler("onClientVehicleDamage", root, handleVehicleDamage)function kit () if ( source == Button_Start ) then startWorking() destroyElement ( infowind ) showCursor ( false ) end endaddEvent ( "pay", true )function giving ()endaddEventHandler("pay", resourceRoot, giving )addEvent ( "get", true )function peremen (plr) plr = getLocalPlayer ()endaddEventHandler("get", resourceRoot, peremen )pickupSpawns = { { -2053,-2527,30 }, }max_pickups_set = 12 -- como você precisa pegar para o fim dos captadorescreatedPickups = {}max_pickups = max_pickups_setif max_pickups_set > #pickupSpawns then max_pickups = #pickupSpawnsendfunction startWorking () if not getElementData ( localPlayer, "trash_working" ) then createdPickups = {} triggerServerEvent ( "picku_voditel", localPlayer ) setElementData ( localPlayer, "trash_working", true ) setElementData ( localPlayer, "trash_working_hit", 0 ) outputChatBox ( "Görevi Başarıyla Aldın ", 255, 255, 255, false ) for i, v in ipairs ( pickupSpawns ) do local pick = createMarker ( v[1],v[2],v[3], "checkpoint", 4.0, 255, 255, 255 ) local pick2 = createPickup ( v[1],v[2],v[3], 3, 1314, 10000 ) setElementData ( pick, "taken", false ) setElementData ( pick, "pick2", pick2 ) setElementData ( pick, "bus_pickup", true ) setElementData ( pick, "id", s ) if i == 1 then local icon = createBlipAttachedTo ( pick, 41, 2 ) setElementData ( pick, "icon", icon ) end table.insert (createdPickups, pick) end endend function clientPickupHit(thePlayer, matchingDimension) if thePlayer == localPlayer and getElementData ( source, "bus_pickup" ) and not getElementData ( source, "taken" ) then setElementData ( source, "taken", true ) outputChatBox ( "Tebrikler Görevi Bitirdin Ve ₺20000 Aldın ", 255, 100, 100, true ) triggerServerEvent ( "giveMoneyFromClient_voditel", localPlayer, 20000 ) local hitted = getElementData ( localPlayer, "trash_working_hit" ) or 0 hitted = hitted+1 triggerServerEvent ( "experience", localPlayer, 20 ) local pick2 = getElementData ( source, "pick2" ) if isElement ( pick2 ) then destroyElement ( pick2 ) end local icon = getElementData ( source, "icon" ) if isElement ( icon ) then destroyElement ( icon ) end local icon = getElementData ( source, "icon" ) if isElement ( icon ) then destroyElement ( icon ) end destroyElement(source) setElementData ( localPlayer, "trash_working_hit", hitted) if hitted >= max_pickups then for i, v in ipairs ( createdPickups ) do if isElement ( v ) then local pick2 = getElementData ( v, "pick2") if isElement ( pick2 ) then destroyElement ( pick2 ) end local icon = getElementData ( v, "icon" ) if isElement ( icon ) then destroyElement ( icon ) end destroyElement ( v ) end end setElementData ( localPlayer, "trash_working", false ) triggerServerEvent ( "finitoWork_voditel", localPlayer ) return true end if createdPickups[hitted+1] then local icon = createBlipAttachedTo ( createdPickups[hitted+1], 41, 2 ) setElementData ( createdPickups[hitted+1], "icon", icon ) end endendaddEventHandler ( "onClientMarkerHit", getRootElement(), clientPickupHit )
Görev sc si bu ben kodu yerleştiremedim birde arabanın hasar almasını patlamasını nasıl engellerim o koduda yerleştirirmisiniz
server.lua atarmısın lütfen :c
jobm = createMarker ( -1978,106,28 - 1.1, "cylinder", 1.5, 255, 0, 0, 170 )myBlip = createBlipAttachedTo ( jobm, 56 ) give_skin = 255 -- скин, который выдается водилеfunction enter (element) if getElementType ( element ) == "player" then triggerClientEvent ( element, "openinf_voditel", element) endendaddEventHandler( "onMarkerHit", jobm, enter )addEvent ( "picku_voditel", true ) function create () local jobvehicle = createVehicle ( 459, -1990, 102, 27 ) warpPedIntoVehicle ( source, jobvehicle ) setElementData ( source, "working_veh", jobvehicle ) setElementModel ( source, give_skin) setElementData(source,"Mta",true)endaddEventHandler ( "picku_voditel", root, create ) addEvent ( "finitoWork_voditel", true ) function finitoWorkS () local veh = getElementData ( source, "working_veh" ) if isElement ( veh ) then destroyElement ( veh ) setElementData ( source, "working_veh", false ) removeElementData(source,"Mta",true ) endendaddEventHandler ( "finitoWork_voditel", root, finitoWorkS ) addEvent ( "giveMoneyFromClient_voditel", true ) function giveMoneyFromClientS (amount) givePlayerMoney ( source, amount )endaddEventHandler ( "giveMoneyFromClient_voditel", root, giveMoneyFromClientS )
addEvent("openinf_voditel", true)screenWidth, screenHeight = guiGetScreenSize()function windm () if not getElementData ( localPlayer, "trash_working") then infowind = guiCreateWindow(screenWidth - 700, screenHeight - 500, 200, 229, "Posta Teslimat Görevi", false) infotext = guiCreateMemo(15,20,165,150,"Posta Tesmilat Görevini Bitir Ve ?20000 Al !",false,infowind) guiMemoSetReadOnly( infotext, true ) guiSetFont(text2, "default-bold-small") showCursor(true) guiSetVisible ( infowind , true) guiWindowSetSizable(infowind, false) Button_Glose = guiCreateButton(10, 174, 90, 45, "İptal", false, infowind) Button_Start = guiCreateButton(100, 174, 90, 45, "Kabul", false, infowind) addEventHandler("onClientGUIClick", Button_Start, kit ) addEventHandler("onClientGUIClick", Button_Glose, noshow ) else for i, v in ipairs ( createdPickups ) do if isElement ( v ) then local pick2 = getElementData ( v, "pick2") if isElement ( pick2 ) then destroyElement ( pick2 ) end local icon = getElementData ( v, "icon" ) if isElement ( icon ) then destroyElement ( icon ) end destroyElement ( v ) end end triggerServerEvent ( "finitoWork_voditel", localPlayer ) setElementData ( localPlayer, "trash_working", false ) endendaddEventHandler("openinf_voditel", root, windm )function noshow () if ( source == Button_Glose ) then destroyElement ( infowind ) showCursor ( false ) endend--addEventHandler("onClientVehicleDamage", root, handleVehicleDamage)function kit () if ( source == Button_Start ) then startWorking() destroyElement ( infowind ) showCursor ( false ) end end addEvent ( "pay", true )function giving () endaddEventHandler("pay", resourceRoot, giving )addEvent ( "get", true )function peremen (plr) plr = getLocalPlayer ()endaddEventHandler("get", resourceRoot, peremen ) pickupSpawns = { { -2053,-2527,30 }, } max_pickups_set = 12 -- como você precisa pegar para o fim dos captadores createdPickups = {} max_pickups = max_pickups_setif max_pickups_set > #pickupSpawns then max_pickups = #pickupSpawnsend function startWorking () if not getElementData ( localPlayer, "trash_working" ) then createdPickups = {} triggerServerEvent ( "picku_voditel", localPlayer ) setElementData ( localPlayer, "trash_working", true ) setElementData ( localPlayer, "trash_working_hit", 0 ) outputChatBox ( "Görevi Başarıyla Aldın ", 255, 255, 255, false ) for i, v in ipairs ( pickupSpawns ) do local pick = createMarker ( v[1],v[2],v[3], "checkpoint", 4.0, 255, 255, 255 ) local pick2 = createPickup ( v[1],v[2],v[3], 3, 1314, 10000 ) setElementData ( pick, "taken", false ) setElementData ( pick, "pick2", pick2 ) setElementData ( pick, "bus_pickup", true ) setElementData ( pick, "id", s ) if i == 1 then local icon = createBlipAttachedTo ( pick, 41, 2 ) setElementData ( pick, "icon", icon ) end table.insert (createdPickups, pick) end endend function clientPickupHit(thePlayer, matchingDimension) if thePlayer == localPlayer and getElementData ( source, "bus_pickup" ) and not getElementData ( source, "taken" ) then setElementData ( source, "taken", true ) outputChatBox ( "Tebrikler Görevi Bitirdin Ve ?20000 Aldın ", 255, 100, 100, true ) triggerServerEvent ( "giveMoneyFromClient_voditel", localPlayer, 20000 ) local hitted = getElementData ( localPlayer, "trash_working_hit" ) or 0 hitted = hitted+1 triggerServerEvent ( "experience", localPlayer, 20 ) local pick2 = getElementData ( source, "pick2" ) if isElement ( pick2 ) then destroyElement ( pick2 ) end local icon = getElementData ( source, "icon" ) if isElement ( icon ) then destroyElement ( icon ) end local icon = getElementData ( source, "icon" ) if isElement ( icon ) then destroyElement ( icon ) end destroyElement(source) setElementData ( localPlayer, "trash_working_hit", hitted) if hitted >= max_pickups then for i, v in ipairs ( createdPickups ) do if isElement ( v ) then local pick2 = getElementData ( v, "pick2") if isElement ( pick2 ) then destroyElement ( pick2 ) end local icon = getElementData ( v, "icon" ) if isElement ( icon ) then destroyElement ( icon ) end destroyElement ( v ) end end setElementData ( localPlayer, "trash_working", false ) triggerServerEvent ( "finitoWork_voditel", localPlayer ) return true end if createdPickups[hitted+1] then local icon = createBlipAttachedTo ( createdPickups[hitted+1], 41, 2 ) setElementData ( createdPickups[hitted+1], "icon", icon ) end endendaddEventHandler ( "onClientMarkerHit", getRootElement(), clientPickupHit )addEvent ( "HayaletArac", true )addEventHandler ( "HayaletArac", root, function (x ) for i,v in ipairs(getElementsByType("vehicle")) do setElementCollidableWith(v, getPedOccupiedVehicle(getLocalPlayer()), false) endend )
jobm = createMarker ( -1978,106,28 - 1.1, "cylinder", 1.5, 255, 0, 0, 170 )myBlip = createBlipAttachedTo ( jobm, 56 ) give_skin = 255 -- скин, который выдается водилеfunction enter (element) if getElementType ( element ) == "player" then triggerClientEvent ( element, "openinf_voditel", element) endendaddEventHandler( "onMarkerHit", jobm, enter )addEvent ( "picku_voditel", true )function cancel ()cancelEvent ()end function create () local jobvehicle = createVehicle ( 459, -1990, 102, 27 ) warpPedIntoVehicle ( source, jobvehicle ) addEventHandler ( "onVehicleStartExit", jobvehicle, cancel ) triggerClientEvent ( root, "HayaletArac", root, jobvehicle ) setElementData ( source, "working_veh", jobvehicle ) setElementModel ( source, give_skin) setElementData(source,"Mta",true)endaddEventHandler ( "picku_voditel", root, create ) addEvent ( "finitoWork_voditel", true )function finitoWorkS () local veh = getElementData ( source, "working_veh" ) if isElement ( veh ) then destroyElement ( veh ) setElementData ( source, "working_veh", false ) removeElementData(source,"Mta",true ) endendaddEventHandler ( "finitoWork_voditel", root, finitoWorkS ) addEvent ( "giveMoneyFromClient_voditel", true ) function giveMoneyFromClientS (amount) givePlayerMoney ( source, amount )endaddEventHandler ( "giveMoneyFromClient_voditel", root, giveMoneyFromClientS )
client.luaKod: luaaddEvent("openinf_voditel", true)screenWidth, screenHeight = guiGetScreenSize()function windm () if not getElementData ( localPlayer, "trash_working") then infowind = guiCreateWindow(screenWidth - 700, screenHeight - 500, 200, 229, "Posta Teslimat Görevi", false) infotext = guiCreateMemo(15,20,165,150,"Posta Tesmilat Görevini Bitir Ve ?20000 Al !",false,infowind) guiMemoSetReadOnly( infotext, true ) guiSetFont(text2, "default-bold-small") showCursor(true) guiSetVisible ( infowind , true) guiWindowSetSizable(infowind, false) Button_Glose = guiCreateButton(10, 174, 90, 45, "İptal", false, infowind) Button_Start = guiCreateButton(100, 174, 90, 45, "Kabul", false, infowind) addEventHandler("onClientGUIClick", Button_Start, kit ) addEventHandler("onClientGUIClick", Button_Glose, noshow ) else for i, v in ipairs ( createdPickups ) do if isElement ( v ) then local pick2 = getElementData ( v, "pick2") if isElement ( pick2 ) then destroyElement ( pick2 ) end local icon = getElementData ( v, "icon" ) if isElement ( icon ) then destroyElement ( icon ) end destroyElement ( v ) end end triggerServerEvent ( "finitoWork_voditel", localPlayer ) setElementData ( localPlayer, "trash_working", false ) endendaddEventHandler("openinf_voditel", root, windm )function noshow () if ( source == Button_Glose ) then destroyElement ( infowind ) showCursor ( false ) endend--addEventHandler("onClientVehicleDamage", root, handleVehicleDamage)function kit () if ( source == Button_Start ) then startWorking() destroyElement ( infowind ) showCursor ( false ) end end addEvent ( "pay", true )function giving () endaddEventHandler("pay", resourceRoot, giving )addEvent ( "get", true )function peremen (plr) plr = getLocalPlayer ()endaddEventHandler("get", resourceRoot, peremen ) pickupSpawns = { { -2053,-2527,30 }, } max_pickups_set = 12 -- como você precisa pegar para o fim dos captadores createdPickups = {} max_pickups = max_pickups_setif max_pickups_set > #pickupSpawns then max_pickups = #pickupSpawnsend function startWorking () if not getElementData ( localPlayer, "trash_working" ) then createdPickups = {} triggerServerEvent ( "picku_voditel", localPlayer ) setElementData ( localPlayer, "trash_working", true ) setElementData ( localPlayer, "trash_working_hit", 0 ) outputChatBox ( "Görevi Başarıyla Aldın ", 255, 255, 255, false ) for i, v in ipairs ( pickupSpawns ) do local pick = createMarker ( v[1],v[2],v[3], "checkpoint", 4.0, 255, 255, 255 ) local pick2 = createPickup ( v[1],v[2],v[3], 3, 1314, 10000 ) setElementData ( pick, "taken", false ) setElementData ( pick, "pick2", pick2 ) setElementData ( pick, "bus_pickup", true ) setElementData ( pick, "id", s ) if i == 1 then local icon = createBlipAttachedTo ( pick, 41, 2 ) setElementData ( pick, "icon", icon ) end table.insert (createdPickups, pick) end endend function clientPickupHit(thePlayer, matchingDimension) if thePlayer == localPlayer and getElementData ( source, "bus_pickup" ) and not getElementData ( source, "taken" ) then setElementData ( source, "taken", true ) outputChatBox ( "Tebrikler Görevi Bitirdin Ve ?20000 Aldın ", 255, 100, 100, true ) triggerServerEvent ( "giveMoneyFromClient_voditel", localPlayer, 20000 ) local hitted = getElementData ( localPlayer, "trash_working_hit" ) or 0 hitted = hitted+1 triggerServerEvent ( "experience", localPlayer, 20 ) local pick2 = getElementData ( source, "pick2" ) if isElement ( pick2 ) then destroyElement ( pick2 ) end local icon = getElementData ( source, "icon" ) if isElement ( icon ) then destroyElement ( icon ) end local icon = getElementData ( source, "icon" ) if isElement ( icon ) then destroyElement ( icon ) end destroyElement(source) setElementData ( localPlayer, "trash_working_hit", hitted) if hitted >= max_pickups then for i, v in ipairs ( createdPickups ) do if isElement ( v ) then local pick2 = getElementData ( v, "pick2") if isElement ( pick2 ) then destroyElement ( pick2 ) end local icon = getElementData ( v, "icon" ) if isElement ( icon ) then destroyElement ( icon ) end destroyElement ( v ) end end setElementData ( localPlayer, "trash_working", false ) triggerServerEvent ( "finitoWork_voditel", localPlayer ) return true end if createdPickups[hitted+1] then local icon = createBlipAttachedTo ( createdPickups[hitted+1], 41, 2 ) setElementData ( createdPickups[hitted+1], "icon", icon ) end endendaddEventHandler ( "onClientMarkerHit", getRootElement(), clientPickupHit )addEvent ( "HayaletArac", true )addEventHandler ( "HayaletArac", root, function (x ) for i,v in ipairs(getElementsByType("vehicle")) do setElementCollidableWith(v, getPedOccupiedVehicle(getLocalPlayer()), false) endend )server.luaKod: luajobm = createMarker ( -1978,106,28 - 1.1, "cylinder", 1.5, 255, 0, 0, 170 )myBlip = createBlipAttachedTo ( jobm, 56 ) give_skin = 255 -- скин, который выдается водилеfunction enter (element) if getElementType ( element ) == "player" then triggerClientEvent ( element, "openinf_voditel", element) endendaddEventHandler( "onMarkerHit", jobm, enter )addEvent ( "picku_voditel", true )function cancel ()cancelEvent ()end function create () local jobvehicle = createVehicle ( 459, -1990, 102, 27 ) warpPedIntoVehicle ( source, jobvehicle ) addEventHandler ( "onVehicleStartExit", jobvehicle, cancel ) triggerClientEvent ( root, "HayaletArac", root, jobvehicle ) setElementData ( source, "working_veh", jobvehicle ) setElementModel ( source, give_skin) setElementData(source,"Mta",true)endaddEventHandler ( "picku_voditel", root, create ) addEvent ( "finitoWork_voditel", true )function finitoWorkS () local veh = getElementData ( source, "working_veh" ) if isElement ( veh ) then destroyElement ( veh ) setElementData ( source, "working_veh", false ) removeElementData(source,"Mta",true ) endendaddEventHandler ( "finitoWork_voditel", root, finitoWorkS ) addEvent ( "giveMoneyFromClient_voditel", true ) function giveMoneyFromClientS (amount) givePlayerMoney ( source, amount )endaddEventHandler ( "giveMoneyFromClient_voditel", root, giveMoneyFromClientS )Araç bir yere çarptığı zaman hasar alıyor fakat başka birisi hasar veremiyor araca