Jump to content

Recommended Posts

Today a player came to me and told me he had 600 milion on his bank :P

Asked him how he got all those coins and he told me the following:

 

When you check an AI's wallet and take some coins, check the wallet again and it tells you: Took 0 coins from ......

 

On that moment, the players money turns to 0 and when he goes to a bank, he can deposit unlimited amounts of coins.

 

If, after the above, he buys stuff, his money will go negative.

 

 

Big problem i think, so is there any fix for this?

Its not only works with AI. With players too.. Need to Check Wallet a lot of times, then your _cashMoney = scalar ... not numbers.. it will be "scalar". And u can make with this scalar what u want. Place in bank a 99999999999 money. Your wallet will be OK after your die. And if ull check wallet of ur coprse, ull get "scalar" again..

 

Dont know too how to fix it.

Share this post


Link to post
Share on other sites

Post in the OP for SC 2.0   Zupa and PeterBeer are good about providing any needed support for the mod there.

 

PS: Try not to openly post an exploit! xD  That's how these things get spread around. Try a PM to the script writer 1st, and if all else fails, then post public.

Share this post


Link to post
Share on other sites

Have dirty fix for all this :)

fn_selfActions.sqf - Find following:

if (_isMan && !_isZombie && !_isAnimal) then {
			_player_studybody = true;
		}

Replace to this:


if (_isMan && !_isZombie && !_isAnimal && _ownerID != "0") then {
			_player_studybody = true;
		}

And this is my check_wallet.sqf

private ["_body", "_hisMoney", "_myMoney", "_killsH", "_test2", "_headShots", "_test","_playeridke","_humanity"];

_body = _this select 3;
_walletCheck = _body getVariable ["cashMoney",0];
_PlayerNear = _body call dze_isnearest_player;

if (_walletCheck == 0) exitWith {cutText [format["Wallet is empty."], "PLAIN DOWN"]};
if (_PlayerNear) exitWith {cutText [localize "str_pickup_limit_4", "PLAIN DOWN"]};

_name = _body getVariable ["bodyName","unknown"];
_hisMoney = _body getVariable ["cashMoney",0];
_myMoney = player getVariable ["cashMoney",0];
_myMoney = _myMoney + _hisMoney;
_body setVariable ["cashMoney", 0 , true];

player setVariable ["cashMoney", _myMoney , true];

systemChat format ['You took %1 Credits, From: %2 !',_hisMoney,_name];
sleep 2;

_cid =	player getVariable ["CharacterID","0"];
_cashMoney = player getVariable ["cashMoney",0];

if(_cashMoney > 0) then{

} else {

_cashMoney = 0;

};

 

Share this post


Link to post
Share on other sites
10 hours ago, KoTaS said:

Have dirty fix for all this :)

fn_selfActions.sqf - Find following:

if (_isMan && !_isZombie && !_isAnimal) then {
			_player_studybody = true;
		}

Replace to this:


if (_isMan && !_isZombie && !_isAnimal && _ownerID != "0") then {
			_player_studybody = true;
		}

And this is my check_wallet.sqf

private ["_body", "_hisMoney", "_myMoney", "_killsH", "_test2", "_headShots", "_test","_playeridke","_humanity"];

_body = _this select 3;
_walletCheck = _body getVariable ["cashMoney",0];
_PlayerNear = _body call dze_isnearest_player;

if (_walletCheck == 0) exitWith {cutText [format["Wallet is empty."], "PLAIN DOWN"]};
if (_PlayerNear) exitWith {cutText [localize "str_pickup_limit_4", "PLAIN DOWN"]};

_name = _body getVariable ["bodyName","unknown"];
_hisMoney = _body getVariable ["cashMoney",0];
_myMoney = player getVariable ["cashMoney",0];
_myMoney = _myMoney + _hisMoney;
_body setVariable ["cashMoney", 0 , true];

player setVariable ["cashMoney", _myMoney , true];

systemChat format ['You took %1 Credits, From: %2 !',_hisMoney,_name];
sleep 2;

_cid =	player getVariable ["CharacterID","0"];
_cashMoney = player getVariable ["cashMoney",0];

if(_cashMoney > 0) then{

} else {

_cashMoney = 0;

};

 

omg i've been messing around trying to figure this out for the past few days...thank you thank you thank you

If i read correctly the selfactions changes it so you can only recover money from yourself, correct?

I have my AIs give you money when you kill them, like the humanity.  I wanted to remove the check wallet option only from AIs.

Share this post


Link to post
Share on other sites
10 hours ago, KoTaS said:
&& _ownerID != "0"

In selfAction makes so only charracter with ID see option to Check Wallet, this makes so no AI Bots have option Check Wallet on them.

its been tested and i dont get the option to check wallet on my corpse.  Would it be because im using plot 4 life?

I tried removing the != "0" and it did the same thing.

Thanks in advance

 

EDIT: so it seems it must be plot for life.  I had to change the 

&& _ownerID != "0"

to

&& _characterID != "0"

Many thx

Share this post


Link to post
Share on other sites

Iam glad you found even more solutions for fellow server owners :)

This one is my check_wallet.sqf and its modded for my server, but what it does is check in dead player body / Dead AI's for coins and if it has 0 coins it will give "Wallet is empty" message and exits the further script code so he wont bug coins with 0 again as mentioned in this topic with AI's

Spoiler
private ["_body", "_hisMoney", "_myMoney"];

_body = _this select 3;
_walletCheck = _body getVariable ["cashMoney",0];
_PlayerNear = _body call dze_isnearest_player;

if (_walletCheck == 0) exitWith {cutText ["Wallet is empty.", "PLAIN DOWN"];};
if (_PlayerNear) exitWith {cutText [localize "str_pickup_limit_4", "PLAIN DOWN"]};

_name = _body getVariable ["bodyName","unknown"];
_hisMoney = _body getVariable ["cashMoney",0];
_myMoney = player getVariable ["cashMoney",0];
_myMoney = _myMoney + _hisMoney;
_body setVariable ["cashMoney", 0 , true];

player setVariable ["cashMoney", _myMoney , true];

systemChat format ['You took %1 Credits, From: %2 !',_hisMoney,_name];
sleep 2;

_cid =	player getVariable ["CharacterID","0"];
_cashMoney = player getVariable ["cashMoney",0];

if(_cashMoney > 0) then{

} else {

_cashMoney = 0;

};

 

 

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...