Jump to content

طلب كود.


Recommended Posts

Posted
واخيراً ^^
  
-- ضيف ذذ لوب 
JP = { 
    {"1",'minutes',60000}, 
    {"2",'mintes',120000}, 
    {"3",'mintes',180000}, 
    {"5",'mintes',3000000}, 
    {"10",'mintes',600000}, 
    {"15",'mintes',900000}, 
    {"20",'mintes',1200000}, 
    {"30",'mintes',1800000}, 
    {"40",'mintes',2400000}, 
    {"1",'hours',3600000}, 
    {"2",'hours',7200000}, 
    {"3",'hours',10800000}, 
    {"4",'hours',14400000}, 
    {"5",'hours',18000000}, 
    {"24",'hours',86400000} 
    } 
  
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; 
  
GUIEditor = { 
    button = {} 
} 
        wnd = guiCreateWindow(121, 135, 525, 333, "#", false) 
        guiWindowSetSizable(wnd, false) 
  
        grid = guiCreateGridList(12, 55, 227, 268, false, wnd) 
        col1 = guiGridListAddColumn(grid, "ID", 0.5) 
        col2 = guiGridListAddColumn(grid, "Time", 0.5) 
        grid2 = guiCreateGridList(259, 55, 227, 268, false, wnd) 
        col3 = guiGridListAddColumn(grid2, "Name", 0.9) 
        changeGridListItemToPlayersName ( grid2, col3) 
        GUIEditor.button[1] = guiCreateButton(116, 26, 238, 24, "Jail", false, wnd) 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA")     
  
  
  
  
  
  
    guiSetVisible (wnd, false)   
function OpenWin() 
    if guiGetVisible ( wnd ) then 
       guiSetVisible ( wnd, false ) 
       showCursor(false) 
       guiSetInputEnabled(false) 
    else 
        guiSetVisible ( wnd, true ) 
        showCursor(true) 
        guiSetInputEnabled(true) 
  
    end 
end 
bindKey("m", "down", OpenWin) 
  
  
for _, v in ipairs (JP) do 
local Row = guiGridListAddRow(grid) 
guiGridListSetItemText(grid, Row, 1, v[1], false, false) 
guiGridListSetItemText(grid, Row, 2, v[2], false, false) 
guiGridListSetItemData(grid, Row,1, v[3], false, false) 
end 
  
addEventHandler("onClientGUIClick", GUIEditor.button[1],   
function ( ) 
local sel = guiGridListGetSelectedItem(grid) 
local sel2 = guiGridListGetSelectedItem(grid2) 
local Jail = unpack(guiGridListGetItemData ( grid,sel,1 )) 
local Mk = setElementPosition ( 2122.21818, 53121, 10.5141 ) 
setElementPosition ( 2122.21338, 2243.54175, 10.67188 ) 
if  sel ~= -1 and sel2 ~= -1 and  getElementType(player) == "player"  then 
setTimer ( Jail , Mk ) 
end 
end) 
  

اتمنى تكون انك فاهم كل شيء ^^

انشالله بتستفيد

يا اخى من وين تفهم انت ؟

انا ناسخ الكود بظبط و ما ظبط

و اقولك ابى توضيح للخطأ و تصليحه

تجيبلى نفس الكود الانا ابى توضيحه و تصليحه ؟؟

#Skype :mohamed.abdelmaksoud66

#WhatsApp : 01111231094

#Channel : https://www.youtube.com/channel/UCwb3GX2bhIA68JeCTPrBdWQ

#[M.S] Server : Role Play Soon | حياة واقعية قريبا.

#[M.S] Programmed By : mIDO

#[M.N] Server : Hajwalh Soon | هجوله قريبا.

#[M.N] Programmed By : mIDO

يمكن افتتاح السيرفرين يكون فى الاجازة الكبيرة xD

n-560x95_006EB8_000000_000000_AD0000.png

  • Replies 68
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

# Client

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; 
  
