Jump to content

x[ طلب ]x فانكشنات مود الأملاك الخاصه


Recommended Posts

  • Replies 54
  • Created
  • Last Reply

Top Posters In This Topic

الكود سيرفر

createVehicle -- انشاء سياره 
getPlayerSerial -- تسوي تحقق من السيريال 
cancelEvent -- اذا كان السيريال غير موجود يكنسل الحدث 

سويت لوحه فيه

قريد لست

حق السيارات

و قريد لست ثاني حق اسماء العبين

نجي ل القريد لتس الاول تحته فيه

زر ينزل له سياره

و زر ي حذفها

و زر يقفلها

و خلاصخلاصنا هنا

نجي ل الثاني

تحته فيه زر ي لم تحدد لاعب من القريد لست

و تضرب الزر رقم 1 ينتقل ل الاعب

و الزر الثاني يسحب الاعب لك

و خلاص ^_^

ابي الاكواد المطلوبه

Link to comment
الكود سيرفر

createVehicle -- انشاء سياره 
getPlayerSerial -- تسوي تحقق من السيريال 
cancelEvent -- اذا كان السيريال غير موجود يكنسل الحدث 

سويت لوحه فيه

قريد لست

حق السيارات

و قريد لست ثاني حق اسماء العبين

نجي ل القريد لتس الاول تحته فيه

زر ينزل له سياره

و زر ي حذفها

و زر يقفلها

و خلاصخلاصنا هنا

نجي ل الثاني

تحته فيه زر ي لم تحدد لاعب من القريد لست

و تضرب الزر رقم 1 ينتقل ل الاعب

و الزر الثاني يسحب الاعب لك

و خلاص ^_^

ابي الاكواد المطلوبه

رجاء ردوو

Link to comment
  • 3 weeks later...

بعطيك طريقة السكل وانت حاول وبساعدك ..

"onVehicleStartEnter" -- اذا ركب السياره 
table -- جدول للسيارات 
executeSQLQuery -- تسوي قاعده بيانات 
createVehicle -- تسوي سياره 
getElementPosition -- تجيب احداثيات اللاعب 
getPlayerSerial -- تجيب سريال اللاعب 
cancelEvent -- تكنسل الحدث اللي فوق عشان اذا ركب وطلعت مب سيارته 
isElement -- تتحقق من وجود السياره 
destroyElement -- تحذف السياره 
outputChatBox -- تطلع نص بالشات 

Link to comment
بعطيك طريقة السكل وانت حاول وبساعدك ..
"onVehicleStartEnter" -- اذا ركب السياره 
table -- جدول للسيارات 
executeSQLQuery -- تسوي قاعده بيانات 
createVehicle -- تسوي سياره 
getElementPosition -- تجيب احداثيات اللاعب 
getPlayerSerial -- تجيب سريال اللاعب 
cancelEvent -- تكنسل الحدث اللي فوق عشان اذا ركب وطلعت مب سيارته 
isElement -- تتحقق من وجود السياره 
destroyElement -- تحذف السياره 
outputChatBox -- تطلع نص بالشات 

قواعد البيانات ماعرف له ضعيف فيه ي ليت تعلمني عليها

+ اخوي

ابي لم يضرب بوتن ينقله لي السياره

+ ابي فانكشن سحب و الانتقال الى الاعب

و شكرا ^_^

Link to comment

ابحث عنها بالقسم وبقسم الشروحات ياكثرهاا..

بالنسبه ل ينقله للسياره,

"onClientGUIClick" -- اذا ضغط 
triggerServerEvent -- ترسل تريقر للسيرفر 
warpPedIntoVehicle -- اذا مسوي السياره بالكلينت مايحتاج تريقر واذا لا يحتاج 

بالنسبه ل سحب وانتقال اللاعب, وش تقصد ب سحب؟ يعني تسحب لاعب لعندك؟

getElementPosition 
setElementPosition 

Link to comment
ابحث عنها بالقسم وبقسم الشروحات ياكثرهاا..

بالنسبه ل ينقله للسياره,

"onClientGUIClick" -- اذا ضغط 
triggerServerEvent -- ترسل تريقر للسيرفر 
warpPedIntoVehicle -- اذا مسوي السياره بالكلينت مايحتاج تريقر واذا لا يحتاج 

بالنسبه ل سحب وانتقال اللاعب, وش تقصد ب سحب؟ يعني تسحب لاعب لعندك؟

getElementPosition 
setElementPosition 

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

Link to comment
ابحث عنها بالقسم وبقسم الشروحات ياكثرهاا..

بالنسبه ل ينقله للسياره,

"onClientGUIClick" -- اذا ضغط 
triggerServerEvent -- ترسل تريقر للسيرفر 
warpPedIntoVehicle -- اذا مسوي السياره بالكلينت مايحتاج تريقر واذا لا يحتاج 

بالنسبه ل سحب وانتقال اللاعب, وش تقصد ب سحب؟ يعني تسحب لاعب لعندك؟

getElementPosition 
setElementPosition 

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

اخي شااطح ممكن مثال على سحب الاعب و و الانتقال الى الاعب ^_^

Link to comment
  
