Jump to content

السلام عليكم


Recommended Posts

شباب عندي مشكله في وظيفة الشرطي

ان اي مجرم يمدي يتوظف ارجو تساعدوني تفضلو الاكواد

انا ابيه ما يتوظف ياليت تساعدوني

كلانيت

jobMarker1 = createMarker(1546.029296875, -1681.7529296875, 13.558256149292-1,"cylinder",2,0,0,0,0) 
jobPed = createPed(267,1546.029296875, -1681.7529296875, 13.558256149292,89) 
jobBlip = createBlip(1546.029296875, -1681.7529296875, 13.558256149292,56) 
setBlipVisibleDistance(jobBlip,170) 
setElementFrozen(jobPed,true) 
  
addEventHandler("onClientPedDamage",root, 
function () 
if source == jobPed then 
    cancelEvent() 
    end 
end) 
  
local x,y = guiGetScreenSize() 
addEventHandler("onClientMarkerHit",resourceRoot, 
function (hit) 
    if source == jobMarker1 and hit == localPlayer then 
        if getElementType(hit) == "player" and getPlayerTeam(hit) ~= getTeamFromName("Police") then 
            if not isPedInVehicle(hit) then 
                if not ( getPlayerWantedLevel() > 0 ) then 
                    guiSetVisible(GUIEditor.window[1],true) 
                    showCursor(true) 
                else 
                    outputChatBox ( "لآتستطيع آنت مطلوب " ) 
                end 
            else 
                    outputChatBox ( "لآتستطيع فتح النافذه وانت في السياره")         
            end 
        else 
                    outputChatBox ( "آنت بالفعل في فريق الشرطه") 
        end 
    end 
end) 
  
  
  
GUIEditor = { 
    gridlist = {}, 
    window = {}, 
    button = {} 
} 
local x = x - 332 
local y = y - 333 
        GUIEditor.window[1] = guiCreateWindow(345, 90, 379, 544, "Police", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
        guiSetVisible(GUIEditor.window[1],false) 
        GUIEditor.button[1] = guiCreateButton(54, 487, 94, 41, "Take Job", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[2] = guiCreateButton(244, 487, 88, 41, "الغاء", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") 
        Memo1 = guiCreateMemo(13, 30, 356, 166, "وظيفة شرطي قم باخذ الوظيفه وسجن المجرمين ", false, GUIEditor.window[1]) 
        guiMemoSetReadOnly(Memo1, true)     
        GUIEditor.gridlist[1] = guiCreateGridList(10, 236, 357, 227, 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 = 1, 3 do 
            guiGridListAddRow(GUIEditor.gridlist[1]) 
        end 
        guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "1", false, false) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 0, 2, "267", false, false) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 0, 3, "Hern", false, false) 
  
        
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("startJob",localPlayer,skin) 
      guiSetVisible(GUIEditor.window[1],false) 
      showCursor(false) 
    end 
  elseif source == GUIEditor.button[2] then 
  guiSetVisible(GUIEditor.window[1],false) 
      showCursor(false) 
  end 
 end) 
  
addEventHandler("onClientRender", getRootElement(), 
function() 
                local x, y, z = getElementPosition(jobPed) 
                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("Police", sx+2, sy+2, sx, sy, tocolor(0,0,0), 2-(distance/20), "arial", "center", "center") 
                            dxDrawText("Police", sx, sy, sx, sy, tocolor(5,12,218), 2-(distance/20), "arial", "center", "center") 
            end 
        end 
    end 
end) 

سيرفر

pilotTeam = createTeam("Police",5,12,218) 
setTeamFriendlyFire(pilotTeam, false) 
addEvent("startJob",true) 
addEventHandler("startJob",root, 
function (skin) 
    setElementModel(client,tonumber(skin)) 
    setPlayerTeam(client,pilotTeam) 
    triggerClientEvent(client,"createPilotMarkers",client) 
 end 
) 

Edited by Guest
Link to comment

jobMarker1 = createMarker(1546.029296875, -1681.7529296875, 13.558256149292-1,"cylinder",2,0,0,0,0) 
jobPed = createPed(267,1546.029296875, -1681.7529296875, 13.558256149292,89) 
jobBlip = createBlip(1546.029296875, -1681.7529296875, 13.558256149292,56) 
setBlipVisibleDistance(jobBlip,170) 
setElementFrozen(jobPed,true) 
  
addEventHandler("onClientPedDamage",root, 
function () 
if source == jobPed then 
    cancelEvent() 
    end 
end) 
  
local x,y = guiGetScreenSize() 
addEventHandler("onClientMarkerHit",resourceRoot, 
function (hit) 
    if source == jobMarker1 and hit == localPlayer then 
        if getElementType(hit) == "player" and getPlayerTeam(hit) ~= getTeamFromName("Police") then 
            if not isPedInVehicle(hit) then 
                if  ( getPlayerWantedLevel() == 0 ) then 
                    guiSetVisible(GUIEditor.window[1],true) 
                    showCursor(true) 
                else 
                    outputChatBox ( "لآتستطيع آنت مطلوب " ) 
                end 
            else 
                    outputChatBox ( "لآتستطيع فتح النافذه وانت في السياره")         
            end 
        else 
                    outputChatBox ( "آنت بالفعل في فريق الشرطه") 
        end 
    end 
end) 
  
  
  
