i want to put disable friendly fire for all my mod, but i don’t understand how to make it in source code (it’s not a boolean).
thx
friendly fire
i want to put disable friendly fire for all my mod
So what do you exactly wish?
i want players in same team dont do dmg each other.
by defaut, when you run ET, it’s Enable friendly fire (the box is check).
And i want to put it Disable by default but i dont understand the g_friendlyfire function in source code.
If you configure your server so that friendly fire is off, it stays off. You can stop people from voting for it as well.
I don’t think you need a new mod just for this small (in my eyes even non-existant) issue, imho.
solution is in g_main.c see this line
{ &g_friendlyFire, "g_friendlyFire", "1", CVAR_SERVERINFO | CVAR_ARCHIVE, 0, qtrue, qtrue },
the string after console name is “1” here, changing it to “0” will make it off by default
eg
{ &g_friendlyFire, "g_friendlyFire", "0", CVAR_SERVERINFO | CVAR_ARCHIVE, 0, qtrue, qtrue },
however you can just as kamikazee said configure your server…
ok ty.
its just a detail i wanna put in my mod, i’m not so crazy to do a mod just for that. :bump:
If you leave it like that the user can still change it, it needs to be:
{ &g_friendlyFire, "g_friendlyFire", "0", CVAR_SERVERINFO | CVAR_ROM, 0, qtrue, qtrue },
IMO forcing it to off will turn off those who like ff on, CVAR_LATCH would be a better way to go.