covox

get player score

6 posts in this topic

sooo, I am an extreme novice when it comes to any kind of coding. I've pieced some things together from various scripts, mods, etc. I've figured out how to modify various scripts, mods, etc to my liking.

That being said, I know how to get the reputation or score from a player once theyre in game. But what about at the spawn select screen? I can get the uid, which makes sense, but when I try to get the score from the player that's looking at the list of spawn points, it will only return 0. The only thing I can think of is because the player isn't actually loaded yet?

ExileClientPlayerScore returns 0.

as well as _pscore = (player getVariable ["ExileScore", 0]);

I've dug through the client side code and I haven't found anything that would help. I've looked through the server side code and have found:

_accountData = format["getAccountStats:%1", _playerUID] call ExileServer_system_database_query_selectSingle;

but from my limited understanding, that wouldnt work from the client side.

I also saw that there is ExileClient_System_network_send. but im just unsure if that's something that can be used with the database query?

 

I try to learn this stuff on my own, ive read numerous posts on here, I look at the arma 3 wiki a lot, I pick apart the scripts and mods im currently using, I even have a co-worker that is a programmer helping me out once in a great while when he has time. Ran out of ideas and this where I've ended up.  Thanks for any help / direction pointing / etc

 

Share this post


Link to post
Share on other sites
Advertisement

Im looking to do 2 things, which involve base spawning:
1. have a minimum amount of rep to get the option to base spawn.
2. cost an X amount of rep to base spawn.

Share this post


Link to post
Share on other sites
On 3/10/2017 at 2:59 AM, covox said:

I've pieced some things together from various scripts, mods, etc. I've figured out how to modify various scripts, mods, etc to my liking.

Might wanna check what Andrew did on his Aircraftspawn script - just as an inspiration, i'm pretty sure lookin at modify he did on following two files, will give you an idea how to implement what you'r lookin for.

ExileServer_object_player_network_hasPlayerRequest.sqf
ExileClient_object_player_network_hasPlayerResponse.sqf   

 

 

Edited by WURSTKETTE

Share this post


Link to post
Share on other sites
On 3/10/2017 at 5:32 PM, covox said:


1. have a minimum amount of rep to get the option to base spawn.
 

_respect = ExileClientPlayerScore;
if(_respect < 5000) then
{
	do this;
}
else
{
	do that;
};

 

Edited by MGTDB

Share this post


Link to post
Share on other sites
Advertisement

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.