Seth^^

Give someone money

12 posts in this topic

This script is for mARMAcp > RE Editor

If you don't know what mARMAcp is, check out this thread http://exile.majormittens.co.uk/topic/26-marma-server-monitoring-live-map-re/

Say you want to give someone on your server money because they lost a vehicle due to a bug or something along those lines.
Problem is that you're at work and you don't have Arma installed there.

Here's a script that will give 1000$ to "Seth" from "Admin"

["Seth", 1000] spawn {
	_playerName = _this select 0;
	_amount = _this select 1;
  	_admin = 'Admin';
	
	{
		if ((name _x) isEqualTo _playerName) exitWith {
			_currentAccountBalance = _x getVariable ["ExileMoney", 0];
			_currentAccountBalance = _currentAccountBalance + _amount;

			_x setVariable ["ExileMoney", _currentAccountBalance];
			format["setAccountMoney:%1:%2", _currentAccountBalance, getPlayerUID _x] call ExileServer_system_database_query_fireAndForget;
			[_x, "moneyReceivedRequest", [str _currentAccountBalance, _admin]] call ExileServer_system_network_send_to;
		};
	} forEach allPlayers;
};

 

Share this post


Link to post
Share on other sites
Advertisement

Did it work? I wrote this off my head without testing it. But please dont use spawn in there since they will slowly kill your server.

Share this post


Link to post
Share on other sites

Ill give it a shot if i can ever get some players on my server everybody flocks to the big names like CCG and servers like that.  I know they have tons of coders, but give the little guys a chance.

Share this post


Link to post
Share on other sites

Ill give it a shot if i can ever get some players on my server everybody flocks to the big names like CCG and servers like that.  I know they have tons of coders, but give the little guys a chance.

Erm guess again, CCG has 1 developer, me xD

Edited by maca134

Share this post


Link to post
Share on other sites

Erm guess again, CCG has 1 developer, me xD

 

REALLY? With the amount of good stuff that is put out by CCG you would think that they have a team of developers. Well i have to say maca134 job well done sir. Hope i can grow my community as big as yours some day.

Edited by Torchgodz

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.