Tete omar Posted June 6, 2012 Share Posted June 6, 2012 hey guys i made a gridlist with players ok ? when i select my my self and my serial show up into a label but when i choose a new player i find the same serial just like the serial was freezed on me only here's my code function onClick () selectedRow, selectedCol = guiGridListGetSelectedItem( GUIEditor_Grid[1]) hisName = guiGridListGetItemText( GUIEditor_Grid[1], selectedRow, selectedCol ) hisSerial = getPlayerSerial( GUIEditor_Grid[1], selectedRow, selectedCol ) hisMoney = getPlayerMoney( GUIEditor_Grid[1], selectedRow, selectedCol ) hisPing = getPlayerPing( GUIEditor_Grid[1], selectedRow, selectedCol ) guiSetText ( GUIEditor_Label[7], tostring(hisName)) guiSetText ( GUIEditor_Label[9], tostring(hisSerial)) guiSetText ( GUIEditor_Label[12], tostring(hisMoney)) guiSetText ( GUIEditor_Label[12], tostring(hisPing)) end addEventHandler( "onClientGUIClick", GUIEditor_Grid[1], onClick) Link to comment
Castillo Posted June 6, 2012 Share Posted June 6, 2012 The main reason is that getPlayerSerial client side just returns the local player, it doesn't has a player argument. Same as money, also there you're trying to get it from a GUI-element, not a player? Link to comment
FWCentral Posted June 6, 2012 Share Posted June 6, 2012 hisName = guiGridListGetItemText( GUIEditor_Grid[1], selectedRow, selectedCol ) local pl = getPlayerFromName(hisName) hisSerial = getPlayerSerial( pl ) hisMoney = getPlayerMoney( pl ) hisPing = getPlayerPing( pl ) Link to comment
JR10 Posted June 6, 2012 Share Posted June 6, 2012 Just wondering, did you even read Castillo's post? He clearly said that getPlayerSerial and getPlayerMoney have no player argument. hisName = guiGridListGetItemText( GUIEditor_Grid[1], selectedRow, selectedCol ) local pl = getPlayerFromName(hisName) hisSerial = getPlayerSerial( ) hisMoney = getPlayerMoney( ) hisPing = getPlayerPing( pl ) Link to comment
Tete omar Posted June 7, 2012 Author Share Posted June 7, 2012 Yeah i have read .. but i wasn't have anything to say except thanks for help guys. Link to comment
JR10 Posted June 7, 2012 Share Posted June 7, 2012 I was talking to FWCentral. And you're welcome. Link to comment
FWCentral Posted June 7, 2012 Share Posted June 7, 2012 My bad i was asleep and no i obviously didn't read it. 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