GUIEditor = { 
    button = {} 
} 
        wnd = guiCreateWindow(121, 135, 525, 333, "#", false) 
        guiWindowSetSizable(wnd, false) 
        guiSetVisible ( wnd , false ) 
        grid = guiCreateGridList(12, 55, 227, 268, false, wnd) 
        grid2 = guiCreateGridList(259, 55, 227, 268, false, wnd) 
        col3 = guiGridListAddColumn(grid, "Name", 0.9) 
        changeGridListItemToPlayersName ( grid, col3) 
        guiGridListAddColumn(grid2, "Time", 0.9) 
        GUIEditor.button[1] = guiCreateButton(116, 26, 238, 24, "Jail", false, wnd) 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA")     
  
  
  
function OpenWin(   ) 
  
guiSetVisible ( wnd , not guiGetVisible ( wnd ) )  
  
showCursor ( not isCursorShowing (  ) ) 
  
end 
bindKey ( "m", "down", OpenWin ) 
  
JP = { 
  
{ "1 Min",60000 }, 
{ "2 Min", 120000 }, 
  
} 
  
  
for k , v in ipairs ( JP ) do 
  
local Row = guiGridListAddRow ( grid2 ) 
  
guiGridListSetItemText ( grid2 ,Row , 1, v[1] , false , false ); 
  
guiGridListSetItemData ( grid2 , Row , 1, v[2] ) 
  
end 
  
addEventHandler("onClientGUIClick", GUIEditor.button[1],   
  
    function ( ) 
  
    local Sel = guiGridListGetSelectedItem ( grid ) 
  
    local Sel2 = guiGridListGetSelectedItem ( grid2 ) 
  
    if  Sel ~= -1 and  Sel2 ~= -1 then 
  
    local Player = guiGridListGetItemText ( grid, Sel, 1 ) 
  
    local Jail = guiGridListGetItemData ( grid2 , Sel2 , 1 ) 
  
    triggerServerEvent ( "Jail_Player",localPlayer,Player,Jail ) 
  
    end 
end,false 
    ) ; 

# Server

table = {   } 
  
addEvent("Jail_Player",true) 
  
addEventHandler("Jail_Player",root, 
  
    function ( Player , Time ) 
  
    local ThePlayer = getPlayerFromName ( Player ) 
  
    if isTimer ( table[ ThePlayer ] ) then return outputChatBox ("الاعب مسجون",source,255,255,255,true) end 
  
    setElementPosition ( ThePlayer , 2122.21818, 53121, 10.5141 ) 
  
    table[ ThePlayer ] = setTimer ( setElementPosition , Time , 1 , ThePlayer , 2122.21338 , 2243.54175 , 10.67188 ) 
  
end 
    ) ; 

بالتوفيق