GUIEditor = { 
    gridlist = {}, 
    window = {}, 
    button = {} 
} 
local x = x - 332 
local y = y - 333 
        GUIEditor.window[1] = guiCreateWindow(345, 90, 379, 544, "Police", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
        guiSetVisible(GUIEditor.window[1],false) 
        GUIEditor.button[1] = guiCreateButton(54, 487, 94, 41, "Take Job", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[2] = guiCreateButton(244, 487, 88, 41, "الغاء", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") 
        Memo1 = guiCreateMemo(13, 30, 356, 166, "وظيفة شرطي قم باخذ الوظيفه وسجن المجرمين ", false, GUIEditor.window[1]) 
        guiMemoSetReadOnly(Memo1, true)     
        GUIEditor.gridlist[1] = guiCreateGridList(10, 236, 357, 227, 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 = 1, 3 do 
            guiGridListAddRow(GUIEditor.gridlist[1]) 
        end 
        guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "1", false, false) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 0, 2, "267", false, false) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 0, 3, "Hern", false, false) 
  
        
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("startJob",localPlayer,skin) 
      guiSetVisible(GUIEditor.window[1],false) 
      showCursor(false) 
    end 
  elseif source == GUIEditor.button[2] then 
  guiSetVisible(GUIEditor.window[1],false) 
      showCursor(false) 
  end 
 end) 
  
addEventHandler("onClientRender", getRootElement(), 
function() 
                local x, y, z = getElementPosition(jobPed) 
                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("Police", sx+2, sy+2, sx, sy, tocolor(0,0,0), 2-(distance/20), "arial", "center", "center") 
                            dxDrawText("Police", sx, sy, sx, sy, tocolor(5,12,218), 2-(distance/20), "arial", "center", "center") 
            end 
        end 
    end 
end) 
Link to comment

آممم جرب

jobMarker1 = createMarker(1546.029296875, -1681.7529296875, 13.558256149292-1,"cylinder",2,0,0,0,0) 
jobPed = createPed(267,1546.029296875, -1681.7529296875, 13.558256149292,89) 
jobBlip = createBlip(1546.029296875, -1681.7529296875, 13.558256149292,56) 
setBlipVisibleDistance(jobBlip,170) 
setElementFrozen(jobPed,true) 
  
addEventHandler("onClientPedDamage",root, 
function () 
if source == jobPed then 
    cancelEvent() 
    end 
end) 
  
local x,y = guiGetScreenSize() 
addEventHandler("onClientMarkerHit",resourceRoot, 
function (hit) 
    if source == jobMarker1 and hit == localPlayer then 
        if getElementType(hit) == "player" and getPlayerTeam(hit) ~= getTeamFromName("Police") then 
            if not isPedInVehicle(hit) then 
                if  getPlayerWantedLevel(hit) == 0  then 
                    guiSetVisible(GUIEditor.window[1],true) 
                    showCursor(true) 
                else 
                    outputChatBox ( "لآتستطيع آنت مطلوب " ) 
                end 
            else 
                    outputChatBox ( "لآتستطيع فتح النافذه وانت في السياره")         
            end 
        else 
                    outputChatBox ( "آنت بالفعل في فريق الشرطه") 
        end 
    end 
end) 
  
  
  
GUIEditor = { 
    gridlist = {}, 
    window = {}, 
    button = {} 
} 
local x = x - 332 
local y = y - 333 
        GUIEditor.window[1] = guiCreateWindow(345, 90, 379, 544, "Police", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
        guiSetVisible(GUIEditor.window[1],false) 
        GUIEditor.button[1] = guiCreateButton(54, 487, 94, 41, "Take Job", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[2] = guiCreateButton(244, 487, 88, 41, "الغاء", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") 
        Memo1 = guiCreateMemo(13, 30, 356, 166, "وظيفة شرطي قم باخذ الوظيفه وسجن المجرمين ", false, GUIEditor.window[1]) 
        guiMemoSetReadOnly(Memo1, true)     
        GUIEditor.gridlist[1] = guiCreateGridList(10, 236, 357, 227, 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 = 1, 3 do 
            guiGridListAddRow(GUIEditor.gridlist[1]) 
        end 
        guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "1", false, false) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 0, 2, "267", false, false) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 0, 3, "Hern", false, false) 
  
        
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("startJob",localPlayer,skin) 
      guiSetVisible(GUIEditor.window[1],false) 
      showCursor(false) 
    end 
  elseif source == GUIEditor.button[2] then 
  guiSetVisible(GUIEditor.window[1],false) 
      showCursor(false) 
  end 
 end) 
  
addEventHandler("onClientRender", getRootElement(), 
function() 
                local x, y, z = getElementPosition(jobPed) 
                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("Police", sx+2, sy+2, sx, sy, tocolor(0,0,0), 2-(distance/20), "arial", "center", "center") 
                            dxDrawText("Police", sx, sy, sx, sy, tocolor(5,12,218), 2-(distance/20), "arial", "center", "center") 
            end 
        end 
    end 
end) 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...