Tete omar Posted June 6, 2012 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)
Castillo Posted June 6, 2012 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? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
FWCentral Posted June 6, 2012 Posted June 6, 2012 hisName = guiGridListGetItemText( GUIEditor_Grid[1], selectedRow, selectedCol ) local pl = getPlayerFromName(hisName) hisSerial = getPlayerSerial( pl ) hisMoney = getPlayerMoney( pl ) hisPing = getPlayerPing( pl )
JR10 Posted June 6, 2012 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 ) Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
Tete omar Posted June 7, 2012 Author Posted June 7, 2012 Yeah i have read .. but i wasn't have anything to say except thanks for help guys.
JR10 Posted June 7, 2012 Posted June 7, 2012 I was talking to FWCentral. And you're welcome. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
FWCentral Posted June 7, 2012 Posted June 7, 2012 My bad i was asleep and no i obviously didn't read it.
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