Jump to content

وش الخطء؟


Recommended Posts

key = "m" 
  
function centerWindow(center_window) 
    local screenW,screenH=guiGetScreenSize() 
    local windowW,windowH=guiGetSize(center_window,false) 
    local x,y = (screenW-windowW)/2,(screenH-windowH)/2 
    guiSetPosition(center_window,x,y,false) 
end 
  
GUIEditor_Button = {} 
GUIEditor_Label = {} 
  
        wnd = guiCreateWindow(565, 229, 459, 514, "Police Panel |By REDBULL", false) 
        guiWindowSetMovable(wnd, false) 
        guiWindowSetSizable(wnd, false) 
        centerWindow(wnd) 
        guiSetAlpha(wnd, 1.00) 
        guiSetProperty(wnd, "CaptionColour", "FFFF0000") 
        grid = guiCreateGridList(9, 23, 216, 338, false, wnd) 
        guiGridListSetSelectionMode(grid,1) 
        guiGridListAddColumn(grid, "الاعبين", 0.9) 
        edit = guiCreateEdit(15, 361, 206, 36, "", false, wnd)     
        GUIEditor_Button[1] = guiCreateButton(329, 33, 120, 47, "قتل الاعب", false, wnd) 
        GUIEditor_Button[2] = guiCreateButton(235, 90, 131, 47, "مراقبه الاعب", false, wnd) 
        GUIEditor_Button[3] = guiCreateButton(334, 147, 115, 47, "سحب سيارة الاعب", false, wnd) 
        GUIEditor_Button[4] = guiCreateButton(235, 204, 131, 47, "تفجير سيارة الاعب", false, wnd) 
        GUIEditor.label[1] = guiCreateLabel(248, 275, 113, 28, "Name", false, wnd) 
        GUIEditor.label[2] = guiCreateLabel(248, 319, 113, 28, "Money", false, wnd) 
        GUIEditor.label[3] = guiCreateLabel(248, 357, 113, 28, "Ping", false, wnd) 
        GUIEditor.label[4] = guiCreateLabel(248, 395, 113, 28, "Health", false, wnd) 
        GUIEditor.label[5] = guiCreateLabel(248, 433, 113, 28, "Armor", false, wnd) 
        GUIEditor_Button[5] = guiCreateButton(9, 451, 118, 46, "خروج", false, wnd) 
        guiSetFont(GUIEditor_Button[5],"default-bold-small") 
        GUIEditor.label[6] = guiCreateLabel(248, 461, 117, 28, "Skin", false, wnd)     
guiSetVisible(wnd,false) 
  
for i,btn in ipairs(GUIEditor_Button) do 
    guiSetFont(btn,"default-bold-small") 
    guiSetProperty(btn,"NormalTextColour","ffff0000") 
end 
  
for i,lal in ipairs(GUIEditor_Label) do 
    guiSetFont(lal,"default-bold-small") 
    guiLabelSetColor(lal,255,255,0) 
end 
  
function open() 
    triggerServerEvent("isPolice",localPlayer) 
end 
bindKey(key,"down",open) 
  
  
addEvent("Yes",true) 
addEventHandler("Yes",root, 
    function () 
        if guiGetVisible(wnd) then 
            guiSetVisible(wnd,false) 
            showCursor(false) 
            guiSetInputEnabled(false) 
        else 
            guiSetVisible(wnd,true) 
            showCursor(true) 
            guiSetInputEnabled(true) 
            putAllPlayersInList() 
        end 
    end 
) 
  
function putAllPlayersInList() 
    guiGridListClear(grid) 
    for i,v in ipairs(getElementsByType("player")) do 
        local row = guiGridListAddRow(grid) 
        guiGridListSetItemText(grid,row,1,getPlayerName(v),false,false) 
        guiGridListSetItemColor(grid,row,1,0,255,0) 
    end 
end 
  
  
addEventHandler("onClientGUIClick",root, 
    function () 
        if ( source == GUIEditor_Button[5] ) then 
            guiSetVisible(wnd,false) 
            showCursor(false) 
            guiSetInputEnabled(false) 
        end 
    end 
) 
  
