Jump to content

[HELP] GridList


Cassè

Recommended Posts

Posted

I'm gonna explain different way. Think a grid list with filled by players. When a player dies, that player will be removed from gridlist automatically.

Posted
'onPlayerWasted'
triggerClientEvent
guiGridListClear
getElementsByType -- loop 'player'
guiGridListAddRow
getPlayerName
guiGridListSetItemText

 

Posted
3 hours ago, -Ilker. said:

'onPlayerWasted'
triggerClientEvent
guiGridListClear
getElementsByType -- loop 'player'
guiGridListAddRow
getPlayerName
guiGridListSetItemText

 

Türk müsün merak ettim. İşe yaradı bu arada, yardımın için teşekkürler.

if you didn't understand text above, just forget it. Thanks for your help. It worked.

 

  • Haha 1
Posted

@Cassè , you can use this code without trigger =]

addEventHandler ( 'onClientPlayerWasted' , root ,
	function ( )
		local Id = 0
		while ( Id <= guiGridListGetRowCount( GridList ) ) do
			if ( guiGridListGetItemText ( GridList , Id , 1 ) == getPlayerName ( source ) ) then
				guiGridListRemoveRow ( GridList , Id )
			end 
			Id = Id + 1
		end
	end 
)
  • Like 1

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