createVehicle = {
    {"Broadway", 575},
    {"Buccaneer", 518},
    {"Esperanto", 419},
    {"Remington", 534},
    {"Savanna", 567},
    {"Slamvan", 535},
    {"Tornado", 576},
    {"Voodoo", 412},
    {"Blista Compact", 496},
    {"Bravura", 401},
    {"Cadrona", 527},
    {"Clover", 542},
    {"Feltzer", 533},
    {"Fortune", 526},
    {"Hermes", 474},
    {"Hustler", 545},
    {"Majestic", 517},
    {"Manana", 410},
    {"Previon", 436},
    {"Sabre", 475},
    {"Stallion", 439},
    {"Tampa", 549},
    {"Virgo", 491},
    {"Admiral", 445},
    {"Cabbie", 438},
    {"Elegant", 507},
    {"Emperor", 585},
    {"Glendale", 466},
    {"Greenwood", 492},
    {"Intruder", 546},
    {"Merit", 551},
    {"Nebula", 516},
    {"Oceanic", 467},
    {"Premier", 426},
    {"Primo", 547},
    {"Sentinel", 405},
    {"Stafford", 580},
    {"Stretch", 409},
    {"Sunrise", 550},
    {"Tahoma", 566},
    {"Taxi", 420},
    {"Vincent", 540},
    {"Washington", 421},
    {"Willard", 529},
    {"Ambulance", 416},
    {"Barracks", 433},
    {"Enforcer", 427},
    {"FBI rancher", 490},
    {"FBI truck", 528},
    {"Fire truck", 407},
    {"Fire truck (ladder)", 544},
    {"Police car (LS)", 596},
    {"Police car (LV)", 598},
    {"Police car (SF)", 597},
    {"Police ranger", 599},
    {"S.W.A.T.", 601},
    {"Cement truck", 524},
    {"DFT-30", 578},
    {"Dozer", 486},
    {"Dumper", 406},
    {"Alpha", 602},
    {"Banshee", 429},
    {"Buffalo", 402},
    {"Bullet", 541},
    {"Cheetah", 415},
    {"Comet", 480},
    {"Elegy", 562},
    {"Euros", 587},
    {"Flash", 565},
    {"Infernus", 411},
    {"Jester", 559},
    {"Phoenix", 603},
    {"Sultan", 560},
    {"Super GT", 506},
    {"Turismo", 451},
    {"Uranus", 558},
    {"Windsor", 555},
    {"ZR-350", 477},
    {"Blade", 536},
    {"Dune", 573},
    {"Flatbed", 455},
    {"Forklift", 530},
    {"Linerunner", 403},
    {"Packer", 443},
    {"Roadtrain", 515},
    {"Sweeper", 574},
    {"Tanker", 514},
    {"Towtruck", 525},
    {"Trashmaster", 408},
    {"Utility van", 552},
    {"Benson", 499},
    {"Black Boxville", 609},
    {"Bobcat", 422},
    {"Boxville", 498},
    {"Mule", 414},
    {"Picador", 600},
    {"Sadler", 543},
    {"Securicar", 428},
    {"Walton", 478},
    {"Yankee", 456},
    {"Yosemite", 554},
    {"Berkley's RC van", 459},
    {"Burrito", 482},
    {"Camper", 483},
    {"Journey", 508},
    {"Moonbeam", 418},
    {"News van", 582},
    {"Bike", 509},
    {"BMX", 481},
    {"Mountain bike", 510},
    {"Cargobob", 548},
    {"Leviathan", 417},
    {"Maverick", 487},
    {"News Chopper", 488},
    {"Police Maverick", 497},
    {"Sparrow", 469},
    {"Beagle", 511},
    {"Cropduster", 512},
    {"Dodo", 593},
    {"Nevada", 553},
    {"Rustler", 476},
    {"Shamal", 519},
    {"Skimmer", 460},
    {"Stuntplane", 513},
    {"Pony", 413},
    {"Rumpo", 440},
    {"Baggage", 485},
    {"Bandito", 568},
    {"BF Injection", 424},
    {"Bloodring Banger", 504},
    {"Bus", 431},
    {"Caddy", 457},
    {"Coach", 437},
    {"Combine harvester", 532},
    {"Hotknife", 434},
    {"Hotring racer", 494},
    {"Hotring racer 2", 502},
    {"Hotring racer 3", 503},
    {"Monster", 444},
    {"Monster 2", 556},
    {"Monster 3", 557},
    {"Mower", 572},
    {"Mr. Whoopee", 423},
    {"Kart", 571},
    {"Tractor", 531},
    {"Tug", 583},
    {"Vortex", 539},
    {"RC Bandit", 441},
    {"RC Baron", 464},
    {"RC Flower Pot", 594},
    {"RC Goblin", 501},
    {"RC Raider", 465},
    {"RC Tiger", 564},
    {"Club", 589},
    {"Huntley", 579},
    {"Landstalker", 400},
    {"Mesa", 500},
    {"Patriot", 470},
    {"Perennial", 404},
    {"Rancher", 489},
    {"Regina", 479},
    {"Romero", 442},
    {"Sandking", 495},
    {"Solair", 458},
    {"Stratum", 561},
    {"Coastguard", 472},
    {"Dinghy", 473},
    {"Jetmax", 493},
    {"Launch", 595},
    {"Marquis", 484},
    {"Predator", 430},
    {"Reefer", 453},
    {"Speeder", 452},
    {"Squalo", 446},
    {"Tropic", 454},
    {"BF-400", 581},
    {"Faggio", 462},
    {"FCR-900", 521},
    {"Freeway", 463},
    {"HPV1000", 523},
    {"NRG-500", 522},
    {"PCJ-600", 461},
    {"Pizza Boy", 448},
    {"Sanchez", 468},
    {"Wayfarer", 586},
    {"Quadbike", 471},
    }
       