function setPlayerSep(player) 
    setCameraTarget(player) 
    x,y = guiGetScreenSize() 
    endkey = guiCreateButton(0.1,0.4,0.1,0.15,"End",true) 
    addEventHandler("onClientGUIClick",endkey,onEndSep,false) 
end 
  
function onEndSep() 
    destroyElement(endkey) 
    setCameraTarget(localPlayer) 
end 
  
function show(msg) 
    exports.msgbox:guiShowMessageBox(msg,"error","Error",false,"OK") 
end 
  
addEventHandler("onClientGUIClick",root, 
    function () 
        local sel = guiGridListGetSelectedItem(grid) 
        local text = guiGridListGetItemText(grid,sel,1) 
        if ( source == GUIEditor_Button[2] ) then 
            if ( sel ~= -1 ) then 
                setPlayerSep(getPlayerFromName(text)) 
            else 
                show("الرجاء اختيار الاعب") 
            end 
        elseif ( source == GUIEditor_Button[1] ) then 
            if ( sel ~= -1 ) then 
                triggerServerEvent("killPlayer",localPlayer,text) 
            else 
                show("الرجاء اختيار الاعب") 
            end 
        elseif ( source == GUIEditor_Button[3] ) then 
            if ( sel ~= -1 ) then 
                local player = getPlayerFromName(text) 
                if isPedInVehicle(player) then 
                    triggerServerEvent("onDes",localPlayer,text) 
                else 
                    show("الاعب لا يملك مركبه") 
                end 
            else 
                show("الرجاء اختيار الاعب") 
            end 
        elseif ( source == GUIEditor_Button[4] ) then 
            if ( sel ~= -1 ) then 
                local player = getPlayerFromName(text) 
                if isPedInVehicle(player) then 
                    triggerServerEvent("onBlow",localPlayer,text) 
                else 
                    show("الاعب لا يملك مركبه") 
                end 
            else 
                show("الرجاء اختيار الاعب") 
            end 
        end 
    end 
) 
  
addEventHandler("onClientGUIClick",root, 
    function () 
        if ( source == grid ) then 
            local sel = guiGridListGetSelectedItem(grid) 
            local text = guiGridListGetItemText(grid,sel,1) 
            local player = getPlayerFromName(text) 
            if ( player ) then 
                guiSetText(GUIEditor_Label[1],"Name: " .. getPlayerName(player)) 
                guiSetText(GUIEditor_Label[2],"Money: " .. getPlayerMoney(player) .. "$") 
                guiSetText(GUIEditor_Label[3],"Ping: " .. getPlayerPing(player)) 
                guiSetText(GUIEditor_Label[4],"Health: " .. math.ceil(getElementHealth(player)) .. "%") 
                guiSetText(GUIEditor_Label[5],"Armor: " .. math.ceil(getPedArmor(player)) .. "%") 
                guiSetText(GUIEditor_Label[6],"Skin: " .. getElementModel(player)) 
            else 
                guiSetText(GUIEditor_Label[1],"Name: N/A") 
                guiSetText(GUIEditor_Label[2],"Money: N/A") 
                guiSetText(GUIEditor_Label[3],"Ping: N/A") 
                guiSetText(GUIEditor_Label[4],"Health: N/A") 
                guiSetText(GUIEditor_Label[5],"Armor: N/A") 
                guiSetText(GUIEditor_Label[6],"Skin: N/A") 
            end 
        end 
    end 
) 
  
  
addEventHandler("onClientGUIChanged",root, 
    function () 
        if ( source == edit ) then 
            local text = guiGetText(edit) 
            if ( text == "" ) then 
                putAllPlayersInList() 
            else 
                guiGridListClear(grid) 
                for i,v in ipairs(getElementsByType("player")) do 
                    local name = getPlayerName(v) 
                    if string.find(name,text) then 
                        local row = guiGridListAddRow(grid) 
                        guiGridListSetItemText(grid,row,1,name,false,false) 
                        guiGridListSetItemColor(grid,row,1,255,255,0) 
                    end 
                end 
            end 
        end 
    end 
) 
  

اللوحه تشتغل بس ما يمديني اطفيها او افتحها من زر

m

و ما يشتغل فيها ولا شي؟

وش الخطء

Link to comment
key = "m" 
  
