A3Armory / A3A_A3Wasteland.Altis

A3Wasteland is a survival sandbox mission for Arma 3 where two teams and independent players fight for survival. Built in collaboration between GoT, TPG, KoS, 404Games, and others.
http://a3wasteland.com
GNU Affero General Public License v3.0
9 stars 6 forks source link

Money limits #10

Closed Gigatek1 closed 7 years ago

Gigatek1 commented 7 years ago

Some pos script kiddie was just on the Tanoa server and setvariable for cmoney and bmoney to billions. Luckily it broke the ATMs and we removed most from the players. Where would I add a check like this but for the crates? https://github.com/A3Armory/A3A_A3Wasteland_Sock.Altis/blob/dev/client/functions/playerSpawn.sqf#L109

AgentRev commented 7 years ago

side note, you can add 5="bmoney" in setVariable.txt

I didn't add this in the vanilla filters in case it conflicts with some addon interacting with bank money.

Gigatek1 commented 7 years ago

Yeah I had it set to 1

Gigatek1 commented 7 years ago

Fucker did health, food, water, and ammo too. It was made for a3w.

AgentRev commented 7 years ago

I wish BIS would add the source owner ID to public variable event handlers, it would be extremely easy to crashban retards while allowing other stuff that can't be done with BE filters, like only allow a player to set his own money globally.

AgentRev commented 7 years ago

oh and what do you mean by "ammo"?

Gigatek1 commented 7 years ago

Not sure how it was done but people had infinite ammo to I guess. Not sure if it was unending or just unlimited mags.

Gigatek1 commented 7 years ago

Unending ammo. People could just spray for ever.

AgentRev commented 7 years ago

Do you have the vanilla remoteExec? the only command I know for infinite ammo has to be executed locally

Gigatek1 commented 7 years ago

Yeah all I do is put a 1 "" at the bottom with some filters.

// allows UAV usage, third-party bounty system, and remoteExec functions (filtered by CfgRemoteExec)
5 "" !="" !="true" !="vehicle this (flyInHeight \d+|land 'LAND')" !="\[_this\] call onBountySystemPlayerDied;" !="\w+?_(fnc|remote|srv)_\w+? \[.*\]"
5 "^bis_fnc_endmission"
1 "" !stuff
AgentRev commented 7 years ago

can you send me a zip of the txt filters? maybe I can find a clue

Gigatek1 commented 7 years ago

Where is the money added to crates, here? https://github.com/A3Armory/A3A_A3Wasteland.Tanoa/blob/master/persistence/server/world/oLoad.sqf

Where should I place this?

  //Remove money
  private["_max_money"];
  _max_money = 1000000;

  if (_obj getVariable ["cmoney", 0] > _max_money) then {
    _obj setVariable ["cmoney", _max_money, true];
  };

Yeah I'll send them right now. Had !cmoney and !bmoney on the setvariable filter at the bottom, duh. It was just a guess with those.

AgentRev commented 7 years ago

Here: https://github.com/A3Armory/A3A_A3Wasteland.Tanoa/blob/b629e4ae443254f0e8ec396507b15801c787b4f0/persistence/server/world/oLoad.sqf#L118

Gigatek1 commented 7 years ago

I'll test it later but this should fix the players atm's and keep us from becoming the next Venezuela. https://github.com/A3Armory/A3A_A3Wasteland.Altis/commit/bca8998ddbd7c45729a06f2e45e8b9510db78436

Gigatek1 commented 7 years ago

Oh wait, is there any way to set these serverside? https://github.com/A3Armory/A3A_A3Wasteland.Altis/commit/bca8998ddbd7c45729a06f2e45e8b9510db78436#diff-889be3c339895d04c5ae1e8020d49433R110

AgentRev commented 7 years ago

bmoney is only set server-side, always; persistence\server\players\setupPlayerDB.sqf

cmoney is set in persistence\client\players\applyPlayerData.sqf

AgentRev commented 7 years ago

didn't find anything in your filters, but I tightened mines anyway: https://github.com/A3Wasteland/Release_Files/commit/2c961cc4e65a01229c9a834d3ab7710754a966b2

Gigatek1 commented 7 years ago

Sweet, thanks for looking out.

Gigatek1 commented 7 years ago

Starting this morning with a fresh mind, so I did a better job while it still is :wink: https://github.com/A3Armory/A3A_A3Wasteland.Altis/commit/8d41d666a610cf3dea90d9195c0830509c3001c7