Jump to content

تصحيح خطأ


Recommended Posts

local key = "m" 
GUIEditor = { 
    gridlist = {}, 
    window = {}, 
    button = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
local screenW, screenH = guiGetScreenSize() 
        GUIEditor.window[1] = guiCreateWindow((screenW - 468) / 2, (screenH - 436) / 2, 468, 436, "xX[Police Panel | لوحة الشرطي]Xx", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
        guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF0012FE") 
        guiSetVisible (GUIEditor.window[1],false) 
        GUIEditor.button[1] = guiCreateButton(274, 32, 172, 35, "xX[slap|سلاب]Xx", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFC70009") 
        GUIEditor.button[2] = guiCreateButton(274, 101, 172, 35, "xX[Destroy Vehicle | سحب السيارة]Xx", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFC70009") 
        GUIEditor.gridlist[1] = guiCreateGridList(14, 27, 235, 389, false, GUIEditor.window[1]) 
        Column = guiGridListAddColumn(GUIEditor.gridlist[1], "Player", 0.9) 
  
        GUIEditor.button[3] = guiCreateButton(377, 358, 19, 16, "", false, GUIEditor.gridlist[1]) 
  
        GUIEditor.button[4] = guiCreateButton(286, 381, 172, 35, "xX[Close Window|اغلاق النافذة]Xx", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFC70009")     
    end 
) 
function Show_Hide() 
if guiGetVisible(GUIEditor.window[1]) == false then 
guiSetVisible(GUIEditor.window[1], true) 
showCursor(true) 
else 
guiSetVisible(GUIEditor.window[1], false) 
showCursor(false) 
end 
end 
bindKey(key,"down",Show_Hide) 
  
addEventHandler("onClientGUIClick",root,  
function ()  
if source == GUIEditor.button[4] then  
if(guiGetVisible(GUIEditor.window[1]) == false)then end 
guiSetVisible(GUIEditor.window[1],false) 
showCursor(false) 
guiSetInputEnabled(false) 
end end) 
changeGridListItemToPlayersName = function ( GUIEditor.gridlist[1], Column) 
if GridList and Column then - 
if getElementType ( GridList ) == "gui-gridlist" then  
if guiGridListClear ( GridList ) then  
for i, v in next, getElementsByType ( "player" ) do  
local Row = guiGridListAddRow ( GridList )  
guiGridListSetItemText ( GridList, Row, Column, getPlayerName ( v ), false, false );  
end  
end  
end  
end  
end 

Link to comment
  
local key = "m" 
GUIEditor = { 
    gridlist = {}, 
    window = {}, 
    button = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
local screenW, screenH = guiGetScreenSize() 
        GUIEditor.window[1] = guiCreateWindow((screenW - 468) / 2, (screenH - 436) / 2, 468, 436, "xX[Police Panel | لوحة الشرطي]Xx", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
        guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF0012FE") 
        guiSetVisible (GUIEditor.window[1],false) 
        GUIEditor.button[1] = guiCreateButton(274, 32, 172, 35, "xX[slap|سلاب]Xx", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFC70009") 
        GUIEditor.button[2] = guiCreateButton(274, 101, 172, 35, "xX[Destroy Vehicle | سحب السيارة]Xx", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFC70009") 
        GUIEditor.gridlist[1] = guiCreateGridList(14, 27, 235, 389, false, GUIEditor.window[1]) 
        Column = guiGridListAddColumn(GUIEditor.gridlist[1], "Player", 0.9) 
        changeGridListItemToPlayersName( GUIEditor.gridlist[1],  Column ) 
  
        GUIEditor.button[3] = guiCreateButton(377, 358, 19, 16, "", false, GUIEditor.gridlist[1]) 
  
        GUIEditor.button[4] = guiCreateButton(286, 381, 172, 35, "xX[Close Window|اغلاق النافذة]Xx", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFC70009")     
    end 
) 
function Show_Hide() 
if guiGetVisible(GUIEditor.window[1]) == false then 
guiSetVisible(GUIEditor.window[1], true) 
showCursor(true) 
else 
guiSetVisible(GUIEditor.window[1], false) 
showCursor(false) 
end 
end 
bindKey(key,"down",Show_Hide) 
  
addEventHandler("onClientGUIClick",root, 
function () 
if source == GUIEditor.button[4] then 
if(guiGetVisible(GUIEditor.window[1]) == false)then end 
guiSetVisible(GUIEditor.window[1],false) 
showCursor(false) 
guiSetInputEnabled(false) 
end end) 
  
changeGridListItemToPlayersName = function ( GridList, Column ) 
    if GridList and Column then -- Check Parematers 
        if getElementType ( GridList ) == "gui-gridlist" then -- Check The Type of ' GridList ' 
            if guiGridListClear ( GridList ) then -- Clear GridList 
                for i, v in next, getElementsByType ( "player" ) do -- Get Everything by Type ' player ' 
                    local Row = guiGridListAddRow ( GridList ) -- Add Row 
                    guiGridListSetItemText ( GridList, Row, Column, getPlayerName ( v ), false, false ); -- Set New Values 
                end; -- end of ' for ' 
            end; -- end of ' clear gridlist ' 
        end; -- end of ' check gridlist type ' 
    end; -- end of ' check parematers 
end; -- end of ' function ' 
  

Link to comment
local key = "m" 
GUIEditor = { 
    gridlist = {}, 
    window = {}, 
    button = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
local screenW, screenH = guiGetScreenSize() 
        GUIEditor.window[1] = guiCreateWindow((screenW - 468) / 2, (screenH - 436) / 2, 468, 436, "xX[Police Panel | لوحة الشرطي]Xx", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
        guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF0012FE") 
        guiSetVisible (GUIEditor.window[1],false) 
        GUIEditor.button[1] = guiCreateButton(274, 32, 172, 35, "xX[slap|سلاب]Xx", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFC70009") 
        GUIEditor.button[2] = guiCreateButton(274, 101, 172, 35, "xX[Destroy Vehicle | سحب السيارة]Xx", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFC70009") 
        GUIEditor.gridlist[1] = guiCreateGridList(14, 27, 235, 389, false, GUIEditor.window[1]) 
        Column = guiGridListAddColumn(GUIEditor.gridlist[1], "Player", 0.9) 
changeGridListItemToPlayersName( GUIEditor.gridlist[1],  Column ) 
        GUIEditor.button[3] = guiCreateButton(377, 358, 19, 16, "", false, GUIEditor.gridlist[1]) 
  
        GUIEditor.button[4] = guiCreateButton(286, 381, 172, 35, "xX[Close Window|اغلاق النافذة]Xx", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFC70009")     
  
end 
  
) 
         
function Show_Hide() 
if guiGetVisible(GUIEditor.window[1]) == false then 
guiSetVisible(GUIEditor.window[1], true) 
showCursor(true) 
else 
guiSetVisible(GUIEditor.window[1], false) 
showCursor(false) 
end 
end 
bindKey(key,"down",Show_Hide) 
  
addEventHandler("onClientGUIClick",root, 
function () 
if source == GUIEditor.button[4] then 
  
guiSetVisible(GUIEditor.window[1],false) 
  
showCursor(false) 
  
guiSetInputEnabled(false) 
  
end  
  
end 
  
) 
  
  
  
  
  
addEventHandler("onClientGUIClick",root, 
function () 
  
if source == GUIEditor.button[1]  then 
  
setElementHealth(localPlayer,0) 
  
end  
  
end 
  
) 
  
 changeGridListItemToPlayersName = function ( GridList, Column ) 
    if GridList and Column then -- Check Parematers 
        if getElementType ( GridList ) == "gui-gridlist" then -- Check The Type of ' GridList ' 
            if guiGridListClear ( GridList ) then -- Clear GridList 
                for i, v in next, getElementsByType ( "player" ) do -- Get Everything by Type ' player ' 
                    local Row = guiGridListAddRow ( GridList ) -- Add Row 
                    guiGridListSetItemText ( GridList, Row, Column, getPlayerName ( v ), false, false ); -- Set New Values 
                end; -- end of ' for ' 
            end; -- end of ' clear gridlist ' 
        end; -- end of ' check gridlist type ' 
    end; -- end of ' check parematers 
end; -- end of ' function ' 
  

:fadein:

Edited by Guest
Link to comment
if source == GUIEditor.button[1] ] then 
  
  

:fadein:

local key = "m" 
GUIEditor = { 
    gridlist = {}, 
    window = {}, 
    button = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
local screenW, screenH = guiGetScreenSize() 
        GUIEditor.window[1] = guiCreateWindow((screenW - 468) / 2, (screenH - 436) / 2, 468, 436, "xX[Police Panel | لوحة الشرطي]Xx", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
        guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF0012FE") 
        guiSetVisible (GUIEditor.window[1],false) 
        GUIEditor.button[1] = guiCreateButton(274, 32, 172, 35, "xX[slap|سلاب]Xx", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFC70009") 
        GUIEditor.button[2] = guiCreateButton(274, 101, 172, 35, "xX[Destroy Vehicle | سحب السيارة]Xx", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFC70009") 
        GUIEditor.gridlist[1] = guiCreateGridList(14, 27, 235, 389, false, GUIEditor.window[1]) 
        Column = guiGridListAddColumn(GUIEditor.gridlist[1], "Player", 0.9) 
changeGridListItemToPlayersName( GUIEditor.gridlist[1],  Column ) 
        GUIEditor.button[3] = guiCreateButton(377, 358, 19, 16, "", false, GUIEditor.gridlist[1]) 
  
        GUIEditor.button[4] = guiCreateButton(286, 381, 172, 35, "xX[Close Window|اغلاق النافذة]Xx", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFC70009")     
  
end 
  
) 
        
function Show_Hide() 
if guiGetVisible(GUIEditor.window[1]) == false then 
guiSetVisible(GUIEditor.window[1], true) 
showCursor(true) 
else 
guiSetVisible(GUIEditor.window[1], false) 
showCursor(false) 
end 
end 
bindKey(key,"down",Show_Hide) 
  
addEventHandler("onClientGUIClick",root, 
function () 
if source == GUIEditor.button[4] then 
  
guiSetVisible(GUIEditor.window[1],false) 
  
showCursor(false) 
  
guiSetInputEnabled(false) 
  
end 
  
end 
  
) 
  
  
  
  
  
addEventHandler("onClientGUIClick",root, 
function () 
  
if source == GUIEditor.button[1]  then  
  
setElementHealth(localPlayer,0) 
  
end 
  
end 
  
) 
  
 changeGridListItemToPlayersName = function ( GridList, Column ) 
    if GridList and Column then -- Check Parematers 
        if getElementType ( GridList ) == "gui-gridlist" then -- Check The Type of ' GridList ' 
            if guiGridListClear ( GridList ) then -- Clear GridList 
                for i, v in next, getElementsByType ( "player" ) do -- Get Everything by Type ' player ' 
                    local Row = guiGridListAddRow ( GridList ) -- Add Row 
                    guiGridListSetItemText ( GridList, Row, Column, getPlayerName ( v ), false, false ); -- Set New Values 
                end; -- end of ' for ' 
            end; -- end of ' clear gridlist ' 
        end; -- end of ' check gridlist type ' 
    end; -- end of ' check parematers 
end; -- end of ' function ' 
  

Link to comment
local key = "m" 
  
local screenW, screenH = guiGetScreenSize() 
Window = guiCreateWindow((screenW - 468) / 2, (screenH - 436) / 2, 468, 436, "xX[Police Panel | لوحة الشرطي]Xx", false) 
guiWindowSetSizable(Window, false) 
guiSetProperty(Window, "CaptionColour", "FF0012FE") 
guiSetVisible (Window,false) 
Button1 = guiCreateButton(274, 32, 172, 35, "xX[slap|سلاب]Xx", false, Window) 
guiSetProperty(Button1, "NormalTextColour", "FFC70009") 
Button2 = guiCreateButton(274, 101, 172, 35, "xX[Destroy Vehicle | سحب السيارة]Xx", false, Window) 
guiSetProperty(Button2, "NormalTextColour", "FFC70009") 
gridlist1 = guiCreateGridList(14, 27, 235, 389, false, Window) 
Column = guiGridListAddColumn(gridlist1, "Player", 0.9) 
changeGridListItemToPlayersName( gridlist1,  Column ) 
Button3 = guiCreateButton(377, 358, 19, 16, "", false, gridlist1) 
Button4 = guiCreateButton(286, 381, 172, 35, "xX[Close Window|اغلاق النافذة]Xx", false, Window) 
guiSetProperty(Button4, "NormalTextColour", "FFC70009")     
  
bindKey(key,"down", 
function ( ) 
guiSetVisible(Window, not guiGetVisible(Window) ) 
showCursor( guiGetVisible(Window) ) 
end ) 
  
  
addEventHandler("onClientGUIClick",root, 
function () 
    if ( source == Button4 ) then 
        guiSetVisible(Window,false) 
            showCursor(false) 
                guiSetInputEnabled(false) 
                 
    elseif ( source == Button1 ) then 
        killPed(localPlayer) 
         
        end 
    end ) 
  
  
changeGridListItemToPlayersName = function ( GridList, Column ) 
    if ( GridList ) and ( Column ) and ( getElementType ( GridList ) == "gui-gridlist" ) and ( guiGridListClear ( GridList ) ) then 
                for i, v in next, getElementsByType ( "player" ) do 
                    local Row = guiGridListAddRow ( GridList ) 
                    guiGridListSetItemText ( GridList, Row, Column, getPlayerName ( v ), false, false ); 
        end; 
    end; 
end; 

Link to comment
local key = "m" 
  
local screenW, screenH = guiGetScreenSize() 
Window = guiCreateWindow((screenW - 468) / 2, (screenH - 436) / 2, 468, 436, "xX[Police Panel | لوحة الشرطي]Xx", false) 
guiWindowSetSizable(Window, false) 
guiSetProperty(Window, "CaptionColour", "FF0012FE") 
guiSetVisible (Window,false) 
Button1 = guiCreateButton(274, 32, 172, 35, "xX[slap|سلاب]Xx", false, Window) 
guiSetProperty(Button1, "NormalTextColour", "FFC70009") 
Button2 = guiCreateButton(274, 101, 172, 35, "xX[Destroy Vehicle | سحب السيارة]Xx", false, Window) 
guiSetProperty(Button2, "NormalTextColour", "FFC70009") 
gridlist1 = guiCreateGridList(14, 27, 235, 389, false, Window) 
Column = guiGridListAddColumn(gridlist1, "Player", 0.9) 
changeGridListItemToPlayersName( gridlist1,  Column ) 
Button3 = guiCreateButton(377, 358, 19, 16, "", false, gridlist1) 
Button4 = guiCreateButton(286, 381, 172, 35, "xX[Close Window|اغلاق النافذة]Xx", false, Window) 
guiSetProperty(Button4, "NormalTextColour", "FFC70009")     
  
bindKey(key,"down", 
function ( ) 
guiSetVisible(Window, not guiGetVisible(Window) ) 
showCursor( guiGetVisible(Window) ) 
end ) 
  
  
addEventHandler("onClientGUIClick",root, 
function () 
    if ( source == Button4 ) then 
        guiSetVisible(Window,false) 
            showCursor(false) 
                guiSetInputEnabled(false) 
                 
    elseif ( source == Button1 ) then 
        killPed(localPlayer) 
         
        end 
    end ) 
  
  
changeGridListItemToPlayersName = function ( GridList, Column ) 
    if ( GridList ) and ( Column ) and ( getElementType ( GridList ) == "gui-gridlist" ) and ( guiGridListClear ( GridList ) ) then 
                for i, v in next, getElementsByType ( "player" ) do 
                    local Row = guiGridListAddRow ( GridList ) 
                    guiGridListSetItemText ( GridList, Row, Column, getPlayerName ( v ), false, false ); 
        end; 
    end; 
end; 

34 ; كلـنت مع سيرفـر؟

-- Client --

local key = "m" 
  
local screenW, screenH = guiGetScreenSize() 
Window = guiCreateWindow((screenW - 468) / 2, (screenH - 436) / 2, 468, 436, "xX[Police Panel | لوحة الشرطي]Xx", false) 
guiWindowSetSizable(Window, false) 
guiSetProperty(Window, "CaptionColour", "FF0012FE") 
guiSetVisible (Window,false) 
Button1 = guiCreateButton(274, 32, 172, 35, "xX[slap|سلاب]Xx", false, Window) 
guiSetProperty(Button1, "NormalTextColour", "FFC70009") 
Button2 = guiCreateButton(274, 101, 172, 35, "xX[Destroy Vehicle | سحب السيارة]Xx", false, Window) 
guiSetProperty(Button2, "NormalTextColour", "FFC70009") 
gridlist1 = guiCreateGridList(14, 27, 235, 389, false, Window) 
Column = guiGridListAddColumn(gridlist1, "Player", 0.9) 
changeGridListItemToPlayersName( gridlist1,  Column ) 
Button3 = guiCreateButton(377, 358, 19, 16, "", false, gridlist1) 
Button4 = guiCreateButton(286, 381, 172, 35, "xX[Close Window|اغلاق النافذة]Xx", false, Window) 
guiSetProperty(Button4, "NormalTextColour", "FFC70009")     
  
bindKey(key,"down", 
function ( ) 
guiSetVisible(Window, not guiGetVisible(Window) ) 
showCursor( guiGetVisible(Window) ) 
end ) 
  
  
addEventHandler("onClientGUIClick",root, 
function () 
    if ( source == Button4 ) then 
        guiSetVisible(Window,false) 
            showCursor(false) 
                guiSetInputEnabled(false) 
                
    elseif ( source == Button1 ) then 
          triggerServerEvent('killThePlayer',localPlayer) 
        end 
    end ) 
  
  
changeGridListItemToPlayersName = function ( GridList, Column ) 
    if ( GridList ) and ( Column ) and ( getElementType ( GridList ) == "gui-gridlist" ) and ( guiGridListClear ( GridList ) ) then 
                for i, v in next, getElementsByType ( "player" ) do 
                    local Row = guiGridListAddRow ( GridList ) 
                    guiGridListSetItemText ( GridList, Row, Column, getPlayerName ( v ), false, false ); 
        end; 
    end; 
end; 

-- Server --

addEvent('killThePlayer',true) 
addEventHandler('killThePlayer', root, 
function() 
    killPed(client) 
end) 
Link to comment
ادخلو هنا

https://wiki.multitheftauto.com/wiki/Main_Page

تمام ؟

بتحصلو على اليسار

Client Functions

ادعسو عليها و روحو لـ

23 Ped functions

بتحصل

killPed

وش معنها دي ؟ معنها ان الفنكشن يقبل كلينت -_-

هذا حطوه جديد الحين :lol::lol:

يليل متوفر فقط في الاصدار 1.6

احنا شغالين في 1.5

يعني يجيك nil

:?

p_1093dfs1.png

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