Author Topic: Get Client Points?  (Read 1375 times)

How would one retrieve how many points a client has? This has to be client-sided, not server-sided.

For example, echo that Jeep has X amount of points.

-Jeep

can't find the goddamned post i want...

loop through the lines in the player list gui you get when you press f2.

then getField()
on the one you want. 0 is the SA/A part, 1 is the name, 2 is bl_id (?), 3 is score(?)

To find out the control look through tree();
Alternatively, just grab the mission editor and do it that way.

%client.score?
Didn't see the client-sided part.


So what function is called for the player list score? I know there is newPlayerListGUI::updateScore(%this, %client, %score) but that is only called when the player list is opened.

None. Just read the value from the list.

None. Just read the value from the list.
But is there a function for when that happens?

But is there a function for when that happens?

.. what.

What do you want to do? Get a player's score?

This might help as a resource
https://dl.dropbox.com/u/20459676/Client_FetchAll.zip

Code: [Select]
function getscore(%name)
{
for(%a=0; %a<npl_list.rowcount(); %a++)
{
if(getfield(npl_list.getrowtext(%a), 1) $= %name)
return getfield(npl_list.getrowtext(%a), 2);
}
return -1;
}

.. what.

What do you want to do? Get a player's score?
He wants to know if there's a function thats called the MOMENT a players score is changed.

Once in a while, open and instantly close the player GUI by script. Check newPlayerListGUI::updateScore(%this, %client, %score) stuff.

Once in a while, open and instantly close the player GUI by script. Check newPlayerListGUI::updateScore(%this, %client, %score) stuff.
I know there is newPlayerListGUI::updateScore(%this, %client, %score) but that is only called when the player list is opened.
Is there a function called instantly when your score changes?

Is there a function called instantly when your score changes?
when it changes on the server side?
no. you have to open the gui and query the server for the update score list.

almost nothing is instant
so, what's your frame of instant? one second? 33 miliseconds? just make a loop to query the server based on your time frame of instant