March 25, 2023, 06:04:12 am

The Gang Garrison 2 Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

NOTICE: Due to a rise in bot activity, new posters need to be approved before posting.

Join the community Discord server!

Pages: [1]

Author Topic: f-r-i-e-n-d-l-y-f-i-r-e [serverplugin]  (Read 1533 times)

Lorgan

  • Retired Randomizer Mod Developer
  • Resident Miku
  • *****
  • Karma: 28
  • Offline Offline
  • Posts: 3657
    • My own website
f-r-i-e-n-d-l-y-f-i-r-e [serverplugin]
« on: September 10, 2012, 10:27:48 am »

Friendly fire is off by default, press 'H' to toggle. It also triggers when the round is over.
It makes almost all projectiles teamkill, except for sentries (you would take damage without seeing the sentry shoot) and bubbles (poor damage and they won't 'pop' clientside when they hit a player).

Code: [Select]
// Team kill plugin by lorgan

global.teamKill = false;

object_event_add(PlayerControl,ev_step,ev_step_normal,"
    if keyboard_check_pressed(ord('H')) {
        global.teamKill = !global.teamKill;
        var message;
        if global.teamKill message = 'Activated friendly fire!';
        else message = 'Disabled friendly fire!';
        ServerMessageString(message,global.eventBuffer);
        notice = instance_create(0, 0, NoticeO);
        notice.notice = NOTICE_CUSTOM;
        notice.message = message;
    }
    
    if global.isHost && (global.teamKill or global.winners != -1) {
        with(Rocket) team = 3;
        with(BurningProjectile) team = 3;
        with(Shot) team = 3;
        with(StabMask) team = 3;
        with(BladeB) team = 3;
        with(Mine) team = 3;
    }
");

versions: any version that supports server messages
conflicts: probably nothing
« Last Edit: September 10, 2012, 10:29:40 am by Lorgan »
Logged
Unfortunately, turning a section into a communist oppressive regime is not against the forum rules, so there is really nothing we can do.
Quote from: steam
21:08 - Hullusorsa: lorgan, when will you buy us the keys?
21:09 - Lorgan: i'm waiting for greece to collapse so the value of the euro drops
21:09 - Lorgan: not even joking

ajf

  • Guest
Re: f-r-i-e-n-d-l-y-f-i-r-e [serverplugin]
« Reply #1 on: October 26, 2012, 11:38:42 am »

Fuck yes! More exciting gameplay!
Logged
Pages: [1]
 

Page created in 0.035 seconds with 50 queries.