AliAlanzi Posted October 12, 2017 Share Posted October 12, 2017 انا مسوي لوحه بس لمن اكتب الامر ما تفتح اللوحه addEventHandler("onClientResourceStart", resourceRoot, function() window1 = guiCreateWindow(509, 175, 311, 452, "Revive Panel", false) guiWindowSetSizable(window1, false) guiSetVisible( window1 ,false) gridlist = guiCreateGridList(13, 26, 288, 341, false, window1) guiGridListAddColumn(gridlist, "Players", 0.9) Button1 = guiCreateButton(17, 379, 139, 63, "Revive Player", false, window1) Button2 = guiCreateButton(166, 379, 135, 63, "Close", false, window1) guiGridListClear(gridlist) end ) addCommandHandler('rp', function () guiSetVisible(window1,not guiSetVisible(window1)) showCursor(guiGetVisible(window1)) changeGridListToPlayersAround ( gridlist, 1, 5 ) end ) addEventHandler ( "onClientGUIClick",root, function () if (source == Button2) then guiSetVisible( window1 ,false) showCursor(false) end end ) addEventHandler ( "onClientGUIClick",root, function () if (source == Button1) then guiSetVisible( window1 ,false) showCursor(false) setElementHealth ( player,100) else outputChatBox("Error", source, 255, 0, 0) end end ) function isElementInRange(ele, x, y, z, range) if isElement(ele) and type(x) == "number" and type(y) == "number" and type(z) == "number" and type(range) == "number" then return getDistanceBetweenPoints3D(x, y, z, getElementPosition(ele)) <= range - end return false end function changeGridListToPlayersAround ( gridlist, column, range ) if type ( column ) == 'number' and type ( range ) == 'number' and getElementType ( gridlist ) == 'gui-gridlist' then guiGridListClear ( gridlist ) for i,v in ipairs ( getElementsByType ( 'player' ) ) do if ( v == getLocalPlayer ( ) ) then return end local x,y,z = getElementPosition ( localPlayer ) if isElementInRange ( v, x, y, z, range ) then local row = guiGridListAddRow ( gridlist ) guiGridListSetItemText ( gridlist, row, column, getPlayerName ( v ), false, false ) end end return true else return false end end function refreshgirdlist () for _,v in ipairs ( getElementsByType ( "player" ) ) do x,y,z = getElementPosition(localPlayer) x1,y1,z1 = getElementPosition(v) Distance = getDistanceBetweenPoints3D (x,y,z,x1,y1,z1) if Distance <= 50 then end Link to comment
Rockyz Posted October 12, 2017 Share Posted October 12, 2017 (edited) Deleted Edited October 12, 2017 by #,+( _xiRoc[K]; > Link to comment
AliAlanzi Posted October 12, 2017 Author Share Posted October 12, 2017 5 hours ago, Abdul KariM said: ركز وش الغلط مافي شي هذا كود عشان يفتح اللوحه 1 Link to comment
MR.StoRm Posted October 12, 2017 Share Posted October 12, 2017 25 minutes ago, Ghost-Gamer said: وش الغلط مافي شي هذا كود عشان يفتح اللوحه -_-" يصير كذا : guiSetVisible(window1,not guiGetVisible(window1)) 1 Link to comment
+Source|> Posted October 13, 2017 Share Posted October 13, 2017 12 hours ago, MR.StoRm said: -_-" يصير كذا : guiSetVisible(window1,not guiGetVisible(window1)) طيب وش الجدييد كتبتها نفسها جرب داا addCommandHandler('rp', function () if guiGetVisible( window1 ) then guiSetVisible( window1, false ) showCursor(false) else guiSetVisible( window1, true ) showCursor(true) changeGridListToPlayersAround ( gridlist, 1, 5 ) end end ) 1 1 Link to comment
MR.StoRm Posted October 13, 2017 Share Posted October 13, 2017 (edited) طيب وش الجدييد كتبتها نفسها -_-" guiSetVisible(window1,not guiSetVisible(window1)) الصح :guiSetVisible(window1,not guiGetVisible(window1)) @Source|> Edited October 13, 2017 by MR.StoRm 1 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