function centerWindow(center_window) 
    local screenW,screenH=guiGetScreenSize() 
    local windowW,windowH=guiGetSize(center_window,false) 
    local x,y = (screenW-windowW)/2,(screenH-windowH)/2 
    guiSetPosition(center_window,x,y,false) 
end 
  
GUIEditor_Button = {} 
GUIEditor_Label = {} 
  
        wnd = guiCreateWindow(565, 229, 459, 514, "Police Panel |By REDBULL", false) 
        guiWindowSetMovable(wnd, false) 
        guiWindowSetSizable(wnd, false) 
        centerWindow(wnd) 
        guiSetAlpha(wnd, 1.00) 
        guiSetProperty(wnd, "CaptionColour", "FFFF0000") 
        grid = guiCreateGridList(9, 23, 216, 338, false, wnd) 
        guiGridListSetSelectionMode(grid,1) 
        guiGridListAddColumn(grid, "الاعبين", 0.9) 
        edit = guiCreateEdit(15, 361, 206, 36, "", false, wnd)     
        GUIEditor_Button[1] = guiCreateButton(329, 33, 120, 47, "قتل الاعب", false, wnd) 
        GUIEditor_Button[2] = guiCreateButton(235, 90, 131, 47, "مراقبه الاعب", false, wnd) 
        GUIEditor_Button[3] = guiCreateButton(334, 147, 115, 47, "سحب سيارة الاعب", false, wnd) 
        GUIEditor_Button[4] = guiCreateButton(235, 204, 131, 47, "تفجير سيارة الاعب", false, wnd) 
        GUIEditor.label[1] = guiCreateLabel(248, 275, 113, 28, "Name", false, wnd) 
        GUIEditor.label[2] = guiCreateLabel(248, 319, 113, 28, "Money", false, wnd) 
        GUIEditor.label[3] = guiCreateLabel(248, 357, 113, 28, "Ping", false, wnd) 
        GUIEditor.label[4] = guiCreateLabel(248, 395, 113, 28, "Health", false, wnd) 
        GUIEditor.label[5] = guiCreateLabel(248, 433, 113, 28, "Armor", false, wnd) 
        GUIEditor_Button[5] = guiCreateButton(9, 451, 118, 46, "خروج", false, wnd) 
        guiSetFont(GUIEditor_Button[5],"default-bold-small") 
        GUIEditor.label[6] = guiCreateLabel(248, 461, 117, 28, "Skin", false, wnd)     
guiSetVisible(wnd,false) 
  
for i,btn in ipairs(GUIEditor_Button) do 
    guiSetFont(btn,"default-bold-small") 
    guiSetProperty(btn,"NormalTextColour","ffff0000") 
end 
  
for i,lal in ipairs(GUIEditor_Label) do 
    guiSetFont(lal,"default-bold-small") 
    guiLabelSetColor(lal,255,255,0) 
end 
  
function open() 
    triggerServerEvent("isPolice",localPlayer) 
end 
bindKey(key,"down",open) 
  
  
addEvent("Yes",true) 
addEventHandler("Yes",root, 
    function () 
        if guiGetVisible(wnd) then 
            guiSetVisible(wnd,false) 
            showCursor(false) 
            guiSetInputEnabled(false) 
        else 
            guiSetVisible(wnd,true) 
            showCursor(true) 
            guiSetInputEnabled(true) 
            putAllPlayersInList() 
        end 
    end 
) 
  
function putAllPlayersInList() 
    guiGridListClear(grid) 
    for i,v in ipairs(getElementsByType("player")) do 
        local row = guiGridListAddRow(grid) 
        guiGridListSetItemText(grid,row,1,getPlayerName(v),false,false) 
        guiGridListSetItemColor(grid,row,1,0,255,0) 
    end 
end 
  
  
addEventHandler("onClientGUIClick",root, 
    function () 
        if ( source == GUIEditor_Button[5] ) then 
            guiSetVisible(wnd,false) 
            showCursor(false) 
            guiSetInputEnabled(false) 
        end 
    end 
) 
  
function setPlayerSep(player) 
    setCameraTarget(player) 
    x,y = guiGetScreenSize() 
    endkey = guiCreateButton(0.1,0.4,0.1,0.15,"End",true) 
    addEventHandler("onClientGUIClick",endkey,onEndSep,false) 
