March 25, 2023, 05:51:25 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: [Request] Press key to end map  (Read 1215 times)

Mew!

  • 2011 Haxxy Finalist
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 546
  • PAL5Q 1.15.2013
[Request] Press key to end map
« on: January 07, 2013, 12:29:59 am »

Server/host plugin.  :z6:
Logged

MTK5012

  • 2011 Haxxy Finalist
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 773
  • if (ping <= 150) jaw.y += 100;
Re: [Request] Press key to end map
« Reply #1 on: January 13, 2013, 04:36:47 pm »

Code: [Select]
object_event_add(PlayerControl,ev_step,ev_step_normal,"
if keyboard_check_pressed(ord('N'))
{
global.winners = choose(TEAM_RED,TEAM_BLUE);
}
");

NAGN

  • Developer
  • ******
  • Karma: 146
  • Offline Offline
  • Posts: 16385
  • Yeah so now I have an idea
Re: [Request] Press key to end map
« Reply #2 on: January 13, 2013, 04:38:31 pm »

just do global.winners = TEAM_SPECTATOR so its a stalemate
Logged

MTK5012

  • 2011 Haxxy Finalist
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 773
  • if (ping <= 150) jaw.y += 100;
Re: [Request] Press key to end map
« Reply #3 on: January 13, 2013, 04:43:08 pm »

oops forgot
and btw change ord('N') to whatever key you want it to be
Code: [Select]
object_event_add(PlayerControl,ev_step,ev_step_normal,"
if keyboard_check_pressed(ord('N'))
{
global.winners = TEAM_SPECTATOR;
}
");

Mew!

  • 2011 Haxxy Finalist
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 546
  • PAL5Q 1.15.2013
Re: [Request] Press key to end map
« Reply #4 on: January 13, 2013, 05:03:11 pm »

Thank you!  :z6:
Logged

billymaze

  • Veteran Member
  • ******
  • Karma: 9
  • Offline Offline
  • Posts: 7411
Re: [Request] Press key to end map
« Reply #5 on: January 13, 2013, 05:29:50 pm »

wait doesn't the client only send stuff like what direction and not arbitrary buttons
Logged

MTK5012

  • 2011 Haxxy Finalist
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 773
  • if (ping <= 150) jaw.y += 100;
Re: [Request] Press key to end map
« Reply #6 on: January 13, 2013, 05:32:19 pm »

wait doesn't the client only send stuff like what direction and not arbitrary buttons
this is host plugin

billymaze

  • Veteran Member
  • ******
  • Karma: 9
  • Offline Offline
  • Posts: 7411
Re: [Request] Press key to end map
« Reply #7 on: January 13, 2013, 05:33:00 pm »

I am good at reading thanks
Logged
Pages: [1]
 

Page created in 0.044 seconds with 36 queries.