September 04, 2025, 10:48:15 am

The Gang Garrison 2 Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

NOTICE: Wondering where all the forums have gone?

Join the community Discord server!

Pages: 1 [2]

Author Topic: [Client-side] Auto z4 on hit  (Read 2533 times)

[FR]YB

  • 2013 Haxxy Award Winner
  • *
  • Karma: 28
  • Offline Offline
  • Posts: 642
  • There are 11 people playing holy sh
Re: [Client-side] Auto z4 on hit
« Reply #15 on: October 12, 2017, 07:16:15 am »

Self damage counts in this, is there a way to not count self damage yet count third party damage?
Probably
Code: [Select]
global.dealDamageFunction += "
if (global.myself.object != -1) {
if (argument1 == global.myself.object && argument2 != global.myself.object) {
write_ubyte(global.serverSocket, CHAT_BUBBLE);
write_ubyte(global.serverSocket, 23);
}
}
";
Didn't test though, sent from a phone

Make that argument0 and myself instead of object, and you got it


Code: [Select]
global.dealDamageFunction += "
if (global.myself.object != -1) {
if (argument1 == global.myself.object && argument0 != global.myself) {
write_ubyte(global.serverSocket, CHAT_BUBBLE);
write_ubyte(global.serverSocket, 23);
}
}
";

I'll update the OP with the no-self-damage version
Pages: 1 [2]
 

Page created in 0.03 seconds with 31 queries.