end 
  
function onEndSep() 
    destroyElement(endkey) 
    setCameraTarget(localPlayer) 
end 
  
function show(msg) 
    exports.msgbox:guiShowMessageBox(msg,"error","Error",false,"OK") 
end 
  
addEventHandler("onClientGUIClick",root, 
    function () 
        local sel = guiGridListGetSelectedItem(grid) 
        local text = guiGridListGetItemText(grid,sel,1) 
        if ( source == GUIEditor_Button[2] ) then 
            if ( sel ~= -1 ) then 
                setPlayerSep(getPlayerFromName(text)) 
            else 
                show("الرجاء اختيار الاعب") 
            end 
        elseif ( source == GUIEditor_Button[1] ) then 
            if ( sel ~= -1 ) then 
                triggerServerEvent("killPlayer",localPlayer,text) 
            else 
                show("الرجاء اختيار الاعب") 
            end 
        elseif ( source == GUIEditor_Button[3] ) then 
            if ( sel ~= -1 ) then 
                local player = getPlayerFromName(text) 
                if isPedInVehicle(player) then 
                    triggerServerEvent("onDes",localPlayer,text) 
                else 
                    show("الاعب لا يملك مركبه") 
                end 
            else 
                show("الرجاء اختيار الاعب") 
            end 
        elseif ( source == GUIEditor_Button[4] ) then 
            if ( sel ~= -1 ) then 
                local player = getPlayerFromName(text) 
                if isPedInVehicle(player) then 
                    triggerServerEvent("onBlow",localPlayer,text) 
                else 
                    show("الاعب لا يملك مركبه") 
                end 
            else 
                show("الرجاء اختيار الاعب") 
            end 
        end 
    end 
) 
  
addEventHandler("onClientGUIClick",root, 
    function () 
        if ( source == grid ) then 
            local sel = guiGridListGetSelectedItem(grid) 
            local text = guiGridListGetItemText(grid,sel,1) 
            local player = getPlayerFromName(text) 
            if ( player ) then 
                guiSetText(GUIEditor_Label[1],"Name: " .. getPlayerName(player)) 
                guiSetText(GUIEditor_Label[2],"Money: " .. getPlayerMoney(player) .. "$") 
                guiSetText(GUIEditor_Label[3],"Ping: " .. getPlayerPing(player)) 
                guiSetText(GUIEditor_Label[4],"Health: " .. math.ceil(getElementHealth(player)) .. "%") 
                guiSetText(GUIEditor_Label[5],"Armor: " .. math.ceil(getPedArmor(player)) .. "%") 
                guiSetText(GUIEditor_Label[6],"Skin: " .. getElementModel(player)) 
            else 
                guiSetText(GUIEditor_Label[1],"Name: N/A") 
                guiSetText(GUIEditor_Label[2],"Money: N/A") 
                guiSetText(GUIEditor_Label[3],"Ping: N/A") 
                guiSetText(GUIEditor_Label[4],"Health: N/A") 
                guiSetText(GUIEditor_Label[5],"Armor: N/A") 
                guiSetText(GUIEditor_Label[6],"Skin: N/A") 
            end 
        end 
    end 
) 
  
  
addEventHandler("onClientGUIChanged",root, 
    function () 
        if ( source == edit ) then 
            local text = guiGetText(edit) 
            if ( text == "" ) then 
                putAllPlayersInList() 
            else 
                guiGridListClear(grid) 
                for i,v in ipairs(getElementsByType("player")) do 
                    local name = getPlayerName(v) 
                    if string.find(name,text) then 
                        local row = guiGridListAddRow(grid) 
                        guiGridListSetItemText(grid,row,1,name,false,false) 
                        guiGridListSetItemColor(grid,row,1,255,255,0) 
                    end 
                end 
            end 
        end 
    end 
) 
  

اللوحه تشتغل بس ما يمديني اطفيها او افتحها من زر

m

و ما يشتغل فيها ولا شي؟

وش الخطء

ناقصك ملف سيرفر عشان يشتغل

Link to comment
key = "m" 
  