GUIEditor = {
    gridlist = {},
    button = {},
    window = {},
}
addEventHandler("onClientResourceStart", resourceRoot,
    function()
        GUIEditor.window[1] = guiCreateWindow(187, 90, 454, 423, "", false)
        guiWindowSetSizable(GUIEditor.window[1], false)
        guiSetAlpha(GUIEditor.window[1], 1.00)
        guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFF7BB06")
 
        GUIEditor.gridlist[1] = guiCreateGridList(10, 29, 165, 242, false, GUIEditor.window[1])
        guiGridListAddColumn(GUIEditor.gridlist[1], "Playres", 0.9)
        GUIEditor.gridlist[2] = guiCreateGridList(263, 30, 165, 242, false, GUIEditor.window[1])
        guiGridListAddColumn(GUIEditor.gridlist[2], "car", 0.5)
        guiGridListAddColumn(GUIEditor.gridlist[2], "id", 0.5)
        GUIEditor.button[1] = guiCreateButton(12, 287, 171, 25, "انشاء موتر", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFF0000")
        GUIEditor.button[2] = guiCreateButton(10, 319, 171, 25, "نقل الاعب لي الموتر", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFF0000")
        GUIEditor.button[3] = guiCreateButton(10, 354, 171, 25, "نقل الموتر آلى آلاعب", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFFF0000")
        GUIEditor.button[4] = guiCreateButton(262, 286, 171, 25, " +100اعطاء درع", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFFF0000")
        GUIEditor.button[5] = guiCreateButton(263, 317, 171, 25, "اعطاء دم +200", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FFFF0000")
        GUIEditor.button[6] = guiCreateButton(10, 384, 171, 25, "سحب الموتر", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[6], "NormalTextColour", "FFFF0000")    
    end
)
 
    function ab()
        for k,v in ipairs(createVehicle) do
            local row = guiGridListAddRow(gridlist2)
                guiGridListSetItemText(gridlist2,row,1,v,"car",false,false)
                guiGridListSetItemText(gridlist2,row,1,v,"id",false,false)
               
    end
end
 
        function aa()
        guiGridListClear(YourGrid)
        for i,v in ipairs(getElementsByType("player")) do
            local row = guiGridListAddRow(gridlist1)
                guiGridListSetItemText(gridlist1,row,1,getPlayerName(v),false,false)
    end
end
                ---------------------------------------------
               
        addEventHandler ( "onClientGUIClick",root)
        function Cvehicle()
        if source == GUIEditor.button[1] then
        triggerServerEvent( 'Cvehicle', localPlayer)
        elseif source == GUIEditor.button[2] then
        triggerServerEvent( 'wrepplayre', localPlayer)
        elseif source == GUIEditor.button[3] then
        triggerServerEvent( 'werpvehicle', localPlayer)
        elseif source == GUIEditor.button[6] then
        triggerServerEvent( 'desvehicle', localPlayer)
        elseif source == GUIEditor.button[5] then
       
Link to comment
  
createVehicle = {
    {"Broadway", 575},
    {"Buccaneer", 518},
    {"Esperanto", 419},
    {"Remington", 534},
    {"Savanna", 567},
    {"Slamvan", 535},
    {"Tornado", 576},
    {"Voodoo", 412},
    {"Blista Compact", 496},
    {"Bravura", 401},
    {"Cadrona", 527},
    {"Clover", 542},
    {"Feltzer", 533},
    {"Fortune", 526},
    {"Hermes", 474},
    {"Hustler", 545},
    {"Majestic", 517},
    {"Manana", 410},
    {"Previon", 436},
    {"Sabre", 475},
    {"Stallion", 439},
    {"Tampa", 549},
    {"Virgo", 491},
    {"Admiral", 445},
    {"Cabbie", 438},
    {"Elegant", 507},
    {"Emperor", 585},
    {"Glendale", 466},
    {"Greenwood", 492},
    {"Intruder", 546},
    {"Merit", 551},
    {"Nebula", 516},
    {"Oceanic", 467},
    {"Premier", 426},
    {"Primo", 547},
    {"Sentinel", 405},
    {"Stafford", 580},
    {"Stretch", 409},
    {"Sunrise", 550},
    {"Tahoma", 566},
    {"Taxi", 420},
    {"Vincent", 540},
    {"Washington", 421},
    {"Willard", 529},
    {"Ambulance", 416},
    {"Barracks", 433},
    {"Enforcer", 427},
    {"FBI rancher", 490},
    {"FBI truck", 528},
    {"Fire truck", 407},
    {"Fire truck (ladder)", 544},
    {"Police car (LS)", 596},
    {"Police car (LV)", 598},
    {"Police car (SF)", 597},
    {"Police ranger", 599},
    {"S.W.A.T.", 601},
    {"Cement truck", 524},
    {"DFT-30", 578},
    {"Dozer", 486},
    {"Dumper", 406},
    {"Alpha", 602},
    {"Banshee", 429},
    {"Buffalo", 402},
    {"Bullet", 541},
    {"Cheetah", 415},
    {"Comet", 480},
    {"Elegy", 562},
    {"Euros", 587},
    {"Flash", 565},
    {"Infernus", 411},
    {"Jester", 559},
    {"Phoenix", 603},
    {"Sultan", 560},
    {"Super GT", 506},
    {"Turismo", 451},
    {"Uranus", 558},
    {"Windsor", 555},
    {"ZR-350", 477},
    {"Blade", 536},
    {"Dune", 573},
    {"Flatbed", 455},
    {"Forklift", 530},
    {"Linerunner", 403},
    {"Packer", 443},
    {"Roadtrain", 515},
    {"Sweeper", 574},
    {"Tanker", 514},
    {"Towtruck", 525},
    {"Trashmaster", 408},
    {"Utility van", 552},
    {"Benson", 499},
    {"Black Boxville", 609},
    {"Bobcat", 422},
    {"Boxville", 498},
    {"Mule", 414},
    {"Picador", 600},
    {"Sadler", 543},
    {"Securicar", 428},
    {"Walton", 478},
    {"Yankee", 456},
    {"Yosemite", 554},
    {"Berkley's RC van", 459},
    {"Burrito", 482},
    {"Camper", 483},
    {"Journey", 508},
    {"Moonbeam", 418},
    {"News van", 582},
    {"Bike", 509},
    {"BMX", 481},
    {"Mountain bike", 510},
    {"Cargobob", 548},
    {"Leviathan", 417},
    {"Maverick", 487},
    {"News Chopper", 488},
    {"Police Maverick", 497},
    {"Sparrow", 469},
    {"Beagle", 511},
    {"Cropduster", 512},
    {"Dodo", 593},
    {"Nevada", 553},
    {"Rustler", 476},
    {"Shamal", 519},
    {"Skimmer", 460},
    {"Stuntplane", 513},
    {"Pony", 413},
    {"Rumpo", 440},
    {"Baggage", 485},
    {"Bandito", 568},
    {"BF Injection", 424},
    {"Bloodring Banger", 504},
    {"Bus", 431},
    {"Caddy", 457},
    {"Coach", 437},
    {"Combine harvester", 532},
    {"Hotknife", 434},
    {"Hotring racer", 494},
    {"Hotring racer 2", 502},
    {"Hotring racer 3", 503},
    {"Monster", 444},
    {"Monster 2", 556},
    {"Monster 3", 557},
    {"Mower", 572},
    {"Mr. Whoopee", 423},
    {"Kart", 571},
    {"Tractor", 531},
    {"Tug", 583},
    {"Vortex", 539},
    {"RC Bandit", 441},
    {"RC Baron", 464},
    {"RC Flower Pot", 594},
    {"RC Goblin", 501},
    {"RC Raider", 465},
    {"RC Tiger", 564},
    {"Club", 589},
    {"Huntley", 579},
    {"Landstalker", 400},
    {"Mesa", 500},
    {"Patriot", 470},
    {"Perennial", 404},
    {"Rancher", 489},
    {"Regina", 479},
    {"Romero", 442},
    {"Sandking", 495},
    {"Solair", 458},
    {"Stratum", 561},
    {"Coastguard", 472},
    {"Dinghy", 473},
    {"Jetmax", 493},
    {"Launch", 595},
    {"Marquis", 484},
    {"Predator", 430},
    {"Reefer", 453},
    {"Speeder", 452},
    {"Squalo", 446},
    {"Tropic", 454},
    {"BF-400", 581},
    {"Faggio", 462},
    {"FCR-900", 521},
    {"Freeway", 463},
    {"HPV1000", 523},
    {"NRG-500", 522},
    {"PCJ-600", 461},
    {"Pizza Boy", 448},
    {"Sanchez", 468},
    {"Wayfarer", 586},
    {"Quadbike", 471},
    }
       
GUIEditor = {
    gridlist = {},
    button = {},
    window = {},
}
addEventHandler("onClientResourceStart", resourceRoot,
    function()
        GUIEditor.window[1] = guiCreateWindow(187, 90, 454, 423, "", false)
        guiWindowSetSizable(GUIEditor.window[1], false)
        guiSetAlpha(GUIEditor.window[1], 1.00)
        guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFF7BB06")
 
        GUIEditor.gridlist[1] = guiCreateGridList(10, 29, 165, 242, false, GUIEditor.window[1])
        guiGridListAddColumn(GUIEditor.gridlist[1], "Playres", 0.9)
        GUIEditor.gridlist[2] = guiCreateGridList(263, 30, 165, 242, false, GUIEditor.window[1])
        guiGridListAddColumn(GUIEditor.gridlist[2], "car", 0.5)
        guiGridListAddColumn(GUIEditor.gridlist[2], "id", 0.5)
        GUIEditor.button[1] = guiCreateButton(12, 287, 171, 25, "انشاء موتر", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFF0000")
        GUIEditor.button[2] = guiCreateButton(10, 319, 171, 25, "نقل الاعب لي الموتر", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFF0000")
        GUIEditor.button[3] = guiCreateButton(10, 354, 171, 25, "نقل الموتر آلى آلاعب", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFFF0000")
        GUIEditor.button[4] = guiCreateButton(262, 286, 171, 25, " +100اعطاء درع", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFFF0000")
        GUIEditor.button[5] = guiCreateButton(263, 317, 171, 25, "اعطاء دم +200", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FFFF0000")
        GUIEditor.button[6] = guiCreateButton(10, 384, 171, 25, "سحب الموتر", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[6], "NormalTextColour", "FFFF0000")    
    end
)
 
    function ab()
        for k,v in ipairs(createVehicle) do
            local row = guiGridListAddRow(gridlist2)
                guiGridListSetItemText(gridlist2,row,1,v,"car",false,false)
                guiGridListSetItemText(gridlist2,row,1,v,"id",false,false)
               
    end
end
 
        function aa()
        guiGridListClear(YourGrid)
        for i,v in ipairs(getElementsByType("player")) do
            local row = guiGridListAddRow(gridlist1)
                guiGridListSetItemText(gridlist1,row,1,getPlayerName(v),false,false)
    end
end
                ---------------------------------------------
               
        addEventHandler ( "onClientGUIClick",root)
        function Cvehicle()
        if source == GUIEditor.button[1] then
        triggerServerEvent( 'Cvehicle', localPlayer)
        elseif source == GUIEditor.button[2] then
        triggerServerEvent( 'wrepplayre', localPlayer)
        elseif source == GUIEditor.button[3] then
        triggerServerEvent( 'werpvehicle', localPlayer)
        elseif source == GUIEditor.button[6] then
        triggerServerEvent( 'desvehicle', localPlayer)
        elseif source == GUIEditor.button[5] then
       
Link to comment

guiGridListAddPlayers

الوظيفة تقوم باضافة كل الاعبين الأون لاين بالسيرفر للقريد لست ;

أعرف ان الوظيفة قديمة , ولاكن سويتها على طريقتي وبشكل مرتب وتحققات للتأكد من عمل الفنكشن

Syntax - السنتاكس

bool guiGridListAddPlayers ( element gridList, int columnIndex, bool section, bool number )

Required Arguments - الأرقمنات المطلوبة

* gridList: The grid list element

* columnIndex: Column ID

* section: Determines if the item is a section

* number: Tells whether the text item is a number value or not (used for sorting)

Returns -- ارجاع القيمة

Return all players in a grid list, false otherwise. - يقوم بأرجاع قيمة اسماء الاعبين بالقريد لست

Code - كود الوظيفة

function guiGridListAddPlayers( GridList, Column, Section, Number ) 
    if( getElementType( GridList ) == "gui-gridlist" ) then 
    assert( tonumber( Column ), "Bad argument @ 'guiGridListAddPlayers' [Expected number at argument 2, got " .. tostring(Column) .. "]" ) 
        if( Section == false or Section == true ) then 
            if( Number == false or Number == true ) then 
                for _, player in ipairs( getElementsByType('player') ) do 
                    guiGridListClear( GridList ) 
                        local Row = guiGridListAddRow( GridList ) 
                        guiGridListSetItemText( GridList, Row, Column, getPlayerName(player), Section, Number ) 
                        end  
                    else 
                    error("Bad argument @ 'guiGridListAddPlayers' [Expected boolean at argument 4, got " .. tostring(Number) .. "]") 
                end 
            else 
            error("Bad argument @ 'guiGridListAddPlayers' [Expected boolean at argument 3, got " .. tostring(Section) .. "]") 
        end 
    end 
end 

Example - مثال

This example add all online players in the server to a grid list

  
-- Grid list  
    local screenW, screenH = guiGetScreenSize() 
    Main_GridList = guiCreateGridList((screenW - 233) / 2, (screenH - 357) / 2, 233, 357, false) 
    guiGridListAddColumn(Main_GridList, "Players", 0.9) 
    guiSetVisible( Main_GridList, false ) 
  
-- For show Grid List 
bindKey( "F10", "down", function( ) 
    guiSetVisible( Main_GridList, not guiGetVisible( Main_GridList ) ) 
    showCursor( not isCursorShowing( ) ) 
end ) 
  
-- This command add all players to a grid list 
addCommandHandler( "addPlayers", function( ) 
    guiGridListAddPlayers( Main_GridList, 1, false, false ) 
end ) 
  

Author: MR.GRAND

Hint: This function can be useful, Shortcut way Add to the grid list of players.

في أمان الله تعالى

:)

+

غير اسم الجدول حق السيرات

Link to comment

guiGridListAddPlayers

الوظيفة تقوم باضافة كل الاعبين الأون لاين بالسيرفر للقريد لست ;

أعرف ان الوظيفة قديمة , ولاكن سويتها على طريقتي وبشكل مرتب وتحققات للتأكد من عمل الفنكشن

Syntax - السنتاكس

bool guiGridListAddPlayers ( element gridList, int columnIndex, bool section, bool number )

Required Arguments - الأرقمنات المطلوبة

* gridList: The grid list element

* columnIndex: Column ID

* section: Determines if the item is a section

* number: Tells whether the text item is a number value or not (used for sorting)

Returns -- ارجاع القيمة

Return all players in a grid list, false otherwise. - يقوم بأرجاع قيمة اسماء الاعبين بالقريد لست

Code - كود الوظيفة

function guiGridListAddPlayers( GridList, Column, Section, Number ) 
    if( getElementType( GridList ) == "gui-gridlist" ) then 
    assert( tonumber( Column ), "Bad argument @ 'guiGridListAddPlayers' [Expected number at argument 2, got " .. tostring(Column) .. "]" ) 
        if( Section == false or Section == true ) then 
            if( Number == false or Number == true ) then 
                for _, player in ipairs( getElementsByType('player') ) do 
                    guiGridListClear( GridList ) 
                        local Row = guiGridListAddRow( GridList ) 
                        guiGridListSetItemText( GridList, Row, Column, getPlayerName(player), Section, Number ) 
                        end  
                    else 
                    error("Bad argument @ 'guiGridListAddPlayers' [Expected boolean at argument 4, got " .. tostring(Number) .. "]") 
                end 
            else 
            error("Bad argument @ 'guiGridListAddPlayers' [Expected boolean at argument 3, got " .. tostring(Section) .. "]") 
        end 
    end 
end 

Example - مثال

This example add all online players in the server to a grid list

  
-- Grid list  
    local screenW, screenH = guiGetScreenSize() 
    Main_GridList = guiCreateGridList((screenW - 233) / 2, (screenH - 357) / 2, 233, 357, false) 
    guiGridListAddColumn(Main_GridList, "Players", 0.9) 
    guiSetVisible( Main_GridList, false ) 
  
-- For show Grid List 
bindKey( "F10", "down", function( ) 
    guiSetVisible( Main_GridList, not guiGetVisible( Main_GridList ) ) 
    showCursor( not isCursorShowing( ) ) 
end ) 
  
-- This command add all players to a grid list 
addCommandHandler( "addPlayers", function( ) 
    guiGridListAddPlayers( Main_GridList, 1, false, false ) 
end ) 
  

Author: MR.GRAND

Hint: This function can be useful, Shortcut way Add to the grid list of players.

في أمان الله تعالى

:)

+

غير اسم الجدول حق السيرات

غيرتها مازبط

  
    carid = {
    {"Broadway", 575},
    {"Buccaneer", 518},
    {"Esperanto", 419},
    {"Remington", 534},
    {"Savanna", 567},
    {"Slamvan", 535},
    {"Tornado", 576},
    {"Voodoo", 412},
    {"Blista Compact", 496},
    {"Bravura", 401},
    {"Cadrona", 527},
    {"Clover", 542},
    {"Feltzer", 533},
    {"Fortune", 526},
    {"Hermes", 474},
    {"Hustler", 545},
    {"Majestic", 517},
    {"Manana", 410},
    {"Previon", 436},
    {"Sabre", 475},
    {"Stallion", 439},
    {"Tampa", 549},
    {"Virgo", 491},
    {"Admiral", 445},
    {"Cabbie", 438},
    {"Elegant", 507},
    {"Emperor", 585},
    {"Glendale", 466},
    {"Greenwood", 492},
    {"Intruder", 546},
    {"Merit", 551},
    {"Nebula", 516},
    {"Oceanic", 467},
    {"Premier", 426},
    {"Primo", 547},
    {"Sentinel", 405},
    {"Stafford", 580},
    {"Stretch", 409},
    {"Sunrise", 550},
    {"Tahoma", 566},
    {"Taxi", 420},
    {"Vincent", 540},
    {"Washington", 421},
    {"Willard", 529},
    {"Ambulance", 416},
    {"Barracks", 433},
    {"Enforcer", 427},
    {"FBI rancher", 490},
    {"FBI truck", 528},
    {"Fire truck", 407},
    {"Fire truck (ladder)", 544},
    {"Police car (LS)", 596},
    {"Police car (LV)", 598},
    {"Police car (SF)", 597},
    {"Police ranger", 599},
    {"S.W.A.T.", 601},
    {"Cement truck", 524},
    {"DFT-30", 578},
    {"Dozer", 486},
    {"Dumper", 406},
    {"Alpha", 602},
    {"Banshee", 429},
    {"Buffalo", 402},
    {"Bullet", 541},
    {"Cheetah", 415},
    {"Comet", 480},
    {"Elegy", 562},
    {"Euros", 587},
    {"Flash", 565},
    {"Infernus", 411},
    {"Jester", 559},
    {"Phoenix", 603},
    {"Sultan", 560},
    {"Super GT", 506},
    {"Turismo", 451},
    {"Uranus", 558},
    {"Windsor", 555},
    {"ZR-350", 477},
    {"Blade", 536},
    {"Dune", 573},
    {"Flatbed", 455},
    {"Forklift", 530},
    {"Linerunner", 403},
    {"Packer", 443},
    {"Roadtrain", 515},
    {"Sweeper", 574},
    {"Tanker", 514},
    {"Towtruck", 525},
    {"Trashmaster", 408},
    {"Utility van", 552},
    {"Benson", 499},
    {"Black Boxville", 609},
    {"Bobcat", 422},
    {"Boxville", 498},
    {"Mule", 414},
    {"Picador", 600},
    {"Sadler", 543},
    {"Securicar", 428},
    {"Walton", 478},
    {"Yankee", 456},
    {"Yosemite", 554},
    {"Berkley's RC van", 459},
    {"Burrito", 482},
    {"Camper", 483},
    {"Journey", 508},
    {"Moonbeam", 418},
    {"News van", 582},
    {"Bike", 509},
    {"BMX", 481},
    {"Mountain bike", 510},
    {"Cargobob", 548},
    {"Leviathan", 417},
    {"Maverick", 487},
    {"News Chopper", 488},
    {"Police Maverick", 497},
    {"Sparrow", 469},
    {"Beagle", 511},
    {"Cropduster", 512},
    {"Dodo", 593},
    {"Nevada", 553},
    {"Rustler", 476},
    {"Shamal", 519},
    {"Skimmer", 460},
    {"Stuntplane", 513},
    {"Pony", 413},
    {"Rumpo", 440},
    {"Baggage", 485},
    {"Bandito", 568},
    {"BF Injection", 424},
    {"Bloodring Banger", 504},
    {"Bus", 431},
    {"Caddy", 457},
    {"Coach", 437},
    {"Combine harvester", 532},
    {"Hotknife", 434},
    {"Hotring racer", 494},
    {"Hotring racer 2", 502},
    {"Hotring racer 3", 503},
    {"Monster", 444},
    {"Monster 2", 556},
    {"Monster 3", 557},
    {"Mower", 572},
    {"Mr. Whoopee", 423},
    {"Kart", 571},
    {"Tractor", 531},
    {"Tug", 583},
    {"Vortex", 539},
    {"RC Bandit", 441},
    {"RC Baron", 464},
    {"RC Flower Pot", 594},
    {"RC Goblin", 501},
    {"RC Raider", 465},
    {"RC Tiger", 564},
    {"Club", 589},
    {"Huntley", 579},
    {"Landstalker", 400},
    {"Mesa", 500},
    {"Patriot", 470},
    {"Perennial", 404},
    {"Rancher", 489},
    {"Regina", 479},
    {"Romero", 442},
    {"Sandking", 495},
    {"Solair", 458},
    {"Stratum", 561},
    {"Coastguard", 472},
    {"Dinghy", 473},
    {"Jetmax", 493},
    {"Launch", 595},
    {"Marquis", 484},
    {"Predator", 430},
    {"Reefer", 453},
    {"Speeder", 452},
    {"Squalo", 446},
    {"Tropic", 454},
    {"BF-400", 581},
    {"Faggio", 462},
    {"FCR-900", 521},
    {"Freeway", 463},
    {"HPV1000", 523},
    {"NRG-500", 522},
    {"PCJ-600", 461},
    {"Pizza Boy", 448},
    {"Sanchez", 468},
    {"Wayfarer", 586},
    {"Quadbike", 471},
    }
       
GUIEditor = {
    gridlist = {},
    button = {},
    window = {},
}
addEventHandler("onClientResourceStart", resourceRoot,
    function()
        GUIEditor.window[1] = guiCreateWindow(187, 90, 454, 423, "", false)
        guiWindowSetSizable(GUIEditor.window[1], false)
        guiSetAlpha(GUIEditor.window[1], 1.00)
        guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFF7BB06")
 
        GUIEditor.gridlist[1] = guiCreateGridList(10, 29, 165, 242, false, GUIEditor.window[1])
        guiGridListAddColumn(GUIEditor.gridlist[1], "Playres", 0.9)
        GUIEditor.gridlist[2] = guiCreateGridList(263, 30, 165, 242, false, GUIEditor.window[1])
        guiGridListAddColumn(GUIEditor.gridlist[2], "car", 0.5)
        guiGridListAddColumn(GUIEditor.gridlist[2], "id", 0.5)
        GUIEditor.button[1] = guiCreateButton(12, 287, 171, 25, "انشاء موتر", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFF0000")
        GUIEditor.button[2] = guiCreateButton(10, 319, 171, 25, "نقل الاعب لي الموتر", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFF0000")
        GUIEditor.button[3] = guiCreateButton(10, 354, 171, 25, "نقل الموتر آلى آلاعب", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFFF0000")
        GUIEditor.button[4] = guiCreateButton(262, 286, 171, 25, " +100اعطاء درع", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFFF0000")
        GUIEditor.button[5] = guiCreateButton(263, 317, 171, 25, "اعطاء دم +200", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FFFF0000")
        GUIEditor.button[6] = guiCreateButton(10, 384, 171, 25, "سحب الموتر", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[6], "NormalTextColour", "FFFF0000")    
    end
)
 
    function ab()
        for k,v in ipairs(carid) do
            local row = guiGridListAddRow(GUIEditor.gridlist[2])
                guiGridListSetItemText(GUIEditor.gridlist[2],row,1,v,"car",false,false)
                guiGridListSetItemText(GUIEditor.gridlist[2],row,1,v,"id",false,false)
               
    end
end
 
        function aa()
        guiGridListClear(GUIEditor.gridlist[1])
        for i,v in ipairs(getElementsByType("player")) do
            local row = guiGridListAddRow(GUIEditor.gridlist[1])
                guiGridListSetItemText(GUIEditor.gridlist[1],row,1,getPlayerName(v),false,false)
    end
end
                ---------------------------------------------
               
        addEventHandler ( "onClientGUIClick",root)
        function Cvehicle()
        if source == GUIEditor.button[1] then
        triggerServerEvent( 'Cvehicle', localPlayer)
        elseif source == GUIEditor.button[2] then
        triggerServerEvent( 'wrepplayre', localPlayer)
        elseif source == GUIEditor.button[3] then
        triggerServerEvent( 'werpvehicle', localPlayer)
        elseif source == GUIEditor.button[6] then
        triggerServerEvent( 'desvehicle', localPlayer)
        elseif source == GUIEditor.button[5] then
       
Link to comment

guiGridListAddPlayers

الوظيفة تقوم باضافة كل الاعبين الأون لاين بالسيرفر للقريد لست ;

أعرف ان الوظيفة قديمة , ولاكن سويتها على طريقتي وبشكل مرتب وتحققات للتأكد من عمل الفنكشن

Syntax - السنتاكس

bool guiGridListAddPlayers ( element gridList, int columnIndex, bool section, bool number )

Required Arguments - الأرقمنات المطلوبة

* gridList: The grid list element

* columnIndex: Column ID

* section: Determines if the item is a section

* number: Tells whether the text item is a number value or not (used for sorting)

Returns -- ارجاع القيمة

Return all players in a grid list, false otherwise. - يقوم بأرجاع قيمة اسماء الاعبين بالقريد لست

Code - كود الوظيفة

function guiGridListAddPlayers( GridList, Column, Section, Number ) 
    if( getElementType( GridList ) == "gui-gridlist" ) then 
    assert( tonumber( Column ), "Bad argument @ 'guiGridListAddPlayers' [Expected number at argument 2, got " .. tostring(Column) .. "]" ) 
        if( Section == false or Section == true ) then 
            if( Number == false or Number == true ) then 
                for _, player in ipairs( getElementsByType('player') ) do 
                    guiGridListClear( GridList ) 
                        local Row = guiGridListAddRow( GridList ) 
                        guiGridListSetItemText( GridList, Row, Column, getPlayerName(player), Section, Number ) 
                        end  
                    else 
                    error("Bad argument @ 'guiGridListAddPlayers' [Expected boolean at argument 4, got " .. tostring(Number) .. "]") 
                end 
            else 
            error("Bad argument @ 'guiGridListAddPlayers' [Expected boolean at argument 3, got " .. tostring(Section) .. "]") 
        end 
    end 
end 

Example - مثال

This example add all online players in the server to a grid list

  
-- Grid list  
    local screenW, screenH = guiGetScreenSize() 
    Main_GridList = guiCreateGridList((screenW - 233) / 2, (screenH - 357) / 2, 233, 357, false) 
    guiGridListAddColumn(Main_GridList, "Players", 0.9) 
    guiSetVisible( Main_GridList, false ) 
  
-- For show Grid List 
bindKey( "F10", "down", function( ) 
    guiSetVisible( Main_GridList, not guiGetVisible( Main_GridList ) ) 
    showCursor( not isCursorShowing( ) ) 
end ) 
  
-- This command add all players to a grid list 
addCommandHandler( "addPlayers", function( ) 
    guiGridListAddPlayers( Main_GridList, 1, false, false ) 
end ) 
  

Author: MR.GRAND

Hint: This function can be useful, Shortcut way Add to the grid list of players.

في أمان الله تعالى

+

غير اسم الجدول حق السيرات

غيرتها مازبط

  
    carid = {
    {"Broadway", 575},
    {"Buccaneer", 518},
    {"Esperanto", 419},
    {"Remington", 534},
    {"Savanna", 567},
    {"Slamvan", 535},
    {"Tornado", 576},
    {"Voodoo", 412},
    {"Blista Compact", 496},
    {"Bravura", 401},
    {"Cadrona", 527},
    {"Clover", 542},
    {"Feltzer", 533},
    {"Fortune", 526},
    {"Hermes", 474},
    {"Hustler", 545},
    {"Majestic", 517},
    {"Manana", 410},
    {"Previon", 436},
    {"Sabre", 475},
    {"Stallion", 439},
    {"Tampa", 549},
    {"Virgo", 491},
    {"Admiral", 445},
    {"Cabbie", 438},
    {"Elegant", 507},
    {"Emperor", 585},
    {"Glendale", 466},
    {"Greenwood", 492},
    {"Intruder", 546},
    {"Merit", 551},
    {"Nebula", 516},
    {"Oceanic", 467},
    {"Premier", 426},
    {"Primo", 547},
    {"Sentinel", 405},
    {"Stafford", 580},
    {"Stretch", 409},
    {"Sunrise", 550},
    {"Tahoma", 566},
    {"Taxi", 420},
    {"Vincent", 540},
    {"Washington", 421},
    {"Willard", 529},
    {"Ambulance", 416},
    {"Barracks", 433},
    {"Enforcer", 427},
    {"FBI rancher", 490},
    {"FBI truck", 528},
    {"Fire truck", 407},
    {"Fire truck (ladder)", 544},
    {"Police car (LS)", 596},
    {"Police car (LV)", 598},
    {"Police car (SF)", 597},
    {"Police ranger", 599},
    {"S.W.A.T.", 601},
    {"Cement truck", 524},
    {"DFT-30", 578},
    {"Dozer", 486},
    {"Dumper", 406},
    {"Alpha", 602},
    {"Banshee", 429},
    {"Buffalo", 402},
    {"Bullet", 541},
    {"Cheetah", 415},
    {"Comet", 480},
    {"Elegy", 562},
    {"Euros", 587},
    {"Flash", 565},
    {"Infernus", 411},
    {"Jester", 559},
    {"Phoenix", 603},
    {"Sultan", 560},
    {"Super GT", 506},
    {"Turismo", 451},
    {"Uranus", 558},
    {"Windsor", 555},
    {"ZR-350", 477},
    {"Blade", 536},
    {"Dune", 573},
    {"Flatbed", 455},
    {"Forklift", 530},
    {"Linerunner", 403},
    {"Packer", 443},
    {"Roadtrain", 515},
    {"Sweeper", 574},
    {"Tanker", 514},
    {"Towtruck", 525},
    {"Trashmaster", 408},
    {"Utility van", 552},
    {"Benson", 499},
    {"Black Boxville", 609},
    {"Bobcat", 422},
    {"Boxville", 498},
    {"Mule", 414},
    {"Picador", 600},
    {"Sadler", 543},
    {"Securicar", 428},
    {"Walton", 478},
    {"Yankee", 456},
    {"Yosemite", 554},
    {"Berkley's RC van", 459},
    {"Burrito", 482},
    {"Camper", 483},
    {"Journey", 508},
    {"Moonbeam", 418},
    {"News van", 582},
    {"Bike", 509},
    {"BMX", 481},
    {"Mountain bike", 510},
    {"Cargobob", 548},
    {"Leviathan", 417},
    {"Maverick", 487},
    {"News Chopper", 488},
    {"Police Maverick", 497},
    {"Sparrow", 469},
    {"Beagle", 511},
    {"Cropduster", 512},
    {"Dodo", 593},
    {"Nevada", 553},
    {"Rustler", 476},
    {"Shamal", 519},
    {"Skimmer", 460},
    {"Stuntplane", 513},
    {"Pony", 413},
    {"Rumpo", 440},
    {"Baggage", 485},
    {"Bandito", 568},
    {"BF Injection", 424},
    {"Bloodring Banger", 504},
    {"Bus", 431},
    {"Caddy", 457},
    {"Coach", 437},
    {"Combine harvester", 532},
    {"Hotknife", 434},
    {"Hotring racer", 494},
    {"Hotring racer 2", 502},
    {"Hotring racer 3", 503},
    {"Monster", 444},
    {"Monster 2", 556},
    {"Monster 3", 557},
    {"Mower", 572},
    {"Mr. Whoopee", 423},
    {"Kart", 571},
    {"Tractor", 531},
    {"Tug", 583},
    {"Vortex", 539},
    {"RC Bandit", 441},
    {"RC Baron", 464},
    {"RC Flower Pot", 594},
    {"RC Goblin", 501},
    {"RC Raider", 465},
    {"RC Tiger", 564},
    {"Club", 589},
    {"Huntley", 579},
    {"Landstalker", 400},
    {"Mesa", 500},
    {"Patriot", 470},
    {"Perennial", 404},
    {"Rancher", 489},
    {"Regina", 479},
    {"Romero", 442},
    {"Sandking", 495},
    {"Solair", 458},
    {"Stratum", 561},
    {"Coastguard", 472},
    {"Dinghy", 473},
    {"Jetmax", 493},
    {"Launch", 595},
    {"Marquis", 484},
    {"Predator", 430},
    {"Reefer", 453},
    {"Speeder", 452},
    {"Squalo", 446},
    {"Tropic", 454},
    {"BF-400", 581},
    {"Faggio", 462},
    {"FCR-900", 521},
    {"Freeway", 463},
    {"HPV1000", 523},
    {"NRG-500", 522},
    {"PCJ-600", 461},
    {"Pizza Boy", 448},
    {"Sanchez", 468},
    {"Wayfarer", 586},
    {"Quadbike", 471},
    }
       
GUIEditor = {
    gridlist = {},
    button = {},
    window = {},
}
addEventHandler("onClientResourceStart", resourceRoot,
    function()
        GUIEditor.window[1] = guiCreateWindow(187, 90, 454, 423, "", false)
        guiWindowSetSizable(GUIEditor.window[1], false)
        guiSetAlpha(GUIEditor.window[1], 1.00)
        guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFF7BB06")
 
        GUIEditor.gridlist[1] = guiCreateGridList(10, 29, 165, 242, false, GUIEditor.window[1])
        guiGridListAddColumn(GUIEditor.gridlist[1], "Playres", 0.9)
        GUIEditor.gridlist[2] = guiCreateGridList(263, 30, 165, 242, false, GUIEditor.window[1])
        guiGridListAddColumn(GUIEditor.gridlist[2], "car", 0.5)
        guiGridListAddColumn(GUIEditor.gridlist[2], "id", 0.5)
        GUIEditor.button[1] = guiCreateButton(12, 287, 171, 25, "انشاء موتر", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFF0000")
        GUIEditor.button[2] = guiCreateButton(10, 319, 171, 25, "نقل الاعب لي الموتر", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFF0000")
        GUIEditor.button[3] = guiCreateButton(10, 354, 171, 25, "نقل الموتر آلى آلاعب", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFFF0000")
        GUIEditor.button[4] = guiCreateButton(262, 286, 171, 25, " +100اعطاء درع", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFFF0000")
        GUIEditor.button[5] = guiCreateButton(263, 317, 171, 25, "اعطاء دم +200", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FFFF0000")
        GUIEditor.button[6] = guiCreateButton(10, 384, 171, 25, "سحب الموتر", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.button[6], "NormalTextColour", "FFFF0000")    
    end
)
 
    function ab()
        for k,v in ipairs(carid) do
            local row = guiGridListAddRow(GUIEditor.gridlist[2])
                guiGridListSetItemText(GUIEditor.gridlist[2],row,1,v,"car",false,false)
                guiGridListSetItemText(GUIEditor.gridlist[2],row,1,v,"id",false,false)
               
    end
end
 
        function aa()
        guiGridListClear(GUIEditor.gridlist[1])
        for i,v in ipairs(getElementsByType("player")) do
            local row = guiGridListAddRow(GUIEditor.gridlist[1])
                guiGridListSetItemText(GUIEditor.gridlist[1],row,1,getPlayerName(v),false,false)
    end
end
                ---------------------------------------------
               
        addEventHandler ( "onClientGUIClick",root)
        function Cvehicle()
        if source == GUIEditor.button[1] then
        triggerServerEvent( 'Cvehicle', localPlayer)
        elseif source == GUIEditor.button[2] then
        triggerServerEvent( 'wrepplayre', localPlayer)
        elseif source == GUIEditor.button[3] then
        triggerServerEvent( 'werpvehicle', localPlayer)
        elseif source == GUIEditor.button[6] then
        triggerServerEvent( 'desvehicle', localPlayer)
        elseif source == GUIEditor.button[5] then
       
Link to comment

guiGridListAddPlayers

الوظيفة تقوم باضافة كل الاعبين الأون لاين بالسيرفر للقريد لست ;

أعرف ان الوظيفة قديمة , ولاكن سويتها على طريقتي وبشكل مرتب وتحققات للتأكد من عمل الفنكشن

Syntax - السنتاكس

bool guiGridListAddPlayers ( element gridList, int columnIndex, bool section, bool number )

Required Arguments - الأرقمنات المطلوبة

* gridList: The grid list element

* columnIndex: Column ID

* section: Determines if the item is a section

* number: Tells whether the text item is a number value or not (used for sorting)

Returns -- ارجاع القيمة

Return all players in a grid list, false otherwise. - يقوم بأرجاع قيمة اسماء الاعبين بالقريد لست

Code - كود الوظيفة

function guiGridListAddPlayers( GridList, Column, Section, Number ) 
    if( getElementType( GridList ) == "gui-gridlist" ) then 
    assert( tonumber( Column ), "Bad argument @ 'guiGridListAddPlayers' [Expected number at argument 2, got " .. tostring(Column) .. "]" ) 
        if( Section == false or Section == true ) then 
            if( Number == false or Number == true ) then 
                for _, player in ipairs( getElementsByType('player') ) do 
                    guiGridListClear( GridList ) 
                        local Row = guiGridListAddRow( GridList ) 
                        guiGridListSetItemText( GridList, Row, Column, getPlayerName(player), Section, Number ) 
                        end  
                    else 
                    error("Bad argument @ 'guiGridListAddPlayers' [Expected boolean at argument 4, got " .. tostring(Number) .. "]") 
                end 
            else 
            error("Bad argument @ 'guiGridListAddPlayers' [Expected boolean at argument 3, got " .. tostring(Section) .. "]") 
        end 
    end 
end 

Example - مثال

This example add all online players in the server to a grid list

  
-- Grid list  
    local screenW, screenH = guiGetScreenSize() 
    Main_GridList = guiCreateGridList((screenW - 233) / 2, (screenH - 357) / 2, 233, 357, false) 
    guiGridListAddColumn(Main_GridList, "Players", 0.9) 
    guiSetVisible( Main_GridList, false ) 
  
-- For show Grid List 
bindKey( "F10", "down", function( ) 
    guiSetVisible( Main_GridList, not guiGetVisible( Main_GridList ) ) 
    showCursor( not isCursorShowing( ) ) 
end ) 
  
-- This command add all players to a grid list 
addCommandHandler( "addPlayers", function( ) 
    guiGridListAddPlayers( Main_GridList, 1, false, false ) 
end ) 
  

Author: MR.GRAND

Hint: This function can be useful, Shortcut way Add to the grid list of players.

في أمان الله تعالى

:)

+

غير اسم الجدول حق السيرات

جربت مازبط ؟؟

حل يجمآعه

Link to comment
function ab() 
     for k,v in ipairs(carid) do 
local column1 = guiGridListAddColumn(GUIEditor.gridlist[2], "car", 0.5) 
local column2 = guiGridListAddColumn(GUIEditor.gridlist[2], "id", 0.5) 
 local row = guiGridListAddRow(GUIEditor.gridlist[2]) 
            guiGridListSetItemText(GUIEditor.gridlist[2],row,column1,v[1] ,false, false) 
            guiGridListSetItemText(GUIEditor.gridlist[2],row,column2,v[2] ,false, false) 
                
  end 
end 
  

مدري اذا صح

راسي مقفل

برب نوم

Link to comment

for i , v in ipairs ( carid ) do 
  
Row = guiGridListAddRow (  gridlist ) 
  
guiGridListSetItemText(  gridlist,Row ,cow1,v[1],false,false); 
  
guiGridListSetItemText(  gridlist,Row ,cow2,v[2],false,false); 
  
guiGridListSetItemData (  gridlist , Row , cow2 , v[2] ,false,false) 
end 
  
function All () 
  
guiGridListClear(GUIEditor.gridlist[1]) 
         
for i,v in ipairs(getElementsByType("player")) do 
            
local row = guiGridListAddRow(GUIEditor.gridlist[1]) 
  
guiGridListSetItemText(  GUIEditor.gridlist[1],row,1,getPlayerName(v),false,false) 
     end 
end 
  

+

if isElement(vehicle) then destroyElement(vehicle) end 
vehicle م هيا معرفه , 
  

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