Diddl3s

[SOLVED] How to update poptabs on database (0.9.8) ?

5 posts in this topic

Hello,

(Apologies if this is in the wrong section)

 

I'm trying to update the poptabs on the database that are earned with exilez. The poptabs increase on zombie kill perfectly but wont update in the database.

A player can force the update by dropping their poptabs on the ground etc... and picking them back up.

Can someone please help me to figure it out?

This is the latest thing I have tried (that doesn't work):

	// Set client's respect and money
	_playerObj setVariable ["ExileScore", _respect];
	_playerObj setVariable ["ExileMoney", _money, true];

	ExileClientPlayerScore = _respect;
	(owner _playerObj) publicVariableClient "ExileClientPlayerScore";
	ExileClientPlayerScore = nil;
	
	// Update client database entry
	format["setAccountMoneyRespect:%1:%2", _respect, (getPlayerUID _playerObj)] call ExileServer_system_database_query_fireAndForget;
	format['setAccountMoneyRespect:%1:%2', _money, _playerObj getVariable ["ExileDatabaseID", 0]] call ExileServer_system_database_query_fireAndForget;

 

Any help is appreciated :)

Edited by Diddl3s
Added solved tags

Share this post


Link to post
Share on other sites

ExileServer_system_trading_network_purchaseVehicleRequest.sqf, line 71-72:

_playerObject setVariable ["ExileMoney", _playerMoney, true];
	format["setPlayerMoney:%1:%2", _playerMoney, _playerObject getVariable ["ExileDatabaseID", 0]] call ExileServer_system_database_query_fireAndForget;

 

Share this post


Link to post
Share on other sites
Advertisement

even with setplayermoney it doesnt update instantly,but the next time you do something poptab related like dropping/taking.

thats what it does for me.

Share this post


Link to post
Share on other sites

@B.A.D.

format["setPlayerMoney:%1:%2", _money, _playerObj getVariable ["ExileDatabaseID", 0]] call ExileServer_system_database_query_fireAndForget;

_playerObject vs _playerObj

The Code above is working for me :)

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.