function centerWindow(center_window) 
    local screenW,screenH=guiGetScreenSize() 
    local windowW,windowH=guiGetSize(center_window,false) 
    local x,y = (screenW-windowW)/2,(screenH-windowH)/2 
    guiSetPosition(center_window,x,y,false) 
end 
  
GUIEditor_Button = {} 
GUIEditor_Label = {} 
  
        wnd = guiCreateWindow(565, 229, 459, 514, "Police Panel |By REDBULL", false) 
        guiWindowSetMovable(wnd, false) 
        guiWindowSetSizable(wnd, false) 
        centerWindow(wnd) 
        guiSetAlpha(wnd, 1.00) 
        guiSetProperty(wnd, "CaptionColour", "FFFF0000") 
        grid = guiCreateGridList(9, 23, 216, 338, false, wnd) 
        guiGridListSetSelectionMode(grid,1) 
        guiGridListAddColumn(grid, "الاعبين", 0.9) 
        edit = guiCreateEdit(15, 361, 206, 36, "", false, wnd)     
        GUIEditor_Button[1] = guiCreateButton(329, 33, 120, 47, "قتل الاعب", false, wnd) 
        GUIEditor_Button[2] = guiCreateButton(235, 90, 131, 47, "مراقبه الاعب", false, wnd) 
        GUIEditor_Button[3] = guiCreateButton(334, 147, 115, 47, "سحب سيارة الاعب", false, wnd) 
        GUIEditor_Button[4] = guiCreateButton(235, 204, 131, 47, "تفجير سيارة الاعب", false, wnd) 
        GUIEditor.label[1] = guiCreateLabel(248, 275, 113, 28, "Name", false, wnd) 
        GUIEditor.label[2] = guiCreateLabel(248, 319, 113, 28, "Money", false, wnd) 
        GUIEditor.label[3] = guiCreateLabel(248, 357, 113, 28, "Ping", false, wnd) 
        GUIEditor.label[4] = guiCreateLabel(248, 395, 113, 28, "Health", false, wnd) 
        GUIEditor.label[5] = guiCreateLabel(248, 433, 113, 28, "Armor", false, wnd) 
        GUIEditor_Button[5] = guiCreateButton(9, 451, 118, 46, "خروج", false, wnd) 
        guiSetFont(GUIEditor_Button[5],"default-bold-small") 
        GUIEditor.label[6] = guiCreateLabel(248, 461, 117, 28, "Skin", false, wnd)     
guiSetVisible(wnd,false) 
  
for i,btn in ipairs(GUIEditor_Button) do 
    guiSetFont(btn,"default-bold-small") 
    guiSetProperty(btn,"NormalTextColour","ffff0000") 
end 
  
for i,lal in ipairs(GUIEditor_Label) do 
    guiSetFont(lal,"default-bold-small") 
    guiLabelSetColor(lal,255,255,0) 
end 
  
function open() 
    triggerServerEvent("isPolice",localPlayer) 
end 
bindKey(key,"down",open) 
  
  
addEvent("Yes",true) 
addEventHandler("Yes",root, 
    function () 
        if guiGetVisible(wnd) then 
            guiSetVisible(wnd,false) 
            showCursor(false) 
            guiSetInputEnabled(false) 
        else 
            guiSetVisible(wnd,true) 
            showCursor(true) 
            guiSetInputEnabled(true) 
            putAllPlayersInList() 
        end 
    end 
) 
  
function putAllPlayersInList() 
    guiGridListClear(grid) 
    for i,v in ipairs(getElementsByType("player")) do 
        local row = guiGridListAddRow(grid) 
        guiGridListSetItemText(grid,row,1,getPlayerName(v),false,false) 
        guiGridListSetItemColor(grid,row,1,0,255,0) 
    end 
end 
  
  
addEventHandler("onClientGUIClick",root, 
    function () 
        if ( source == GUIEditor_Button[5] ) then 
            guiSetVisible(wnd,false) 
            showCursor(false) 
            guiSetInputEnabled(false) 
        end 
    end 
) 
  
function setPlayerSep(player) 
    setCameraTarget(player) 
    x,y = guiGetScreenSize() 
    endkey = guiCreateButton(0.1,0.4,0.1,0.15,"End",true) 
    addEventHandler("onClientGUIClick",endkey,onEndSep,false) 
end 
  
function onEndSep() 
    destroyElement(endkey) 
    setCameraTarget(localPlayer) 
end 
  
function show(msg) 
    exports.msgbox:guiShowMessageBox(msg,"error","Error",false,"OK") 
end 
  
addEventHandler("onClientGUIClick",root, 
    function () 
        local sel = guiGridListGetSelectedItem(grid) 
        local text = guiGridListGetItemText(grid,sel,1) 
        if ( source == GUIEditor_Button[2] ) then 
            if ( sel ~= -1 ) then 
                setPlayerSep(getPlayerFromName(text)) 
            else 
                show("الرجاء اختيار الاعب") 
            end 
        elseif ( source == GUIEditor_Button[1] ) then 
            if ( sel ~= -1 ) then 
                triggerServerEvent("killPlayer",localPlayer,text) 
            else 
                show("الرجاء اختيار الاعب") 
            end 
        elseif ( source == GUIEditor_Button[3] ) then 
            if ( sel ~= -1 ) then 
                local player = getPlayerFromName(text) 
                if isPedInVehicle(player) then 
                    triggerServerEvent("onDes",localPlayer,text) 
                else 
                    show("الاعب لا يملك مركبه") 
                end 
            else 
                show("الرجاء اختيار الاعب") 
            end 
        elseif ( source == GUIEditor_Button[4] ) then 
            if ( sel ~= -1 ) then 
                local player = getPlayerFromName(text) 
                if isPedInVehicle(player) then 
                    triggerServerEvent("onBlow",localPlayer,text) 
                else 
                    show("الاعب لا يملك مركبه") 
                end 
            else 
                show("الرجاء اختيار الاعب") 
            end 
        end 
    end 
) 
  
addEventHandler("onClientGUIClick",root, 
    function () 
        if ( source == grid ) then 
            local sel = guiGridListGetSelectedItem(grid) 
            local text = guiGridListGetItemText(grid,sel,1) 
            local player = getPlayerFromName(text) 
            if ( player ) then 
                guiSetText(GUIEditor_Label[1],"Name: " .. getPlayerName(player)) 
                guiSetText(GUIEditor_Label[2],"Money: " .. getPlayerMoney(player) .. "$") 
                guiSetText(GUIEditor_Label[3],"Ping: " .. getPlayerPing(player)) 
                guiSetText(GUIEditor_Label[4],"Health: " .. math.ceil(getElementHealth(player)) .. "%") 
                guiSetText(GUIEditor_Label[5],"Armor: " .. math.ceil(getPedArmor(player)) .. "%") 
                guiSetText(GUIEditor_Label[6],"Skin: " .. getElementModel(player)) 
            else 
                guiSetText(GUIEditor_Label[1],"Name: N/A") 
                guiSetText(GUIEditor_Label[2],"Money: N/A") 
                guiSetText(GUIEditor_Label[3],"Ping: N/A") 
                guiSetText(GUIEditor_Label[4],"Health: N/A") 
                guiSetText(GUIEditor_Label[5],"Armor: N/A") 
                guiSetText(GUIEditor_Label[6],"Skin: N/A") 
            end 
        end 
    end 
) 
  
  
addEventHandler("onClientGUIChanged",root, 
    function () 
        if ( source == edit ) then 
            local text = guiGetText(edit) 
            if ( text == "" ) then 
                putAllPlayersInList() 
            else 
                guiGridListClear(grid) 
                for i,v in ipairs(getElementsByType("player")) do 
                    local name = getPlayerName(v) 
                    if string.find(name,text) then 
                        local row = guiGridListAddRow(grid) 
                        guiGridListSetItemText(grid,row,1,name,false,false) 
                        guiGridListSetItemColor(grid,row,1,255,255,0) 
                    end 
                end 
            end 
        end 
    end 
) 
  

اللوحه تشتغل بس ما يمديني اطفيها او افتحها من زر

m

و ما يشتغل فيها ولا شي؟

وش الخطء

ناقصك ملف سيرفر عشان يشتغل

السيرفر موجود

بس انا حطيت الكلينت لأن المشكله فيه

Link to comment
key = "m" 
  
