Ac[T]ioN Posted May 17, 2015 Share Posted May 17, 2015 السلام عليكم ورحمة الله وبركاتة شباب انا مسوي سكربت وأظن فيه لخبطة كثييييييييييير أرجو منكم مساعدتي وتقولوا لي وش الخطا عشان أفهم Client: addEventHandler('onClientGUIClick',root, function Spawn () local grid = guiCreateGridList ( 306,161,199,309, true ) local columnA = guiGridListAddColumn ( grid, "Title", 0.85 ) rowA = guiGridListAddRow ( grid ) rowB = guiGridListAddRow ( grid ) guiGridListSetItemText ( myGridList, rowA, columnA, "Spawn", false, false ) guiGridListSetItemText ( myGridList, rowB, columnA, "Spawn2", false, false ) local SpawnName = guiGridListGetItemText ( grid, guiGridListGetSelectedItem ( grid ), 1 ) setElementData ( Player, "Spawncite", SpawnName ) end ) addEventHandler("onClientResourceStart", Spawn) Server: function Spawncite ( ) setElementData ( source, "Spawncite", getTickCount() ) players = getElementsByType ( "player" ) for playerKey, playerValue in ipairs(players) do spawnPlayer ( playerValue, 0.0, 0.0, 5.0, 90.0, 0 ) end end addEventHandler ( "onPlayerWasted", getRootElement(), Spawncite ) وشكراً لكم Link to comment
The Killer Posted May 17, 2015 Share Posted May 17, 2015 (edited) function Spawn () local grid = guiCreateGridList ( 306,161,199,309, false ) local columnA = guiGridListAddColumn ( grid, "Title", 0.85 ) rowA = guiGridListAddRow ( grid ) rowB = guiGridListAddRow ( grid ) guiGridListSetItemText ( grid, rowA, columnA, "Spawn", false, false ) guiGridListSetItemText ( grid, rowB, columnA, "Spawn2", false, false ) local SpawnName = guiGridListGetItemText ( grid, guiGridListGetSelectedItem ( grid ), 1 ) setElementData ( localPlayer, "Spawncite", SpawnName ) end addEventHandler("onClientResourceStart", root, Spawn) function Spawncite ( ) setElementData ( source, "Spawncite", getTickCount() ) local players = getElementsByType ( "player" ) for playerKey, playerValue in ipairs(players) do spawnPlayer ( playerValue, 0.0, 0.0, 5.0, 90.0, 0 ) end end addEventHandler ( "onPlayerWasted", root, Spawncite ) Edited May 17, 2015 by Guest Link to comment
Ac[T]ioN Posted May 17, 2015 Author Share Posted May 17, 2015 function Spawn () local grid = guiCreateGridList ( 306,161,199,309, true ) local columnA = guiGridListAddColumn ( grid, "Title", 0.85 ) rowA = guiGridListAddRow ( grid ) rowB = guiGridListAddRow ( grid ) guiGridListSetItemText ( myGridList, rowA, columnA, "Spawn", false, false ) guiGridListSetItemText ( myGridList, rowB, columnA, "Spawn2", false, false ) local SpawnName = guiGridListGetItemText ( grid, guiGridListGetSelectedItem ( grid ), 1 ) setElementData ( localPlayer, "Spawncite", SpawnName ) end addEventHandler("onClientResourceStart", root, Spawn) function Spawncite ( ) setElementData ( source, "Spawncite", getTickCount() ) local players = getElementsByType ( "player" ) for playerKey, playerValue in ipairs(players) do spawnPlayer ( playerValue, 0.0, 0.0, 5.0, 90.0, 0 ) end end addEventHandler ( "onPlayerWasted", root, Spawncite ) أخوي ليش الجريد ليست مايظهر ؟ Link to comment
The Killer Posted May 17, 2015 Share Posted May 17, 2015 function Spawn () local grid = guiCreateGridList ( 306,161,199,309, false ) local columnA = guiGridListAddColumn ( grid, "Title", 0.85 ) rowA = guiGridListAddRow ( grid ) rowB = guiGridListAddRow ( grid ) guiGridListSetItemText ( grid, rowA, columnA, "Spawn", false, false ) guiGridListSetItemText ( grid, rowB, columnA, "Spawn2", false, false ) local SpawnName = guiGridListGetItemText ( grid, guiGridListGetSelectedItem ( grid ), 1 ) setElementData ( localPlayer, "Spawncite", SpawnName ) end addEventHandler("onClientResourceStart", root, Spawn) function Spawncite ( ) setElementData ( source, "Spawncite", getTickCount() ) local players = getElementsByType ( "player" ) for playerKey, playerValue in ipairs(players) do spawnPlayer ( playerValue, 0.0, 0.0, 5.0, 90.0, 0 ) end end addEventHandler ( "onPlayerWasted", root, Spawncite ) Link to comment
Ac[T]ioN Posted May 17, 2015 Author Share Posted May 17, 2015 أخوي تمام ظهر + الحين هو مكتوب فيه Spwn , Spwn 2 أبي لما يختار سبون ويضغط علي الزر ينقله لمكان بعد لما يموت Link to comment
Ac[T]ioN Posted May 17, 2015 Author Share Posted May 17, 2015 هو السكربت كامل أبغي أعرف بس وش باقي عشان يكون مثل ماقولت لك Link to comment
The Killer Posted May 17, 2015 Share Posted May 17, 2015 (edited) جرب كذا طيب Button = guiCreateButton(319,477,173,53,"",false) function Spawn () grid = guiCreateGridList ( 306,161,199,309, false ) local columnA = guiGridListAddColumn ( grid, "Title", 0.85 ) rowA = guiGridListAddRow ( grid ) rowB = guiGridListAddRow ( grid ) guiGridListSetItemText ( grid, rowA, columnA, "Spawn", false, false ) guiGridListSetItemText ( grid, rowB, columnA, "Spawn2", false, false ) local SpawnName = guiGridListGetItemText ( grid, guiGridListGetSelectedItem ( grid ), 1 ) setElementData ( localPlayer, "Spawncite", SpawnName ) end addEventHandler("onClientResourceStart", resourceRoot, Spawn) addEventHandler ("onClientGUIClick", resourceRoot, function () if (source == Button) then local row, col = guiGridListGetSelectedItem (grid) local text = guiGridListGetItemText (grid, row, col) if (text and text ~= "") then setElementData (localPlayer, "Spawncite", text) end end end ) Edited May 17, 2015 by Guest Link to comment
Ac[T]ioN Posted May 17, 2015 Author Share Posted May 17, 2015 تقدر تسويها كذا if getElementData (source, "Spawncite") == "Spawn" then spawnPlayer (x,y,z) elseif getElementData (source, "Spawncite") == "Spawn2" then spawnPlayer (x,y,z) end او انك تسوي جدول, فهذي اسهل لك function Spawncite ( ) if getElementData (source, "Spawncite") == "Spawn" then spawnPlayer (source, 0.0, 0.0, 5.0, 90.0, 0) elseif getElementData (source, "Spawncite") == "Spawn2" then spawnPlayer (source, 0.0, 0.0, 5.0, 90.0, 0) end end addEventHandler ("onPlayerWasted", root, Spawncite) بجربه وبعطيك خبر وعلي كل حال شكراً لك ياخوي ماقصرت والله Link to comment
Ac[T]ioN Posted May 17, 2015 Author Share Posted May 17, 2015 أخوي معلش تعتبك معي أنا الحين سويت الزر كيف أربطه بالجريد ليست يعني لما تختار شئ من الجريد ليست وتضغط علي الزر الحدث يحصل Button = guiCreateButton(319,477,173,53,"",false) function Spawn () local grid = guiCreateGridList ( 306,161,199,309, false ) local columnA = guiGridListAddColumn ( grid, "Title", 0.85 ) rowA = guiGridListAddRow ( grid ) rowB = guiGridListAddRow ( grid ) guiGridListSetItemText ( grid, rowA, columnA, "Spawn", false, false ) guiGridListSetItemText ( grid, rowB, columnA, "Spawn2", false, false ) local SpawnName = guiGridListGetItemText ( grid, guiGridListGetSelectedItem ( grid ), 1 ) setElementData ( localPlayer, "Spawncite", SpawnName ) end addEventHandler("onClientResourceStart", root, Spawn) function Spawncite ( ) if getElementData (source, "Spawncite") == "Spawn" then spawnPlayer (source, 1846.18262, 845.95850, 9.71960) elseif getElementData (source, "Spawncite") == "Spawn2" then spawnPlayer (source, 0.0, 0.0, 5.0, 90.0, 0) end end addEventHandler ("onPlayerWasted", root, Spawncite) Link to comment
The Killer Posted May 17, 2015 Share Posted May 17, 2015 addEventHandler ("onClientGUIClick", resourceRoot, function () if (source == Button) then -- Your code end end ) Link to comment
Ac[T]ioN Posted May 17, 2015 Author Share Posted May 17, 2015 Button = guiCreateButton(319,477,173,53,"",false) addEventHandler ("onClientGUIClick", resourceRoot, function () if (source == Button) then function Spawn () local grid = guiCreateGridList ( 306,161,199,309, false ) local columnA = guiGridListAddColumn ( grid, "Title", 0.85 ) rowA = guiGridListAddRow ( grid ) rowB = guiGridListAddRow ( grid ) guiGridListSetItemText ( grid, rowA, columnA, "Spawn", false, false ) guiGridListSetItemText ( grid, rowB, columnA, "Spawn2", false, false ) local SpawnName = guiGridListGetItemText ( grid, guiGridListGetSelectedItem ( grid ), 1 ) setElementData ( localPlayer, "Spawncite", SpawnName ) end end end ) addEventHandler("onClientResourceStart", root, Spawn) كذا صح ؟ Link to comment
The Killer Posted May 17, 2015 Share Posted May 17, 2015 Button = guiCreateButton(319,477,173,53,"",false) function Spawn () local grid = guiCreateGridList ( 306,161,199,309, false ) local columnA = guiGridListAddColumn ( grid, "Title", 0.85 ) rowA = guiGridListAddRow ( grid ) rowB = guiGridListAddRow ( grid ) guiGridListSetItemText ( grid, rowA, columnA, "Spawn", false, false ) guiGridListSetItemText ( grid, rowB, columnA, "Spawn2", false, false ) local SpawnName = guiGridListGetItemText ( grid, guiGridListGetSelectedItem ( grid ), 1 ) setElementData ( localPlayer, "Spawncite", SpawnName ) end addEventHandler("onClientResourceStart", resourceRoot, Spawn) addEventHandler ("onClientGUIClick", resourceRoot, function () if (source == Button) then local row, col = guiGridListGetSelectedItem (grid) local text = guiGridListGetItemText (grid, row, col) if (text and text ~= "") then setElementData (localPlayer, "Spawncite", text) end end end ) Link to comment
Ac[T]ioN Posted May 17, 2015 Author Share Posted May 17, 2015 Button = guiCreateButton(319,477,173,53,"",false) function Spawn () local grid = guiCreateGridList ( 306,161,199,309, false ) local columnA = guiGridListAddColumn ( grid, "Title", 0.85 ) rowA = guiGridListAddRow ( grid ) rowB = guiGridListAddRow ( grid ) guiGridListSetItemText ( grid, rowA, columnA, "Spawn", false, false ) guiGridListSetItemText ( grid, rowB, columnA, "Spawn2", false, false ) local SpawnName = guiGridListGetItemText ( grid, guiGridListGetSelectedItem ( grid ), 1 ) setElementData ( localPlayer, "Spawncite", SpawnName ) end addEventHandler("onClientResourceStart", resourceRoot, Spawn) addEventHandler ("onClientGUIClick", resourceRoot, function () if (source == Button) then local row, col = guiGridListGetSelectedItem (grid) local text = guiGridListGetItemText (grid, row, col) if (text and text ~= "") then setElementData (localPlayer, "Spawncite", text) end end end ) كلير إخترت Spwn وإنتحرت ليش مارحت المكان اللي إخترته للعلم أنا مشغل الـ play هل عليه تأثير؟ Link to comment
Ac[T]ioN Posted May 17, 2015 Author Share Posted May 17, 2015 اكيد ,# قفلت البلاي وجربت ماضبط Link to comment
The Killer Posted May 17, 2015 Share Posted May 17, 2015 طيب جرب كذا Button = guiCreateButton(319,477,173,53,"",false) function Spawn () grid = guiCreateGridList ( 306,161,199,309, false ) local columnA = guiGridListAddColumn ( grid, "Title", 0.85 ) rowA = guiGridListAddRow ( grid ) rowB = guiGridListAddRow ( grid ) guiGridListSetItemText ( grid, rowA, columnA, "Spawn", false, false ) guiGridListSetItemText ( grid, rowB, columnA, "Spawn2", false, false ) local SpawnName = guiGridListGetItemText ( grid, guiGridListGetSelectedItem ( grid ), 1 ) setElementData ( localPlayer, "Spawncite", SpawnName ) end addEventHandler("onClientResourceStart", resourceRoot, Spawn) addEventHandler ("onClientGUIClick", resourceRoot, function () if (source == Button) then local row, col = guiGridListGetSelectedItem (grid) local text = guiGridListGetItemText (grid, row, col) if (text and text ~= "") then setElementData (localPlayer, "Spawncite", text) end end end ) Link to comment
Ac[T]ioN Posted May 17, 2015 Author Share Posted May 17, 2015 طيب جرب كذا Button = guiCreateButton(319,477,173,53,"",false) function Spawn () grid = guiCreateGridList ( 306,161,199,309, false ) local columnA = guiGridListAddColumn ( grid, "Title", 0.85 ) rowA = guiGridListAddRow ( grid ) rowB = guiGridListAddRow ( grid ) guiGridListSetItemText ( grid, rowA, columnA, "Spawn", false, false ) guiGridListSetItemText ( grid, rowB, columnA, "Spawn2", false, false ) local SpawnName = guiGridListGetItemText ( grid, guiGridListGetSelectedItem ( grid ), 1 ) setElementData ( localPlayer, "Spawncite", SpawnName ) end addEventHandler("onClientResourceStart", resourceRoot, Spawn) addEventHandler ("onClientGUIClick", resourceRoot, function () if (source == Button) then local row, col = guiGridListGetSelectedItem (grid) local text = guiGridListGetItemText (grid, row, col) if (text and text ~= "") then setElementData (localPlayer, "Spawncite", text) end end end ) أخوي تمام ضبط والله وشكراً لك ، أسف تعتبك معي كثييييييييييييييييييييييييييير Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now