Money for kills

Money for kills

« posted: May 30, 2015, 02:06 PM »
Hello everybody,

does anyone know, how I can code a script where you get money for player kills, but no teamkills or botkills ?

Thanks for your help
_teamer123

Re: Money for kills

« Reply #1 posted: May 30, 2015, 03:08 PM »
I do some ugly stuff with bounty that should be usable. Its in
client\clientEvents\onKilled.sqf
if you pull the mission from my server

BTW
Revs told us somewhere that stuff like that should be handled in another script like onPlayerDeath(dont really remember) or something but the bounty stuff (most of it from JoShaap) i do there works so you should be able to apapt that

Re: Money for kills

« Reply #2 posted: Jun 28, 2016, 04:23 PM »
Does anyone have another script for it ? :)
  • Offline CREAMPIE
  • Armaholic
  • Veteran
  • ******
  • Posts: 1085
  • ^_^;;

Re: Money for kills

« Reply #3 posted: Jul 01, 2016, 09:32 AM »
server\functions\serverPlayerDied.sqf

https://github.com/CRE4MPIE/A3Wasteland_v1.3d.Stratis/blob/master/server/functions/serverPlayerDied.sqf#L80-L91

adding this to the bottom will allow your AI to drop cash when killed ...

removing the check condition for AI / Player will allow anything that moves killed to drop cash.

Code: [Select]
// Make NPCs drop Cash
if (!isPlayer _unit) then
{
_itemtype = ["Item","Land_Money_F"];
_item = createVehicle [_itemtype select 1, getpos _unit, [], 5, "None"];
_item setPos ([getPos _unit, 1, 3, 0, 0, 2000, 0] call BIS_fnc_findSafePos);
_item setDir random 360;
_cash = round(random 2500); // Max amount of cash that can be dropped
_item setVariable ["cmoney", _cash , true];
_item setVariable ["owner", "world", true];

};

- from the grassy knoll -

Re: Money for kills

« Reply #4 posted: Jul 01, 2016, 10:03 AM »
Is it possible to get for example 2000 for every kill to your Bank account? :)
Thank you

Kordie1
  • Offline CREAMPIE
  • Armaholic
  • Veteran
  • ******
  • Posts: 1085
  • ^_^;;

Re: Money for kills

« Reply #5 posted: Jul 01, 2016, 08:19 PM »
Is it possible to get for example 2000 for every kill to your Bank account? :)
Thank you

Kordie1

of course ;)

You will have to change the code to add to the players bmoney instead of dropping it on the ground.

- from the grassy knoll -

Re: Money for kills

« Reply #6 posted: Oct 02, 2016, 10:18 PM »
of course ;)

You will have to change the code to add to the players bmoney instead of dropping it on the ground.

can you tell me more about this?
  • Offline CREAMPIE
  • Armaholic
  • Veteran
  • ******
  • Posts: 1085
  • ^_^;;

Re: Money for kills

« Reply #8 posted: Apr 21, 2021, 09:04 AM »
https://github.com/CRE4MPIE/A3Wasteland_v1.3d.Stratis/blob/master/server/functions/serverPlayerDied.sqf#L80-L91


what exactly needs to be changed in order for money to fall into the account



what exactly needs to be changed in order for money to fall into the account

Hello! There is such a scenario, tell me how to make money go to a bank or account

1 question: 2 topics, one reply & one pm. Well done.  :o

And then deleting all!  ;D

Re: Money for kills

« Reply #9 posted: Apr 21, 2021, 03:15 PM »
1 question: 2 topics, one reply & one pm. Well done.  :o

And then deleting all!  ;D



but the meaning of writing no one will help .. only you can comment off topic and put smiles better if they helped than laugh !!!

Re: Money for kills

« Reply #10 posted: Apr 21, 2021, 05:43 PM »
Laughed because u deleted all topics/replies. And in general one ! is quite enough.

If I would have this problem, u talked about, I'd take a look at two different sqfs.
First is called pickupMoney.sqf. Second deposit.sqf.
At the end of each sqf, there's a special code, what should happen with the money.

Pickup
Code: [Select]
pvar_processMoneyPickup = [player, netId _moneyObj];
publicVariableServer "pvar_processMoneyPickup";
ATM
Code: [Select]
pvar_processTransaction = ["atm", player, _amount];
publicVariableServer "pvar_processTransaction";

I do NOT know how to solve your question. Trial & error.  ;)

Re: Money for kills

« Reply #11 posted: Apr 21, 2021, 05:56 PM »
Laughed because u deleted all topics/replies. And in general one ! is quite enough.

If I would have this problem, u talked about, I'd take a look at two different sqfs.
First is called pickupMoney.sqf. Second deposit.sqf.
At the end of each sqf, there's a special code, what should happen with the money.

Pickup
Code: [Select]
pvar_processMoneyPickup = [player, netId _moneyObj];
publicVariableServer "pvar_processMoneyPickup";
ATM
Code: [Select]
pvar_processTransaction = ["atm", player, _amount];
publicVariableServer "pvar_processTransaction";

I do NOT know how to solve your question. Trial & error.  ;)

Thanks, I still don't understand what to put where I'm not good at scripts

Re: Money for kills

« Reply #12 posted: Aug 28, 2021, 05:19 PM »
Don't help these Brazil guys. All they do is want you to do all the hard work for them to take, give zero credit to A3Wasteland or anyone else who may have helped them. I came across something cool on their server, I asked for a little info as how to go about doing this or what area to look into editing and they tell me " This is a exclusive custom script that we have made and cannot share. " Later I found it in Monkeys BIB mission, which is what all the Brazil guys grabbed when he released and claimed it as their custom exclusive mission they made, removed any kind of credit to the originals. Leave them be, lock your PBO's like they do and provide them zero help.
  • Offline Eroge
  • Fresh Spawn
  • *
  • Posts: 9

Re: Money for kills

« Reply #13 posted: Sep 07, 2021, 05:55 PM »
Don't help these Brazil guys. All they do is want you to do all the hard work for them to take, give zero credit to A3Wasteland or anyone else who may have helped them. I came across something cool on their server, I asked for a little info as how to go about doing this or what area to look into editing and they tell me " This is a exclusive custom script that we have made and cannot share. " Later I found it in Monkeys BIB mission, which is what all the Brazil guys grabbed when he released and claimed it as their custom exclusive mission they made, removed any kind of credit to the originals. Leave them be, lock your PBO's like they do and provide them zero help.
I havent heard of this Monkeys BIB mission, do you have a link to it?