function centerWindow(center_window) 
    local screenW,screenH=guiGetScreenSize() 
    local windowW,windowH=guiGetSize(center_window,false) 
    local x,y = (screenW-windowW)/2,(screenH-windowH)/2 
    guiSetPosition(center_window,x,y,false) 
end 
  
GUIEditor_Button = {} 
GUIEditor_Label = {} 
  
        wnd = guiCreateWindow(565, 229, 459, 514, "Police Panel |By REDBULL", false) 
        guiWindowSetMovable(wnd, false) 
        guiWindowSetSizable(wnd, false) 
        centerWindow(wnd) 
        guiSetAlpha(wnd, 1.00) 
        guiSetProperty(wnd, "CaptionColour", "FFFF0000") 
        grid = guiCreateGridList(9, 23, 216, 338, false, wnd) 
        guiGridListSetSelectionMode(grid,1) 
        guiGridListAddColumn(grid, "الاعبين", 0.9) 
        edit = guiCreateEdit(15, 361, 206, 36, "", false, wnd)     
        GUIEditor_Button[1] = guiCreateButton(329, 33, 120, 47, "قتل الاعب", false, wnd) 
        GUIEditor_Button[2] = guiCreateButton(235, 90, 131, 47, "مراقبه الاعب", false, wnd) 
        GUIEditor_Button[3] = guiCreateButton(334, 147, 115, 47, "سحب سيارة الاعب", false, wnd) 
        GUIEditor_Button[4] = guiCreateButton(235, 204, 131, 47, "تفجير سيارة الاعب", false, wnd) 
        GUIEditor.label[1] = guiCreateLabel(248, 275, 113, 28, "Name", false, wnd) 
        GUIEditor.label[2] = guiCreateLabel(248, 319, 113, 28, "Money", false, wnd) 
        GUIEditor.label[3] = guiCreateLabel(248, 357, 113, 28, "Ping", false, wnd) 
        GUIEditor.label[4] = guiCreateLabel(248, 395, 113, 28, "Health", false, wnd) 
        GUIEditor.label[5] = guiCreateLabel(248, 433, 113, 28, "Armor", false, wnd) 
        GUIEditor_Button[5] = guiCreateButton(9, 451, 118, 46, "خروج", false, wnd) 
        guiSetFont(GUIEditor_Button[5],"default-bold-small") 
        GUIEditor.label[6] = guiCreateLabel(248, 461, 117, 28, "Skin", false, wnd)     
guiSetVisible(wnd,false) 
  
for i,btn in ipairs(GUIEditor_Button) do 
    guiSetFont(btn,"default-bold-small") 
    guiSetProperty(btn,"NormalTextColour","ffff0000") 
end 
  
for i,lal in ipairs(GUIEditor_Label) do 
    guiSetFont(lal,"default-bold-small") 
    guiLabelSetColor(lal,255,255,0) 
end 
  
function open() 
    triggerServerEvent("isPolice",localPlayer) 
end 
bindKey(key,"down",open) 
  
  
addEvent("Yes",true) 
addEventHandler("Yes",root, 
    function () 
        if guiGetVisible(wnd) then 
            guiSetVisible(wnd,false) 
            showCursor(false) 
            guiSetInputEnabled(false) 
        else 
            guiSetVisible(wnd,true) 
            showCursor(true) 
            guiSetInputEnabled(true) 
            putAllPlayersInList() 
        end 
    end 
) 
  
function putAllPlayersInList() 
    guiGridListClear(grid) 
    for i,v in ipairs(getElementsByType("player")) do 
        local row = guiGridListAddRow(grid) 
        guiGridListSetItemText(grid,row,1,getPlayerName(v),false,false) 
        guiGridListSetItemColor(grid,row,1,0,255,0) 
    end 
end 
  
  
addEventHandler("onClientGUIClick",root, 
    function () 
        if ( source == GUIEditor_Button[5] ) then 
            guiSetVisible(wnd,false) 
            showCursor(false) 
            guiSetInputEnabled(false) 
        end 
    end 
) 
  
function setPlayerSep(player) 
    setCameraTarget(player) 
    x,y = guiGetScreenSize() 
    endkey = guiCreateButton(0.1,0.4,0.1,0.15,"End",true) 
    addEventHandler("onClientGUIClick",endkey,onEndSep,false) 
