* Use forEach , which puts the iterated value into the special variable, _x (you can use this on one line in SQS, which is line-based, but you can spread it on multiple lines in SQF).
* You can't use ?: inside {} or in an SQF script, so you have to use if/then/else.
* You also don't have += defined in the parser, and have to do that manually.
* I have no idea what you are trying to achieve with "{_variable}_money", but I'd guess you want to use dynamic code to generate the variable-name.
* I assume you mean to use _this, rather than this.
{
if (((_this select 0) == Player) && (((_this select 0) distance workzone) < 100)) then
{
call format ["%1_money = %1_money + civ_paycheck", _x];
};
} forEach array;
I'd worry about learning the simple end of scripting syntax before worrying too much about forEach and dynamic code generation.