[ Skype : kreee89 - Discord : Abdul_KariM#1326 / طلبات البرمجة

https://www.paypal.me/AbdulKariMx / اذا حاب تدعمني

Posted (edited)
  
  
JP = { 
    {"1",'minutes',60000}, 
    {"2",'mintes',120000}, 
    {"3",'mintes',180000}, 
    {"5",'mintes',3000000}, 
    {"10",'mintes',600000}, 
    {"15",'mintes',900000}, 
    {"20",'mintes',1200000}, 
    {"30",'mintes',1800000}, 
    {"40",'mintes',2400000}, 
    {"1",'hours',3600000}, 
    {"2",'hours',7200000}, 
    {"3",'hours',10800000}, 
    {"4",'hours',14400000}, 
    {"5",'hours',18000000}, 
    {"24",'hours',86400000} 
    } 
  
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; 
  
GUIEditor = { 
    button = {} 
} 
        wnd = guiCreateWindow(121, 135, 525, 333, "#", false) 
        guiWindowSetSizable(wnd, false) 
  
        grid = guiCreateGridList(12, 55, 227, 268, false, wnd) 
        col1 = guiGridListAddColumn(grid, "ID", 0.5) 
        col2 = guiGridListAddColumn(grid, "Time", 0.5) 
        grid2 = guiCreateGridList(259, 55, 227, 268, false, wnd) 
        col3 = guiGridListAddColumn(grid2, "Name", 0.9) 
        changeGridListItemToPlayersName ( grid2, col3) 
        GUIEditor.button[1] = guiCreateButton(116, 26, 238, 24, "Jail", false, wnd) 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA")     
  
  
  
  
  
  
    guiSetVisible (wnd, false)   
function OpenWin() 
    if guiGetVisible ( wnd ) then 
       guiSetVisible ( wnd, false ) 
       showCursor(false) 
       guiSetInputEnabled(false) 
    else 
        guiSetVisible ( wnd, true ) 
        showCursor(true) 
        guiSetInputEnabled(true) 
  
    end 
end 
bindKey("m", "down", OpenWin) 
  
  
for _, v in ipairs (JP) do 
local Row = guiGridListAddRow(grid) 
guiGridListSetItemText(grid, Row, 1, v[1], false, false) 
guiGridListSetItemText(grid, Row, 2, v[2], false, false) 
guiGridListSetItemData(grid, Row,1, v[3], false, false) 
end 
  
addEventHandler("onClientGUIClick", GUIEditor.button[1],   
function ( ) 
local sel = guiGridListGetSelectedItem(grid) 
local sel2 = guiGridListGetSelectedItem(grid2) 
local Jail = (guiGridListGetItemData ( grid,sel,1 )) 
local Player = guiGridListGetItemText ( grid, Sel, 1 ) 
setElementPosition ( 2122.21338, 2243.54175, 10.67188 ) 
if  sel ~= -1 and sel2 ~= -1 then 
setTimer ( Jail , setElementPosition ( 2122.21818, 53121, 10.5141 ) ) 
end 
end) 
  

فنكشنات بتحتاجه عشان تحفظ الجيل حق اللاعب

  
getElementPosition 
setElementPosition 
setAccountData 
getAccountData 
  

Edit "*

Edited by Guest

Experienced MTA developer for 4 years. | MTA خبرة 4 سنين في برمجة

ليس عليك اسعاد الجميع ,
ولكن عليك بإن لا تؤذي أحداً 

=========
You do not have to make everyone happy,
But you should not hurt anyone

 

Want to contact with me?

 

Discord: JustCarry#2616 (Always there)
Skype: Live:JustCarry10 (Not always)

Posted
  
  
JP = { 
    {"1",'minutes',60000}, 
    {"2",'mintes',120000}, 
    {"3",'mintes',180000}, 
    {"5",'mintes',3000000}, 
    {"10",'mintes',600000}, 
    {"15",'mintes',900000}, 
    {"20",'mintes',1200000}, 
    {"30",'mintes',1800000}, 
    {"40",'mintes',2400000}, 
    {"1",'hours',3600000}, 
    {"2",'hours',7200000}, 
    {"3",'hours',10800000}, 
    {"4",'hours',14400000}, 
    {"5",'hours',18000000}, 
    {"24",'hours',86400000} 
    } 
  
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; 
  
GUIEditor = { 
    button = {} 
} 
        wnd = guiCreateWindow(121, 135, 525, 333, "#", false) 
        guiWindowSetSizable(wnd, false) 
  
        grid = guiCreateGridList(12, 55, 227, 268, false, wnd) 
        col1 = guiGridListAddColumn(grid, "ID", 0.5) 
        col2 = guiGridListAddColumn(grid, "Time", 0.5) 
        grid2 = guiCreateGridList(259, 55, 227, 268, false, wnd) 
        col3 = guiGridListAddColumn(grid2, "Name", 0.9) 
        changeGridListItemToPlayersName ( grid2, col3) 
        GUIEditor.button[1] = guiCreateButton(116, 26, 238, 24, "Jail", false, wnd) 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA")     
  
  
  
  
  
  
    guiSetVisible (wnd, false)   
function OpenWin() 
    if guiGetVisible ( wnd ) then 
       guiSetVisible ( wnd, false ) 
       showCursor(false) 
       guiSetInputEnabled(false) 
    else 
        guiSetVisible ( wnd, true ) 
        showCursor(true) 
        guiSetInputEnabled(true) 
  
    end 
end 
bindKey("m", "down", OpenWin) 
  
  
for _, v in ipairs (JP) do 
local Row = guiGridListAddRow(grid) 
guiGridListSetItemText(grid, Row, 1, v[1], false, false) 
guiGridListSetItemText(grid, Row, 2, v[2], false, false) 
guiGridListSetItemData(grid, Row,1, v[3], false, false) 
end 
  
addEventHandler("onClientGUIClick", GUIEditor.button[1],   
function ( ) 
local sel = guiGridListGetSelectedItem(grid) 
local sel2 = guiGridListGetSelectedItem(grid2) 
local Jail = (guiGridListGetItemData ( grid,sel,1 )) 
local Player = guiGridListGetItemText ( grid, Sel, 1 ) 
setElementPosition ( 2122.21338, 2243.54175, 10.67188 ) 
if  sel ~= -1 and sel2 ~= -1 and  getElementsByType(player) == "player"  then 
setTimer ( Jail , setElementPosition ( 2122.21818, 53121, 10.5141 ) ) 
end 
end) 
  

فنكشنات بتحتاجه عشان تحفظ الجيل حق اللاعب

  
getElementPosition 
setElementPosition 
setAccountData 
getAccountData 
  

player سطر 84 من وين جبت

+ كودك فيه اخطاء

[ Skype : kreee89 - Discord : Abdul_KariM#1326 / طلبات البرمجة

https://www.paypal.me/AbdulKariMx / اذا حاب تدعمني

Posted

المشكلة ان الاثنين ماهم عارفين ايش الاكواد الي جالسين ينسخوها

شغلكم نسخ ولصق فقط ، هذا شي مارح يفيدكم

لازم تتصفح الويكي وتعرف كل فنكشن ايش الارقيومنت حقه

وايش تحط بين الفواصل

كذا رح تتعلم برمجه

اما نسخ ولصق ما بتستفيد شي

ومن رأيي مود السجن كبير عليكم شوي

سوو مودات ثانية سهله وبسيطة وتعلمكم كيف تتعاملون مع الجداول والقريد ليست

مثل لوحه انتقالات او شوب اسلحه او بقالة

موفقين

I'am Back MTA  sa World !

p_513w5ap31.jpg

Spoiler

p_581zud1f1.png

 

 

 

 

Posted

طيب انا بدى الكود الصحيح ممكن ؟

#Skype :mohamed.abdelmaksoud66

#WhatsApp : 01111231094

#Channel : https://www.youtube.com/channel/UCwb3GX2bhIA68JeCTPrBdWQ

#[M.S] Server : Role Play Soon | حياة واقعية قريبا.

#[M.S] Programmed By : mIDO

#[M.N] Server : Hajwalh Soon | هجوله قريبا.

#[M.N] Programmed By : mIDO

يمكن افتتاح السيرفرين يكون فى الاجازة الكبيرة xD

n-560x95_006EB8_000000_000000_AD0000.png

Posted
# Client

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; 
  
GUIEditor = { 
    button = {} 
} 
        wnd = guiCreateWindow(121, 135, 525, 333, "#", false) 
        guiWindowSetSizable(wnd, false) 
        guiSetVisible ( wnd , false ) 
        grid = guiCreateGridList(12, 55, 227, 268, false, wnd) 
        grid2 = guiCreateGridList(259, 55, 227, 268, false, wnd) 
        col3 = guiGridListAddColumn(grid, "Name", 0.9) 
        changeGridListItemToPlayersName ( grid, col3) 
        guiGridListAddColumn(grid2, "Time", 0.9) 
        GUIEditor.button[1] = guiCreateButton(116, 26, 238, 24, "Jail", false, wnd) 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA")     
  
  
  
function OpenWin(   ) 
  
guiSetVisible ( wnd , not guiGetVisible ( wnd ) )  
  
showCursor ( not isCursorShowing (  ) ) 
  
end 
bindKey ( "m", "down", OpenWin ) 
  
JP = { 
  
{ "1 Min",60000 }, 
{ "2 Min", 120000 }, 
  
} 
  
  
for k , v in ipairs ( JP ) do 
  
local Row = guiGridListAddRow ( grid2 ) 
  
guiGridListSetItemText ( grid2 ,Row , 1, v[1] , false , false ); 
  
guiGridListSetItemData ( grid2 , Row , 1, v[2] ) 
  
end 
  
addEventHandler("onClientGUIClick", GUIEditor.button[1],   
  
    function ( ) 
  
    local Sel = guiGridListGetSelectedItem ( grid ) 
  
    local Sel2 = guiGridListGetSelectedItem ( grid2 ) 
  
    if  Sel ~= -1 and  Sel2 ~= -1 then 
  
    local Player = guiGridListGetItemText ( grid, Sel, 1 ) 
  
    local Jail = guiGridListGetItemData ( grid2 , Sel2 , 1 ) 
  
    triggerServerEvent ( "Jail_Player",localPlayer,Player,Jail ) 
  
    end 
end,false 
    ) ; 

# Server

table = {   } 
  
addEvent("Jail_Player",true) 
  
addEventHandler("Jail_Player",root, 
  
    function ( Player , Time ) 
  
    local ThePlayer = getPlayerFromName ( Player ) 
  
    if isTimer ( table[ ThePlayer ] ) then return outputChatBox ("الاعب مسجون",source,255,255,255,true) end 
  
    setElementPosition ( ThePlayer , 2122.21818, 53121, 10.5141 ) 
  
    table[ ThePlayer ] = setTimer ( setElementPosition , Time , 1 , ThePlayer , 2122.21338 , 2243.54175 , 10.67188 ) 
  
end 
    ) ; 

بالتوفيق

[ Skype : kreee89 - Discord : Abdul_KariM#1326 / طلبات البرمجة

https://www.paypal.me/AbdulKariMx / اذا حاب تدعمني

Posted

شو المشكله طيب؟

ما تظهر الوقت في القري لست

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; 
  
  
GUIEditor = { 
    gridlist = {}, 
    button = {}, 
    label = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        wnd = guiCreateWindow(121, 88, 567, 414, ":: Jail Systeam ::", false) 
        guiWindowSetSizable(wnd, false) 
        guiSetVisible(wnd ,false) 
        GUIEditor.button[1] = guiCreateButton(100, 302, 355, 35, "Jail Player", false, wnd) 
        GUIEditor.button[2] = guiCreateButton(100, 347, 355, 35, "X", false, wnd) 
        GUIEditor.label[1] = guiCreateLabel(397, 389, 164, 25, "Created By [L]e3bA | v4.3.1", false, wnd) 
        guiLabelSetColor(GUIEditor.label[1], 255, 0, 0) 
        grid2 = guiCreateGridList(291, 21, 242, 271, false, wnd) 
        guiGridListAddColumn(grid2, "Time", 0.9) 
        grid = guiCreateGridList(9, 21, 278, 271, false, wnd) 
        col3 = guiGridListAddColumn(grid, "Name", 0.9)     
    end 
) 
  
  
function OpenWin(   ) 
  
guiSetVisible ( wnd , not guiGetVisible ( wnd ) ) 
  
showCursor ( not isCursorShowing (  ) ) 
  
end 
bindKey ( "x", "down", OpenWin ) 
  
JP = { 
  
{ "1 Min",60000 }, 
{ "2 Min", 120000 }, 
{ "3 Min", 180000 }, 
{ "4 Min", 3000000 }, 
{ "5 Min", 120000 }, 
{ "6 Min", 600000 }, 
{ "6 Min", 900000 }, 
{ "6 Min", 1200000 }, 
{ "6 Min", 1800000 }, 
{ "6 Min", 2400000 }, 
  
  
} 
  
  
for k , v in ipairs ( JP ) do 
  
local Row = guiGridListAddRow ( grid2 ) 
  
guiGridListSetItemText ( grid2 ,Row , 1, v[1] , false , false ); 
  
guiGridListSetItemData ( grid2 , Row , 1, v[2] ) 
  
end 
  
addEventHandler("onClientGUIClick", GUIEditor.button[1],   
  
    function ( ) 
  
    local Sel = guiGridListGetSelectedItem ( grid ) 
  
    local Sel2 = guiGridListGetSelectedItem ( grid2 ) 
  
    if  Sel ~= -1 and  Sel2 ~= -1 then 
  
    local Player = guiGridListGetItemText ( grid,2 Sel, 1 ) 
  
    local Jail = guiGridListGetItemData ( grid2 , Sel2 , 1 ) 
  
    triggerServerEvent ( "Jail_Player",localPlayer,Player,Jail ) 
  
    end 
end,false 
    ) ; 
     
     
addEventHandler("onClientGUIClick",resourceRoot, function ( ) 
if ( source == GUIEditor.button[2] ) then 
guiSetVisible(wnd,false) 
showCursor(false) 
end 
end 
 ) 
  

سرفر

table = {   } 
  
addEvent("Jail_Player",true) 
  
addEventHandler("Jail_Player",root, 
  
    function ( Player , Time ) 
  
    local ThePlayer = getPlayerFromName ( Player ) 
  
    if isTimer ( table[ ThePlayer ] ) then return outputChatBox ("الاعب مسجون",source,255,255,255,true) end 
  
    setElementPosition ( ThePlayer , 2122.21818, 53121, 10.5141 ) 
  
    table[ ThePlayer ] = setTimer ( setElementPosition , Time , 1 , ThePlayer , 2122.21338 , 2243.54175 , 10.67188 ) 
  
end 
    ) ; 

 

قد تكونآمنيآتنآ حزينه !وآحلآمُنآ ملت طآبور آلإنتِظآر لكنهآ ،تتشبث بآلأمل فنفوسُنآ خُلقت لتقول غداً آجمل B-18.png 

Posted
شو المشكله طيب؟

ما تظهر الوقت في القري لست

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; 
  
  
GUIEditor = { 
    gridlist = {}, 
    button = {}, 
    label = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        wnd = guiCreateWindow(121, 88, 567, 414, ":: Jail Systeam ::", false) 
        guiWindowSetSizable(wnd, false) 
        guiSetVisible(wnd ,false) 
        GUIEditor.button[1] = guiCreateButton(100, 302, 355, 35, "Jail Player", false, wnd) 
        GUIEditor.button[2] = guiCreateButton(100, 347, 355, 35, "X", false, wnd) 
        GUIEditor.label[1] = guiCreateLabel(397, 389, 164, 25, "Created By [L]e3bA | v4.3.1", false, wnd) 
        guiLabelSetColor(GUIEditor.label[1], 255, 0, 0) 
        grid2 = guiCreateGridList(291, 21, 242, 271, false, wnd) 
        guiGridListAddColumn(grid2, "Time", 0.9) 
        grid = guiCreateGridList(9, 21, 278, 271, false, wnd) 
        col3 = guiGridListAddColumn(grid, "Name", 0.9)     
    end 
) 
  
  
function OpenWin(   ) 
  
guiSetVisible ( wnd , not guiGetVisible ( wnd ) ) 
  
showCursor ( not isCursorShowing (  ) ) 
  
end 
bindKey ( "x", "down", OpenWin ) 
  
JP = { 
  
{ "1 Min",60000 }, 
{ "2 Min", 120000 }, 
{ "3 Min", 180000 }, 
{ "4 Min", 3000000 }, 
{ "5 Min", 120000 }, 
{ "6 Min", 600000 }, 
{ "6 Min", 900000 }, 
{ "6 Min", 1200000 }, 
{ "6 Min", 1800000 }, 
{ "6 Min", 2400000 }, 
  
  
} 
  
  
for k , v in ipairs ( JP ) do 
  
local Row = guiGridListAddRow ( grid2 ) 
  
guiGridListSetItemText ( grid2 ,Row , 1, v[1] , false , false ); 
  
guiGridListSetItemData ( grid2 , Row , 1, v[2] ) 
  
end 
  
addEventHandler("onClientGUIClick", GUIEditor.button[1],   
  
    function ( ) 
  
    local Sel = guiGridListGetSelectedItem ( grid ) 
  
    local Sel2 = guiGridListGetSelectedItem ( grid2 ) 
  
    if  Sel ~= -1 and  Sel2 ~= -1 then 
  
    local Player = guiGridListGetItemText ( grid,2 Sel, 1 ) 
  
    local Jail = guiGridListGetItemData ( grid2 , Sel2 , 1 ) 
  
    triggerServerEvent ( "Jail_Player",localPlayer,Player,Jail ) 
  
    end 
end,false 
    ) ; 
     
     
addEventHandler("onClientGUIClick",resourceRoot, function ( ) 
if ( source == GUIEditor.button[2] ) then 
guiSetVisible(wnd,false) 
showCursor(false) 
end 
end 
 ) 
  

سرفر

table = {   } 
  
addEvent("Jail_Player",true) 
  
addEventHandler("Jail_Player",root, 
  
    function ( Player , Time ) 
  
    local ThePlayer = getPlayerFromName ( Player ) 
  
    if isTimer ( table[ ThePlayer ] ) then return outputChatBox ("الاعب مسجون",source,255,255,255,true) end 
  
    setElementPosition ( ThePlayer , 2122.21818, 53121, 10.5141 ) 
  
    table[ ThePlayer ] = setTimer ( setElementPosition , Time , 1 , ThePlayer , 2122.21338 , 2243.54175 , 10.67188 ) 
  
end 
    ) ; 

ايش الي دخلت بالموضوع ؟

[ Skype : kreee89 - Discord : Abdul_KariM#1326 / طلبات البرمجة

https://www.paypal.me/AbdulKariMx / اذا حاب تدعمني

Posted

مش فاهم

 

قد تكونآمنيآتنآ حزينه !وآحلآمُنآ ملت طآبور آلإنتِظآر لكنهآ ،تتشبث بآلأمل فنفوسُنآ خُلقت لتقول غداً آجمل B-18.png 

Posted

انا العامل الموضوع

 

قد تكونآمنيآتنآ حزينه !وآحلآمُنآ ملت طآبور آلإنتِظآر لكنهآ ،تتشبث بآلأمل فنفوسُنآ خُلقت لتقول غداً آجمل B-18.png 

Posted

+ انا

Sylnce

العططيلكم كود اللوحه ^

 

قد تكونآمنيآتنآ حزينه !وآحلآمُنآ ملت طآبور آلإنتِظآر لكنهآ ،تتشبث بآلأمل فنفوسُنآ خُلقت لتقول غداً آجمل B-18.png 

Posted

اكثر من مره قلتها ,

اكيد ما راح يظهر في القريد ليست

لنك مسوي القريد ليست في وضيفة ,

و انت حاط الجدول خارج الوضيفة

و كذا يعتبر القريد ليست مو معرف

فـ امسح حدث عند تشغيل المود و الوضيفة للوحة

او ضيف الجدول فيها

  
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; 
  
  
GUIEditor = { 
    gridlist = {}, 
    button = {}, 
    label = {} 
} 
  
        wnd = guiCreateWindow(121, 88, 567, 414, ":: Jail Systeam ::", false) 
        guiWindowSetSizable(wnd, false) 
        guiSetVisible(wnd ,false) 
        GUIEditor.button[1] = guiCreateButton(100, 302, 355, 35, "Jail Player", false, wnd) 
        GUIEditor.button[2] = guiCreateButton(100, 347, 355, 35, "X", false, wnd) 
        GUIEditor.label[1] = guiCreateLabel(397, 389, 164, 25, "Created By [L]e3bA | v4.3.1", false, wnd) 
        guiLabelSetColor(GUIEditor.label[1], 255, 0, 0) 
        grid2 = guiCreateGridList(291, 21, 242, 271, false, wnd) 
        guiGridListAddColumn(grid2, "Time", 0.9) 
        grid = guiCreateGridList(9, 21, 278, 271, false, wnd) 
        col3 = guiGridListAddColumn(grid, "Name", 0.9)     
  
  
  
function OpenWin(   ) 
  
guiSetVisible ( wnd , not guiGetVisible ( wnd ) ) 
  
showCursor ( not isCursorShowing (  ) ) 
  
end 
bindKey ( "x", "down", OpenWin ) 
  
JP = { 
  
{ "1 Min",60000 }, 
{ "2 Min", 120000 }, 
{ "3 Min", 180000 }, 
{ "4 Min", 3000000 }, 
{ "5 Min", 120000 }, 
{ "6 Min", 600000 }, 
{ "6 Min", 900000 }, 
{ "6 Min", 1200000 }, 
{ "6 Min", 1800000 }, 
{ "6 Min", 2400000 }, 
  
  
} 
  
  
for k , v in ipairs ( JP ) do 
  
local Row = guiGridListAddRow ( grid2 ) 
  
guiGridListSetItemText ( grid2 ,Row , 1, v[1] , false , false ); 
  
guiGridListSetItemData ( grid2 , Row , 1, v[2] ) 
  
end 
  
addEventHandler("onClientGUIClick", GUIEditor.button[1],   
  
    function ( ) 
  
    local Sel = guiGridListGetSelectedItem ( grid ) 
  
    local Sel2 = guiGridListGetSelectedItem ( grid2 ) 
  
    if  Sel ~= -1 and  Sel2 ~= -1 then 
  
    local Player = guiGridListGetItemText ( grid,2 Sel, 1 ) 
  
    local Jail = guiGridListGetItemData ( grid2 , Sel2 , 1 ) 
  
    triggerServerEvent ( "Jail_Player",localPlayer,Player,Jail ) 
  
    end 
end,false 
    ) ; 
    
    
addEventHandler("onClientGUIClick",resourceRoot, function ( ) 
if ( source == GUIEditor.button[2] ) then 
guiSetVisible(wnd,false) 
showCursor(false) 
end 
end 
 ) 
  
  

logo.png

:: العرب - MTA منتديات ::

www.mtaarabs.com

الحق / بتسجيل .. الاول موقع عربي .. يدعم لاعبين و سيرفرات و استضافات العبة ..

Posted

شكرا لك اخ مسعد !

 

قد تكونآمنيآتنآ حزينه !وآحلآمُنآ ملت طآبور آلإنتِظآر لكنهآ ،تتشبث بآلأمل فنفوسُنآ خُلقت لتقول غداً آجمل B-18.png 

Posted

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; 
  
  
GUIEditor = { 
    gridlist = {}, 
    button = {}, 
    label = {} 
} 
  
        wnd = guiCreateWindow(121, 88, 567, 414, ":: Jail Systeam ::", false) 
        guiWindowSetSizable(wnd, false) 
        guiSetVisible(wnd ,false) 
        GUIEditor.button[1] = guiCreateButton(100, 302, 355, 35, "Jail Player", false, wnd) 
        GUIEditor.button[2] = guiCreateButton(100, 347, 355, 35, "X", false, wnd) 
        GUIEditor.label[1] = guiCreateLabel(397, 389, 164, 25, "Created By [L]e3bA | v4.3.1", false, wnd) 
        guiLabelSetColor(GUIEditor.label[1], 255, 0, 0) 
        grid2 = guiCreateGridList(291, 21, 242, 271, false, wnd) 
        guiGridListAddColumn(grid2, "Time", 0.9) 
        grid = guiCreateGridList(9, 21, 278, 271, false, wnd) 
        col3 = guiGridListAddColumn(grid, "Name", 0.9)     
 changeGridListItemToPlayersName ( grid , col3 ) 
  
  
function OpenWin(   ) 
  
guiSetVisible ( wnd , not guiGetVisible ( wnd ) ) 
  
showCursor ( not isCursorShowing (  ) ) 
  
end 
bindKey ( "x", "down", OpenWin ) 
  
JP = { 
  
{ "1 Min",60000 }, 
{ "2 Min", 120000 }, 
{ "3 Min", 180000 }, 
{ "4 Min", 3000000 }, 
{ "5 Min", 120000 }, 
{ "6 Min", 600000 }, 
{ "6 Min", 900000 }, 
{ "6 Min", 1200000 }, 
{ "6 Min", 1800000 }, 
{ "6 Min", 2400000 } 
  
  
} 
  
  
for k , v in ipairs ( JP ) do 
  
local Row = guiGridListAddRow ( grid2 ) 
  
guiGridListSetItemText ( grid2 ,Row , 1, v[1] , false , false ); 
  
guiGridListSetItemData ( grid2 , Row , 1, v[2] ) 
  
end 
  
addEventHandler("onClientGUIClick", GUIEditor.button[1],   
  
    function ( ) 
  
    local Sel = guiGridListGetSelectedItem ( grid ) 
  
    local Sel2 = guiGridListGetSelectedItem ( grid2 ) 
  
    if  Sel ~= -1 and  Sel2 ~= -1 then 
  
    local Player = guiGridListGetItemText ( grid, Sel, 1 ) 
  
    local Jail = guiGridListGetItemData ( grid2 , Sel2 , 1 ) 
  
    triggerServerEvent ( "Jail_Player",localPlayer,Player,Jail ) 
  
    end 
end,false 
    ) ; 
    
    
addEventHandler("onClientGUIClick",resourceRoot, function ( ) 
if ( source == GUIEditor.button[2] ) then 
guiSetVisible(wnd,false) 
showCursor(false) 
end 
end 
 ) 

[ Skype : kreee89 - Discord : Abdul_KariM#1326 / طلبات البرمجة

https://www.paypal.me/AbdulKariMx / اذا حاب تدعمني

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