end 
  
function onEndSep() 
    destroyElement(endkey) 
    setCameraTarget(localPlayer) 
end 
  
function show(msg) 
    exports.msgbox:guiShowMessageBox(msg,"error","Error",false,"OK") 
end 
  
addEventHandler("onClientGUIClick",root, 
    function () 
        local sel = guiGridListGetSelectedItem(grid) 
        local text = guiGridListGetItemText(grid,sel,1) 
        if ( source == GUIEditor_Button[2] ) then 
            if ( sel ~= -1 ) then 
                setPlayerSep(getPlayerFromName(text)) 
            else 
                show("الرجاء اختيار الاعب") 
            end 
        elseif ( source == GUIEditor_Button[1] ) then 
            if ( sel ~= -1 ) then 
                triggerServerEvent("killPlayer",localPlayer,text) 
            else 
                show("الرجاء اختيار الاعب") 
            end 
        elseif ( source == GUIEditor_Button[3] ) then 
            if ( sel ~= -1 ) then 
                local player = getPlayerFromName(text) 
                if isPedInVehicle(player) then 
                    triggerServerEvent("onDes",localPlayer,text) 
                else 
                    show("الاعب لا يملك مركبه") 
                end 
            else 
                show("الرجاء اختيار الاعب") 
            end 
        elseif ( source == GUIEditor_Button[4] ) then 
            if ( sel ~= -1 ) then 
                local player = getPlayerFromName(text) 
                if isPedInVehicle(player) then 
                    triggerServerEvent("onBlow",localPlayer,text) 
                else 
                    show("الاعب لا يملك مركبه") 
                end 
            else 
                show("الرجاء اختيار الاعب") 
            end 
        end 
    end 
) 
  
addEventHandler("onClientGUIClick",root, 
    function () 
        if ( source == grid ) then 
            local sel = guiGridListGetSelectedItem(grid) 
            local text = guiGridListGetItemText(grid,sel,1) 
            local player = getPlayerFromName(text) 
            if ( player ) then 
                guiSetText(GUIEditor_Label[1],"Name: " .. getPlayerName(player)) 
                guiSetText(GUIEditor_Label[2],"Money: " .. getPlayerMoney(player) .. "$") 
                guiSetText(GUIEditor_Label[3],"Ping: " .. getPlayerPing(player)) 
                guiSetText(GUIEditor_Label[4],"Health: " .. math.ceil(getElementHealth(player)) .. "%") 
                guiSetText(GUIEditor_Label[5],"Armor: " .. math.ceil(getPedArmor(player)) .. "%") 
                guiSetText(GUIEditor_Label[6],"Skin: " .. getElementModel(player)) 
            else 
                guiSetText(GUIEditor_Label[1],"Name: N/A") 
                guiSetText(GUIEditor_Label[2],"Money: N/A") 
                guiSetText(GUIEditor_Label[3],"Ping: N/A") 
                guiSetText(GUIEditor_Label[4],"Health: N/A") 
                guiSetText(GUIEditor_Label[5],"Armor: N/A") 
                guiSetText(GUIEditor_Label[6],"Skin: N/A") 
            end 
        end 
    end 
) 
  
  
addEventHandler("onClientGUIChanged",root, 
    function () 
        if ( source == edit ) then 
            local text = guiGetText(edit) 
            if ( text == "" ) then 
                putAllPlayersInList() 
            else 
                guiGridListClear(grid) 
                for i,v in ipairs(getElementsByType("player")) do 
                    local name = getPlayerName(v) 
                    if string.find(name,text) then 
                        local row = guiGridListAddRow(grid) 
                        guiGridListSetItemText(grid,row,1,name,false,false) 
                        guiGridListSetItemColor(grid,row,1,255,255,0) 
                    end 
                end 
            end 
        end 
    end 
) 
  

اللوحه تشتغل بس ما يمديني اطفيها او افتحها من زر

m

و ما يشتغل فيها ولا شي؟

وش الخطء

ناقصك ملف سيرفر عشان يشتغل

السيرفر موجود

بس انا حطيت الكلينت لأن المشكله فيه

وجرب Police ادخل تيم

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...