Jump to content

Update the stat problem


Recommended Posts

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

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

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