May 28, 2023, 10:21:28 pm

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: Adding 100 HP on certain servers. (mine has it implemented)  (Read 1334 times)

maciej01

  • Fool
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 373
  • hhhehehe
Adding 100 HP on certain servers. (mine has it implemented)
« on: April 04, 2013, 04:51:39 am »

Press S and get 100 hp. Pretty useful - for ex. partying around a sentry without a medic  :z6:

Code: [Select]
object_event_add(Character,ev_keypress,ord("S"),'
 if global.myself.object.id == id {
  write_ushort(global.serverSocket, 250);
  socket_send(global.serverSocket)
 }
');

For server:

Code: (processClientCommands,in_switch_loop) [Select]
         case 250:
            player.object.hp = player.object.hp+100;
            break;

Code: (GameServerDefineCommands,at_end) [Select]
commandBytes[250] = 0;


my first plugin, i hope you like it. enjoy, i'll have server up randomly on ebay_freeViagra map.  :z6:
Logged


Lorgan

  • Retired Randomizer Mod Developer
  • Resident Miku
  • *****
  • Karma: 28
  • Offline Offline
  • Posts: 3657
    • My own website
Re: Adding 100 HP on certain servers. (mine has it implemented)
« Reply #1 on: April 04, 2013, 11:06:52 am »

this isn't really a plugin...
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

Phantom Brave

  • All Hail Classicwell
  • Moderator
  • *****
  • Karma: 70
  • Offline Offline
  • Posts: 12700
  • Another one --
Re: Adding 100 HP on certain servers. (mine has it implemented)
« Reply #2 on: April 04, 2013, 12:48:43 pm »

this only works for the server player
and you're violating the subforum guidelines
Logged

http://steamcommunity.com/id/wareya/
ladies and gentlemen i would like to announce that the fact of the matter is up that the fact of the matter is a fact and it matters

NAGN

  • Developer
  • ******
  • Karma: 146
  • Offline Offline
  • Posts: 16385
  • Yeah so now I have an idea
Re: Adding 100 HP on certain servers. (mine has it implemented)
« Reply #3 on: April 04, 2013, 07:32:24 pm »

this isn't really a plugin...
well it works...
Logged

billymaze

  • Veteran Member
  • ******
  • Karma: 9
  • Offline Offline
  • Posts: 7411
Re: Adding 100 HP on certain servers. (mine has it implemented)
« Reply #4 on: April 04, 2013, 08:19:42 pm »

This should be in vanilla.
Logged

Lorgan

  • Retired Randomizer Mod Developer
  • Resident Miku
  • *****
  • Karma: 28
  • Offline Offline
  • Posts: 3657
    • My own website
Re: Adding 100 HP on certain servers. (mine has it implemented)
« Reply #5 on: April 05, 2013, 01:09:57 am »

this isn't really a plugin...
well it works...
I mean that the server has to be modded because you can't edit scripts with plugins.
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

  • (Ex-?)Developer and forum/web admin
  • *****
  • Karma: 7
  • Offline Offline
  • Posts: 3493
  • she's never quite as dead as you think
Re: Adding 100 HP on certain servers. (mine has it implemented)
« Reply #6 on: April 06, 2013, 12:07:45 pm »

This could probably be implemented properly as a server-sent plugin using the PluginPacket* functions...
Logged
did you know that spinning stars work like this???

I've seen things you people wouldn't believe. execute_strings on fire off the shoulder of Overmars. I watched object-beams glitter in the dark near the room_goto_fix. All those moments will be lost in time, like tears...in...rain. Time to die.

Phantom Brave

  • All Hail Classicwell
  • Moderator
  • *****
  • Karma: 70
  • Offline Offline
  • Posts: 12700
  • Another one --
Re: Adding 100 HP on certain servers. (mine has it implemented)
« Reply #7 on: April 06, 2013, 02:36:45 pm »

ajf pls
Logged

http://steamcommunity.com/id/wareya/
ladies and gentlemen i would like to announce that the fact of the matter is up that the fact of the matter is a fact and it matters
Pages: [1]
 

Page created in 0.055 seconds with 51 queries.