0 Üye ve 1 Ziyaretçi konuyu incelemekte.
local pedGorev1 = createPed (1, -14.41123, 2037.37317, 17.24525)setPedRotation(pedGorev1, 270)setPedFrozen(pedGorev1, true)function pedHasarEngelle ( saldirgan ) if source == pedGorev1 then cancelEvent() endendaddEventHandler ( "onClientPedDamage", getRootElement(), pedHasarEngelle )-- Ped Yazısıfunction pedYazi()dxDrawTextOnElement(pedGorev1,"Silah Kaçakçısı Bunny",1,20,26,255,0,255,2,"sa-header")endaddEventHandler("onClientRender",root, pedYazi)-- Ped Yazısı 2function pedYazi()dxDrawTextOnElement(pedGorev1,"'K' tuşuna bas!",-0.3,20,255,0,0,255,1.8,"sa-header")endaddEventHandler("onClientRender",root, pedYazi)--Useful funcfunction dxDrawTextOnElement(TheElement,text,height,distance,R,G,B,alpha,size,font,checkBuildings,checkVehicles,checkPeds,checkDummies,seeThroughStuff,ignoreSomeObjectsForCamera,ignoredElement) local x, y, z = getElementPosition(TheElement) local x2, y2, z2 = getElementPosition(localPlayer) local distance = distance or 10 local height = height or 9 local checkBuildings = checkBuildings or true local checkVehicles = checkVehicles or false local checkPeds = checkPeds or false local checkObjects = checkObjects or true local checkDummies = checkDummies or true local seeThroughStuff = seeThroughStuff or false local ignoreSomeObjectsForCamera = ignoreSomeObjectsForCamera or false local ignoredElement = ignoredElement or nil if (isLineOfSightClear(x, y, z, x2, y2, z2, checkBuildings, checkVehicles, checkPeds , checkObjects,checkDummies,seeThroughStuff,ignoreSomeObjectsForCamera,ignoredElement)) then local sx, sy = getScreenFromWorldPosition(x, y, z+height) if(sx) and (sy) then local distanceBetweenPoints = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) if(distanceBetweenPoints < distance) then dxDrawText(text, sx+2, sy+2, sx, sy, tocolor(R or 255, G or 255, B or 255, alpha or 255), (size or 1)-(distanceBetweenPoints / distance), font or "bond-arial", "center", "center") end end endendlocal x, y, z = getElementPosition( pedGorev1 ) local x2, y2, z2 = getElementPosition(localPlayer) local yakinlas = getDistanceBetweenPoints3D(x,y,z, x2, y2, z2) if yakinlas < 2 then local x2, y2, z2 = getElementPosition(localPlayer) local sx, sy = getScreenFromWorldPosition(x, y, z+0.9, 0.06) local yakinlas = getDistanceBetweenPoints3D(x,y,z, x2, y2, z2) end bindKey("K", "down", function() local x, y, z = getElementPosition( pedGorev1 ) local x2, y2, z2 = getElementPosition(localPlayer) local yakinlas = getDistanceBetweenPoints3D(x,y,z, x2, y2, z2) if ( yakinlas < 2 ) then --Bu kısıma market pedine girince yapılacak işlemler if guiGetVisible(gorevPencere)==true then -- Açıp/Kapatmak istediğin panelin adını buraya yaz. guiSetVisible(gorevPencere,false) showCursor(false) else guiSetVisible(gorevPencere,true) showCursor(true) end end end)addEventHandler("onClientResourceStart", resourceRoot,function()local screenW, screenH = guiGetScreenSize() gorevPencere = guiCreateWindow((screenW - 371) / 2, (screenH - 239) / 2, 371, 239, "Silah Kaçakçılığı Görevi", false) guiWindowSetMovable(gorevPencere, false) guiWindowSetSizable(gorevPencere, false) guiSetAlpha(gorevPencere, 1.00) guiSetVisible(gorevPencere, false) guiSetProperty(gorevPencere, "CaptionColour", "FF11FE00") showCursor(false) detaylarYazi = guiCreateLabel(20, 37, 326, 151, "Şşt sessiz ol!! Personeli uyandıracaksın \nsonuçta bu iş gizli olmalı.\n\nÖncelikle hoş geldin bu gün sana vereceğim iş\n\"Maxidex Gizli Üssü\"nden kaçırdığım silahları \ndepoma götürmek. Eğer bu görevi yaparsan\n benden; 40.000$ ve 100XP kazanacaksın!\n\n\nVar mısın dostum bu işe?", false, gorevPencere) guiSetFont(detaylarYazi, "clear-normal") guiLabelSetHorizontalAlign(detaylarYazi, "center", false) kabulEtBtn = guiCreateButton(149, 198, 67, 18, "Varım Ulan!", false, gorevPencere) guiSetFont(kabulEtBtn, "default-bold-small") guiSetProperty(kabulEtBtn, "NormalTextColour", "FFFD0005") kapatBtn = guiCreateButton(343, 24, 18, 13, "X", false, gorevPencere) guiSetProperty(kapatBtn, "NormalTextColour", "FFFCEE00") end)function kapat()if source == kapatBtn thenguiSetVisible(gorevPencere, false)showCursor(false)endendaddEventHandler("onClientGUIClick", root, kapat)
veh = {}addEvent("GorevBaslangic",true)addEventHandler("GorevBaslangic",root,function()if veh[source] and isElement( veh[source] ) then destroyElement(veh[source] )veh[source] = nilendlocal x,y,z = getElementPosition(source)veh[source] = createVehicle(573 ,-2914.47998, 504.33060, 5.83767,0,0,180)warpPedIntoVehicle (source,veh[source])setPedSkin ( source, 27)setElementData(source,"Gorev",true)setElementVisibleTo ( bitismarker, source, true)setElementVisibleTo ( bitisblip, source, true)end)
Kardeşim Ben vereyimde sen ayarla element vs dataları.Kod: luaveh = {}addEvent("GorevBaslangic",true)addEventHandler("GorevBaslangic",root,function()if veh[source] and isElement( veh[source] ) then destroyElement(veh[source] )veh[source] = nilendlocal x,y,z = getElementPosition(source)veh[source] = createVehicle(573 ,-2914.47998, 504.33060, 5.83767,0,0,180)warpPedIntoVehicle (source,veh[source])setPedSkin ( source, 27)setElementData(source,"Gorev",true)setElementVisibleTo ( bitismarker, source, true)setElementVisibleTo ( bitisblip, source, true)end)
Olmassa kodları at yardımcı olurum.
local pedGorev1 = createPed (1, -14.41123, 2037.37317, 17.24525)setPedRotation(pedGorev1, 270)setPedFrozen(pedGorev1, true)function pedHasarEngelle ( saldirgan ) if source == pedGorev1 then cancelEvent() endendaddEventHandler ( "onClientPedDamage", getRootElement(), pedHasarEngelle )-- Ped Yazısıfunction pedYazi()dxDrawTextOnElement(pedGorev1,"Silah Kaçakçısı Bunny",1,20,26,255,0,255,2,"sa-header")endaddEventHandler("onClientRender",root, pedYazi)-- Ped Yazısı 2function pedYazi()dxDrawTextOnElement(pedGorev1,"'K' tuşuna bas!",-0.3,20,255,0,0,255,1.8,"sa-header")endaddEventHandler("onClientRender",root, pedYazi)--Useful funcfunction dxDrawTextOnElement(TheElement,text,height,distance,R,G,B,alpha,size,font,checkBuildings,checkVehicles,checkPeds,checkDummies,seeThroughStuff,ignoreSomeObjectsForCamera,ignoredElement) local x, y, z = getElementPosition(TheElement) local x2, y2, z2 = getElementPosition(localPlayer) local distance = distance or 10 local height = height or 9 local checkBuildings = checkBuildings or true local checkVehicles = checkVehicles or false local checkPeds = checkPeds or false local checkObjects = checkObjects or true local checkDummies = checkDummies or true local seeThroughStuff = seeThroughStuff or false local ignoreSomeObjectsForCamera = ignoreSomeObjectsForCamera or false local ignoredElement = ignoredElement or nil if (isLineOfSightClear(x, y, z, x2, y2, z2, checkBuildings, checkVehicles, checkPeds , checkObjects,checkDummies,seeThroughStuff,ignoreSomeObjectsForCamera,ignoredElement)) then local sx, sy = getScreenFromWorldPosition(x, y, z+height) if(sx) and (sy) then local distanceBetweenPoints = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) if(distanceBetweenPoints < distance) then dxDrawText(text, sx+2, sy+2, sx, sy, tocolor(R or 255, G or 255, B or 255, alpha or 255), (size or 1)-(distanceBetweenPoints / distance), font or "bond-arial", "center", "center") end end endendlocal x, y, z = getElementPosition( pedGorev1 ) local x2, y2, z2 = getElementPosition(localPlayer) local yakinlas = getDistanceBetweenPoints3D(x,y,z, x2, y2, z2) if yakinlas < 2 then local x2, y2, z2 = getElementPosition(localPlayer) local sx, sy = getScreenFromWorldPosition(x, y, z+0.9, 0.06) local yakinlas = getDistanceBetweenPoints3D(x,y,z, x2, y2, z2) end bindKey("K", "down", function() local x, y, z = getElementPosition( pedGorev1 ) local x2, y2, z2 = getElementPosition(localPlayer) local yakinlas = getDistanceBetweenPoints3D(x,y,z, x2, y2, z2) if ( yakinlas < 2 ) then --Bu kısıma market pedine girince yapılacak işlemler if guiGetVisible(gorevPencere)==true then -- Açıp/Kapatmak istediğin panelin adını buraya yaz. guiSetVisible(gorevPencere,false) showCursor(false) else guiSetVisible(gorevPencere,true) showCursor(true) end end end)addEventHandler("onClientResourceStart", resourceRoot,function()local screenW, screenH = guiGetScreenSize() gorevPencere = guiCreateWindow((screenW - 371) / 2, (screenH - 239) / 2, 371, 239, "Silah Kaçakçılığı Görevi", false) guiWindowSetMovable(gorevPencere, false) guiWindowSetSizable(gorevPencere, false) guiSetAlpha(gorevPencere, 1.00) guiSetVisible(gorevPencere, false) guiSetProperty(gorevPencere, "CaptionColour", "FF11FE00") showCursor(false) detaylarYazi = guiCreateLabel(20, 37, 326, 151, "Şşt sessiz ol!! Personeli uyandıracaksın \nsonuçta bu iş gizli olmalı.\n\nÖncelikle hoş geldin bu gün sana vereceğim iş\n\"Maxidex Gizli Üssü\"nden kaçırdığım silahları \ndepoma götürmek. Eğer bu görevi yaparsan\n benden; 40.000$ ve 100XP kazanacaksın!\n\n\nVar mısın dostum bu işe?", false, gorevPencere) guiSetFont(detaylarYazi, "clear-normal") guiLabelSetHorizontalAlign(detaylarYazi, "center", false) kabulEtBtn = guiCreateButton(149, 198, 67, 18, "Varım Ulan!", false, gorevPencere) guiSetFont(kabulEtBtn, "default-bold-small") guiSetProperty(kabulEtBtn, "NormalTextColour", "FFFD0005") kapatBtn = guiCreateButton(343, 24, 18, 13, "X", false, gorevPencere) guiSetProperty(kapatBtn, "NormalTextColour", "FFFCEE00") end)function kapat()if source == kapatBtn thenguiSetVisible(gorevPencere, false)showCursor(false)endendaddEventHandler("onClientGUIClick", root, kapat)veh = {}addEvent("GorevBaslangic",true)addEventHandler("GorevBaslangic",root,function()if source == kabulEtBtn thenlocal x,y,z = getElementPosition(source)veh[source] = createVehicle(455 ,-10.17920, 2063.79663, 17.49219,0,0,180)warpPedIntoVehicle (source,veh[source])setPedSkin ( source, 27)setElementData(source,"Gorev",true)setElementVisibleTo ( bitismarker, source, true)setElementVisibleTo ( bitisblip, source, true) endend)
Kardeşim Server.lua kodlıcaksın o kodları Mesaj Birleştirildi: [time]17 Eylül 2017, 08:55:09[/time]Skype yada face ver yardım edim sana
local pedGorev1 = createPed (1, -14.41123, 2037.37317, 17.24525)setPedRotation(pedGorev1, 270)setPedFrozen(pedGorev1, true) function pedHasarEngelle ( saldirgan ) if source == pedGorev1 then cancelEvent() endendaddEventHandler ( "onClientPedDamage", getRootElement(), pedHasarEngelle ) -- Ped Yazısıfunction pedYazi()dxDrawTextOnElement(pedGorev1,"Silah Kaçakçısı Bunny",1,20,26,255,0,255,2,"sa-header")endaddEventHandler("onClientRender",root, pedYazi)-- Ped Yazısı 2function pedYazi()dxDrawTextOnElement(pedGorev1,"'K' tuşuna bas!",-0.3,20,255,0,0,255,1.8,"sa-header")endaddEventHandler("onClientRender",root, pedYazi) --Useful funcfunction dxDrawTextOnElement(TheElement,text,height,distance,R,G,B,alpha,size,font,checkBuildings,checkVehicles,checkPeds,checkDummies,seeThroughStuff,ignoreSomeObjectsForCamera,ignoredElement) local x, y, z = getElementPosition(TheElement) local x2, y2, z2 = getElementPosition(localPlayer) local distance = distance or 10 local height = height or 9 local checkBuildings = checkBuildings or true local checkVehicles = checkVehicles or false local checkPeds = checkPeds or false local checkObjects = checkObjects or true local checkDummies = checkDummies or true local seeThroughStuff = seeThroughStuff or false local ignoreSomeObjectsForCamera = ignoreSomeObjectsForCamera or false local ignoredElement = ignoredElement or nil if (isLineOfSightClear(x, y, z, x2, y2, z2, checkBuildings, checkVehicles, checkPeds , checkObjects,checkDummies,seeThroughStuff,ignoreSomeObjectsForCamera,ignoredElement)) then local sx, sy = getScreenFromWorldPosition(x, y, z+height) if(sx) and (sy) then local distanceBetweenPoints = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) if(distanceBetweenPoints < distance) then dxDrawText(text, sx+2, sy+2, sx, sy, tocolor(R or 255, G or 255, B or 255, alpha or 255), (size or 1)-(distanceBetweenPoints / distance), font or "bond-arial", "center", "center") end end endend local x, y, z = getElementPosition( pedGorev1 ) local x2, y2, z2 = getElementPosition(localPlayer) local yakinlas = getDistanceBetweenPoints3D(x,y,z, x2, y2, z2) if yakinlas < 2 then local x2, y2, z2 = getElementPosition(localPlayer) local sx, sy = getScreenFromWorldPosition(x, y, z+0.9, 0.06) local yakinlas = getDistanceBetweenPoints3D(x,y,z, x2, y2, z2) end bindKey("K", "down", function() local x, y, z = getElementPosition( pedGorev1 ) local x2, y2, z2 = getElementPosition(localPlayer) local yakinlas = getDistanceBetweenPoints3D(x,y,z, x2, y2, z2) if ( yakinlas < 2 ) then --Bu kısıma market pedine girince yapılacak işlemler if guiGetVisible(gorevPencere)==true then -- Açıp/Kapatmak istediğin panelin adını buraya yaz. guiSetVisible(gorevPencere,false) showCursor(false) else guiSetVisible(gorevPencere,true) showCursor(true) end end end) addEventHandler("onClientResourceStart", resourceRoot,function()local screenW, screenH = guiGetScreenSize() gorevPencere = guiCreateWindow((screenW - 371) / 2, (screenH - 239) / 2, 371, 239, "Silah Kaçakçılığı Görevi", false) guiWindowSetMovable(gorevPencere, false) guiWindowSetSizable(gorevPencere, false) guiSetAlpha(gorevPencere, 1.00) guiSetVisible(gorevPencere, false) guiSetProperty(gorevPencere, "CaptionColour", "FF11FE00") showCursor(false) detaylarYazi = guiCreateLabel(20, 37, 326, 151, "Şşt sessiz ol!! Personeli uyandıracaksın \nsonuçta bu iş gizli olmalı.\n\nÖncelikle hoş geldin bu gün sana vereceğim iş\n\"Maxidex Gizli Üssü\"nden kaçırdığım silahları \ndepoma götürmek. Eğer bu görevi yaparsan\n benden; 40.000$ ve 100XP kazanacaksın!\n\n\nVar mısın dostum bu işe?", false, gorevPencere) guiSetFont(detaylarYazi, "clear-normal") guiLabelSetHorizontalAlign(detaylarYazi, "center", false) kabulEtBtn = guiCreateButton(149, 198, 67, 18, "Varım Ulan!", false, gorevPencere) guiSetFont(kabulEtBtn, "default-bold-small") guiSetProperty(kabulEtBtn, "NormalTextColour", "FFFD0005") kapatBtn = guiCreateButton(343, 24, 18, 13, "X", false, gorevPencere) guiSetProperty(kapatBtn, "NormalTextColour", "FFFCEE00") end)function kapat()if source == kapatBtn thenguiSetVisible(gorevPencere, false)showCursor(false)endendaddEventHandler("onClientGUIClick", root, kapat)function basla()if source == kabulEtBtn then --> Butonu aktifleştirme.guiSetVisible(gorevPencere, false) --> Paneli aktifleştirme.showCursor(false)triggerServerEvent ( "GorevBaslangic", localPlayer)endendaddEventHandler("onClientGUIClick", root, basla)
veh = {}addEvent("GorevBaslangic",true)addEventHandler("GorevBaslangic",root,function()if veh[source] and isElement( veh[source] ) then destroyElement(veh[source] )veh[source] = nilendlocal x,y,z = getElementPosition(source)veh[source] = createVehicle(573 ,-2914.47998, 504.33060, 5.83767,0,0,180)setVehicleColor(veh[source], 0,0,0)warpPedIntoVehicle (source,veh[source])setPedSkin ( source, 27)end)