happydayz 490 Report post Posted November 13, 2015 (edited) Enigma Exile Update Respect/Poptabs Currently with Exile there is no means of updating poptabs/respect of a player from clientside code that saves to the database. This fixes that dilemna. https://github.com/happydayz-enigma/Enigma_Exile_UpdateRP Update: 18/03/16 - Add support for Advanced Banking Say you wanted to add 10000 poptabs to a player - You could try and use: Spoiler _target = player; _playerscore = _target getVariable ['ExileScore', 0]; _newscorevalue = _playerscore + 10000; _target setVariable ['ExileScore', _newscorevalue]; _target setVariable['PLAYER_STATS_VAR',[_target getVariable ['ExileMoney', 0],_newscorevalue],true]; ExileClientPlayerScore = _newscorevalue; (owner _target) publicVariableClient 'ExileClientPlayerScore'; format['setAccountScore:%1:%2', _newscorevalue, (getPlayerUID _target)] call ExileServer_system_database_query_fireAndForget; The player would show that they have an extra 10k poptabs on xm8.....But this would NOT save to the database as call ExileServer_system_database_query_fireAndForget; is NOT a client recognised function. So once player logged off/server restarted they would roll back to their old amount of poptabs/respect. This addon adds the ability to update any players poptabs/respect and save it to the database. HOW TO INSTALL: Spoiler ------------------------------------------------------------------------------------------------------------------------------------------------------ -------------------------------------------------HOW TO INSTALL ENIGMA Update Respect and Poptabs----------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------ First add the startup paramaters @Enigma to your server! Copy the @Enigma Folder to your Server Root! An alternative method is to open the @Enigma\addons folder and transfer any file ending with .pbo into your @ExileServer\addons\ folder where it will be loaded up automatically. HOW TO USE: Then in any of your scripts that you run on a client you can simply run the following code: // _addrespect = Whatever total value you want it to be! //example --- _addpoptabs = 10000; _newScore = ExileClientPlayerScore + _addrespect; ENIGMA_UpdateStats = [player,0,_newScore]; publicVariableServer "ENIGMA_UpdateStats"; //_addpoptabs = Whatever you want it to be! // example --- _addpoptabs = 10000; _newPoptabs = ExileClientPlayerMoney + _addpoptabs; ENIGMA_UpdateStats = [player,_newPoptabs]; publicVariableServer "ENIGMA_UpdateStats"; //You can remove respect or poptabs simply by changing the plus to a minus! HOW TO USE: Then in any of your scripts that you run on a client you can simply run the following code: Spoiler // _addrespect = Whatever total value you want it to be! //example --- _addpoptabs = 10000; _newScore = ExileClientPlayerScore + _addrespect; ENIGMA_UpdateStats = [player,0,_newScore]; publicVariableServer "ENIGMA_UpdateStats"; //_addpoptabs = Whatever you want it to be! // example --- _addpoptabs = 10000; _newPoptabs = ExileClientPlayerMoney + _addpoptabs; ENIGMA_UpdateStats = [player,_newPoptabs]; publicVariableServer "ENIGMA_UpdateStats"; //You can remove respect or poptabs simply by changing the plus to a minus! Edited March 18, 2016 by happydayz Update 2 Share this post Link to post Share on other sites
Kellojo 34 Report post Posted November 13, 2015 (edited) Thank you for your fast reply and your upload. Just as a thought why not execute the ExileServer_system_database_query_fireAndForget via a remote exec call ?Haven't tested it but this could work://Add 1000 poptabs _target = player; _money = ExileClientPlayerMoney + 1000; ExileClientPlayerMoney = ExileClientPlayerMoney + 1000; _target setVariable['PLAYER_STATS_VAR',[_money,_target getVariable ['ExileScore', 0]],true]; format['setAccountMoney:%1:%2', _money, (getPlayerUID _target)] remoteExecCall ["ExileServer_system_database_query_fireAndForget",2,false]; Edited November 13, 2015 by Kellojo Share this post Link to post Share on other sites
BetterDeadThanZed 1006 Report post Posted November 14, 2015 (edited) I'm sure most of the server admins out there use Infistar and with that you can add poptabs that save to the database or is this intended to be used with a script that rewards poptabs to a player for something?. Edited November 14, 2015 by BetterDeadThanZed Share this post Link to post Share on other sites
happydayz 490 Report post Posted November 14, 2015 use with custom scripts 1 Share this post Link to post Share on other sites
Diddl3s 13 Report post Posted December 12, 2015 Hi Happydayz, Is this working since the new update? Perhaps I am just doing something wrong either Share this post Link to post Share on other sites
Dizzturbed 98 Report post Posted December 18, 2015 this is great learning stuff for me, thanks a lot =) as for compatibility with the latest update you can check the old and current ExileServer_system_database_query_fireAndForget and see if there are any changes Share this post Link to post Share on other sites
happydayz 490 Report post Posted March 18, 2016 Added support for Advanced banking. Remove any old version of Enigma_exile_custom you have and install the new version (includes name change) 1 Share this post Link to post Share on other sites
kenzo47 0 Report post Posted June 16, 2016 On 3/17/2016 at 9:41 AM, happydayz said: Added support for Advanced banking. Remove any old version of Enigma_exile_custom you have and install the new version (includes name change) Hello, when I use your example script my total money get's set to the amount that I want to be added. _addpoptabs = 10000; _newPoptabs = ExileClientPlayerMoney + _addpoptabs; ENIGMA_UpdateStats = [player,_newPoptabs]; publicVariableServer "ENIGMA_UpdateStats"; Instead of adding 10000 poptabs it sets my total amount to 10000. I'm trying to make a paycheck script but I'm kinda stuck. Share this post Link to post Share on other sites
Mr Salt 8 Report post Posted July 7, 2016 Will there be an update to get this to work with the new exile kiwi build? Share this post Link to post Share on other sites
Guest Report post Posted October 26, 2016 Hi, this script still working? Or someone can giveme a link with instructions or point me in correct direction to update poptabs with the easiest way? Share this post Link to post Share on other sites