السلام عليكم
بسم الله الرحمن الرحيم
تصحيح كود+تصليحو
marker1 = createMarker(815.57086,-1093.02063,24,"cylinder",1.5,0,0,0,0)
marker2 = createMarker(1961.6999511719,2322.3999023438,15.800000190735,"cylinder",1.5,0,0,0,0)
marker3 = createMarker(-2189.8000488281,-245.30000305176,35.5,"cylinder",1.5,0,0,0,0)
local ped1 = createPed(293,815.57086,-1093.02063,25.79006,180)
local ped2 = createPed(293,1961.8000488281,2321.8000488281,16.5,0.00274658)
local ped3 = createPed(293,-2189.8000488281,-245.39999389648,36.5,270.001373)
addEvent("ShowMessage",true)
createBlipAttachedTo(marker1 or marker2 or marker3,56)
setElementFrozen(ped1 or ped2 or ped3,true)
addEventHandler("onClientPedDamage",root,
function ()
if source == ped1 or ped2 or ped3 then
cancelEvent()
end
end)
local x,y = guiGetScreenSize()
local oldSkin = getElementModel(localPlayer)
addEventHandler("onClientMarkerHit",root,
function (hit)
if source == marker1 or marker2 or marker3 then
if getElementType(hit) == "player" then
if isPedInVehicle(hit) then return end
if localPlayer == hit then
guiSetVisible(GUIEditor.window[1],true)
showCursor(true)
local oldSkin = getElementModel(localPlayer)
guiGridListSetSelectedItem ( GUIEditor.gridlist[1], 0, 0)
end
end
end
end
)
GUIEditor = {
gridlist = {},
window = {},
button = {},
label = {}
}
local Skins = {{"293","Serial Killer 1"},{"29","Serial Killer 2"}}
local x = x - 332
local y = y - 333
GUIEditor.window[1] = guiCreateWindow(x/2,y/2,332,333, "Serial Killer Job", false)
guiWindowSetSizable(GUIEditor.window[1], false)
guiSetVisible(GUIEditor.window[1],false)
GUIEditor.button[1] = guiCreateButton(9, 272, 94, 41, "Take Job", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[2] = guiCreateButton(233, 272, 89, 41, "Close", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA")
GUIEditor.label[1] = guiCreateLabel(9, 18, 318, 82, "Here is Serial Killer Job By Bassam|Syria|MeMOpRince,selcet skin to be ", false, GUIEditor.window[1])
GUIEditor.label[2] = guiCreateLabel(8, 39, 314, 30, "Serial Killer and Kill Players If you don't want be Serial Killer press \"Close\"", false, GUIEditor.window[1])
GUIEditor.gridlist[1] = guiCreateGridList(12, 66, 310, 190, false, GUIEditor.window[1])
guiGridListAddColumn(GUIEditor.gridlist[1], "#", 0.3)
guiGridListAddColumn(GUIEditor.gridlist[1], "Skin Number", 0.3)
guiGridListAddColumn(GUIEditor.gridlist[1], "Skin Name", 0.3)
for i,v in ipairs(Skins) do
local row = guiGridListAddRow(GUIEditor.gridlist[1])
guiGridListSetItemText(GUIEditor.gridlist[1], row, 1, i, false, false)
guiGridListSetItemText(GUIEditor.gridlist[1], row, 2, v[1], false, false)
guiGridListSetItemText(GUIEditor.gridlist[1], row, 3, v[2], false, false)
end
addEventHandler("onClientGUIClick",root,
function ()
if source == GUIEditor.button[1] then
local skin = guiGridListGetItemText( GUIEditor.gridlist[1],guiGridListGetSelectedItem(GUIEditor.gridlist[1]),2)
if skin ~= "" then
triggerServerEvent("TakeJob",localPlayer,skin)
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
end
elseif source == GUIEditor.button[2] then
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementModel(localPlayer,oldSkin)
elseif source == GUIEditor.gridlist[1] then
local skin = guiGridListGetItemText( GUIEditor.gridlist[1],guiGridListGetSelectedItem(GUIEditor.gridlist[1]),2)
if skin == "" then return end
setElementModel(localPlayer,tonumber(skin))
end
end)
addEventHandler("onClientRender", getRootElement(),
function()
local x, y, z = getElementPosition(ped1)
local x2, y2, z2 = getElementPosition(localPlayer)
if(isLineOfSightClear(x, y, z, x2, y2, z2, true, true, false, true)) then
local sx, sy = getScreenFromWorldPosition(x, y, z+1.3)
if(sx) and (sy) then
local distance = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2)
if(distance < 30) then
dxDrawText("Serial Killer Job", sx+2, sy+2, sx, sy, tocolor(255, 0, 0, 200), 2-(distance/20), "arial", "center", "center")
dxDrawText("Serial Killer Job", sx, sy, sx, sy, tocolor(255, 0, 0, 200), 2-(distance/20), "arial", "center", "center")
end
end
end
end)
function dxwon()
local x,y = guiGetScreenSize()
dxDrawText("$2000", x*353/1360, y*33/768, x*955/1360, y*257/768, tocolor(0, 139, 0, 255), 2.00, "bankgothic", "left", "top", false, false, true, false, false)
dxDrawText("ربحت", x*592/1360, y*27/768, x*1022/1360, y*183/768, tocolor(0, 139, 0, 255), 4.00, "default", "left", "top", false, false, true, false, false)
end
addEventHandler("ShowMessage",root,
function ()
local x,y = guiGetScreenSize()
addEventHandler("onClientRender", root,dxwon)
GUIEditor.gridlist[2] = guiCreateGridList(x*335/1360, y*38/768, x*402/1360, y*61/768, false)
guiSetAlpha(GUIEditor.gridlist[2], 0.49)
setTimer(function ()
removeEventHandler("onClientRender", root,dxwon)
destroyElement(GUIEditor.gridlist[2])
end,3000,1)
end
)
addEventHandler("onClientRender", getRootElement(),
function()
local x, y, z = getElementPosition(ped2)
local x2, y2, z2 = getElementPosition(localPlayer)
if(isLineOfSightClear(x, y, z, x2, y2, z2, true, true, false, true)) then
local sx, sy = getScreenFromWorldPosition(x, y, z+1.3)
if(sx) and (sy) then
local distance = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2)
if(distance < 30) then
dxDrawText("Serial Killer Job", sx+2, sy+2, sx, sy, tocolor(255, 0, 0, 200), 2-(distance/20), "arial", "center", "center")
dxDrawText("Serial Killer Job", sx, sy, sx, sy, tocolor(255, 0, 0, 200), 2-(distance/20), "arial", "center", "center")
end
end
end
end)
function dxwon()
local x,y = guiGetScreenSize()
dxDrawText("$2000", x*353/1360, y*33/768, x*955/1360, y*257/768, tocolor(0, 139, 0, 255), 2.00, "bankgothic", "left", "top", false, false, true, false, false)
dxDrawText("ربحت", x*592/1360, y*27/768, x*1022/1360, y*183/768, tocolor(0, 139, 0, 255), 4.00, "default", "left", "top", false, false, true, false, false)
end
addEventHandler("ShowMessage",root,
function ()
local x,y = guiGetScreenSize()
addEventHandler("onClientRender", root,dxwon)
GUIEditor.gridlist[2] = guiCreateGridList(x*335/1360, y*38/768, x*402/1360, y*61/768, false)
guiSetAlpha(GUIEditor.gridlist[2], 0.49)
setTimer(function ()
removeEventHandler("onClientRender", root,dxwon)
destroyElement(GUIEditor.gridlist[2])
end,3000,1)
end
)
addEventHandler("onClientRender", getRootElement(),
function()
local x, y, z = getElementPosition(ped3)
local x2, y2, z2 = getElementPosition(localPlayer)
if(isLineOfSightClear(x, y, z, x2, y2, z2, true, true, false, true)) then
local sx, sy = getScreenFromWorldPosition(x, y, z+1.3)
if(sx) and (sy) then
local distance = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2)
if(distance < 30) then
dxDrawText("Serial Killer Job", sx+2, sy+2, sx, sy, tocolor(255, 0, 0, 200), 2-(distance/20), "arial", "center", "center")
dxDrawText("Serial Killer Job", sx, sy, sx, sy, tocolor(255, 0, 0, 200), 2-(distance/20), "arial", "center", "center")
end
end
end
end)
function dxwon()
local x,y = guiGetScreenSize()
dxDrawText("$2000", x*353/1360, y*33/768, x*955/1360, y*257/768, tocolor(0, 139, 0, 255), 2.00, "bankgothic", "left", "top", false, false, true, false, false)
dxDrawText("ربحت", x*592/1360, y*27/768, x*1022/1360, y*183/768, tocolor(0, 139, 0, 255), 4.00, "default", "left", "top", false, false, true, false, false)
end
addEventHandler("ShowMessage",root,
function ()
local x,y = guiGetScreenSize()
addEventHandler("onClientRender", root,dxwon)
GUIEditor.gridlist[2] = guiCreateGridList(x*335/1360, y*38/768, x*402/1360, y*61/768, false)
guiSetAlpha(GUIEditor.gridlist[2], 0.49)
setTimer(function ()
removeEventHandler("onClientRender", root,dxwon)
destroyElement(GUIEditor.gridlist[2])
end,3000,1)
end
)
ايش المشكلة ؟؟؟؟ ان في مود تاني اجي اخش في الماركر حقو وش يجيني ؟ اللوحة ذي + الوحة حق المود و شكرا