Jump to content

[duda]SpawnPanel


Recommended Posts

Quisiera saber como hacer que cuando el jugador muera el panel de spawn le salga tengo esto de codigo

x,y = guiGetScreenSize()

JobsWin = guiCreateWindow(x/3 - 170,y/3 - 20,200,320,"Selecciona Tu Equipo",false)

teamsList = guiCreateGridList(0,22,186,255,false,JobsWin)
column = guiGridListAddColumn( teamsList, "Teams", 0.85 )
	
for id, team in ipairs(getElementsByType("team")) do
		local row = guiGridListAddRow ( teamsList )
		guiGridListSetItemText ( teamsList, row, 1, getTeamName ( team ), false, false )
		guiGridListSetItemColor ( teamsList, row, 1, getTeamColor ( team ) )
end

guiWindowSetMovable ( teamsList, false )
guiWindowSetMovable ( JobsWin, false )
guiWindowSetSizable ( teamsList, false )
guiWindowSetSizable ( JobsWin, false )
 
send = guiCreateButton(0,285,90,25,"Seleccionar",false,JobsWin)

CloseButton = guiCreateButton(105,285,90,25,"Cerrar",false,JobsWin)

guiSetVisible(JobsWin, true)
showCursor(true)
setTimer ( showingTeams, 1000, 1)

function close()
if source == CloseButton then
guiSetVisible(JobsWin, false)
showCursor(false)
end
end

addEventHandler ( "onClientGUIClick", root,
function ( button )
if button == "left" then
if source == send then
local row, col = guiGridListGetSelectedItem ( teamsList )
local teamName = guiGridListGetItemText ( teamsList, row, col )
triggerServerEvent ( "onPlayerChooseTeam", getLocalPlayer(), teamName )
end
end
end)

addEventHandler("onClientGUIClick", getResourceRootElement(getThisResource()), close)

 

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