Post: Disabling Player Intersection Tracker
01-20-2016, 09:15 PM #1
BullyWiiPlaza
Climbing up the ladder
(adsbygoogle = window.adsbygoogle || []).push({}); When I teleport multiple players to the same location, they automatically get killed and if someone is still alive, Zombie laughing can be heard. I want to disable this, just like the "too many weapons monitor" and "out of playable area monitor". Unfortunately, it doesn't have a fitting endon() statement that could be used. Let me know what you would do. My first idea was to give players god mode while teleporting but the annoying laughing would still be there. Then there also is to teleport players slightly shifted to prevent overlapping them. Either way, the player intersection tracker function is as follows:
    track_players_intersection_tracker()
{
self endon( "disconnect" );
self endon( "death" );
level endon( "end_game" );

wait( 5 );

while ( 1 )
{
killed_players = false;
players = GET_PLAYERS();
for ( i = 0; i < players.size; i++ )
{
if ( players[i] maps\mp\zombies\_zm_laststand::player_is_in_laststand() || "playing" != players[i].sessionstate )
{
continue;
}

for ( j = 0; j < players.size; j++ )
{
if ( i == j || players[j] maps\mp\zombies\_zm_laststand::player_is_in_laststand() || "playing" != players[j].sessionstate )
{
continue;
}

if ( isDefined( level.player_intersection_tracker_override ) )
{
if ( players[i] [[level.player_intersection_tracker_override]]( players[j] ) )
{
continue;
}
}

playerI_origin = players[i].origin;
playerJ_origin = players[j].origin;

//Check height first
if ( abs(playerI_origin[2] - playerJ_origin[2] ) > 60 )
continue;

//Check 2d distance
distance_apart = distance2d( playerI_origin, playerJ_origin );
//IPrintLnBold( "player=", i, ",", j, "distance_apart=", distance_apart );

if ( abs(distance_apart) > 18 )
continue;

/#
IPrintLnBold( "PLAYERS ARE TOO FRIENDLY!!!!!" );
#/
players[i] dodamage( 1000, (0, 0, 0) );
players[j] dodamage( 1000, (0, 0, 0) );

if ( !killed_players )
{
players[i] playlocalsound( level.zmb_laugh_alias );
}
players[i] maps\mp\zombies\_zm_stats::increment_map_cheat_stat( "cheat_too_friendly" );
players[i] maps\mp\zombies\_zm_stats::increment_client_stat( "cheat_too_friendly",false );
players[i] maps\mp\zombies\_zm_stats::increment_client_stat( "cheat_total",false );

players[j] maps\mp\zombies\_zm_stats::increment_map_cheat_stat( "cheat_too_friendly" );
players[j] maps\mp\zombies\_zm_stats::increment_client_stat( "cheat_too_friendly",false );
players[j] maps\mp\zombies\_zm_stats::increment_client_stat( "cheat_total",false );

killed_players = true;
}
}
wait( .5 );
}
}

What's with these cheats on Zombies anyway? Did Treyarch expect that people will mod the game? Lol
(adsbygoogle = window.adsbygoogle || []).push({});
01-21-2016, 10:32 PM #2
anthonything
Space Ninja
Got it: (i think)
    

level.player_intersection_tracker_override = ::arbitraryfunctionofdoom;

arbitraryfunctionofdoom( player )
{
wait .05; //Prevent a crazy continue loop. You could also say wait 999 or waittill("eternity") i think.
return true;
}

The following user thanked anthonything for this useful post:

BullyWiiPlaza
01-22-2016, 07:42 AM #3
BullyWiiPlaza
Climbing up the ladder
Originally posted by anthonything View Post
Got it: (i think)
    

level.player_intersection_tracker_override = ::arbitraryfunctionofdoom;

arbitraryfunctionofdoom( player )
{
wait .05; //Prevent a crazy continue loop. You could also say wait 999 or waittill("eternity") i think.
return true;
}

Confirmed working, thanks mate Smile

    disablePlayerIntersectionTracker()
{
level.player_intersection_tracker_override = ::playerIntersectionTrackerOverride;
}

playerIntersectionTrackerOverride(player)
{
self waittill("forever");

return true;
}

The following user thanked BullyWiiPlaza for this useful post:

anthonything

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo