there seems to be a weird bug on The Parish bridge finale (c5m5) at the end when helicopter sequence starts where you will be warned and slowed despite being behind everyone else. Will try to get video footage of this when I can
Please advise the plugin or sample code as beautiful and not very sharply start throwing a player with special infected if it is rush, some better option than z_spawn.
(or force the Engine forcibly and not noticeably create infected in the player's radius)
found such a code, but it creates an infected behind (sort of)
Rough little way
Spoiler
PHP Code:
void vBossOption(int client, int entity)
{
if (g_bPluginEnabled && g_bPluginEnabled2)
{
if (!g_bBossSpawned)
{
g_bBossSpawned = true;
float flHitPosition[3];
float flPosition[3];
float flAngle[3];
float flVector[3];
GetClientEyePosition(client, flPosition);
GetClientEyeAngles(client, flAngle);
flAngle[0] = -25.0;
GetAngleVectors(flAngle, flAngle, NULL_VECTOR, NULL_VECTOR);
NormalizeVector(flAngle, flAngle);
ScaleVector(flAngle, -1.0);
vCopyVector(flAngle, flVector);
GetVectorAngles(flAngle, flAngle);
Handle hTrace = TR_TraceRayFilterEx(flPosition, flAngle, MASK_SOLID, RayType_Infinite, bTraceRayDontHitSelf, client);
if (TR_DidHit(hTrace))
{
TR_GetEndPosition(flHitPosition, hTrace);
NormalizeVector(flVector, flVector);
ScaleVector(flVector, -40.0);
AddVectors(flHitPosition, flVector, flHitPosition);
if (GetVectorDistance(flHitPosition, flPosition) < 200.0 && GetVectorDistance(flHitPosition, flPosition) > 40.0)
{
vBossSpawner(flHitPosition);
}
}
delete hTrace;
}
else
{
iGetTankCount() > 0 ? (g_bBossDefeated = false) : (g_bBossDefeated = true);
}
if (!g_bBossDefeated)
{
EmitSoundToAll(SOUND_LOCKED, entity);
if (bIsHumanSurvivor(client))
{
bHasTranslationFile() ? PrintToChat(client, "%s %t", ASS_PREFIX01, "BossRequired") : PrintToChat(client, "%s We need to defeat the boss!", ASS_PREFIX01);
}
}
else
{
vEntryMode(entity);
for (int iToucher = 1; iToucher <= MaxClients; iToucher++)
{
if (bIsHumanSurvivor(iToucher))
{
bHasTranslationFile() ? PrintToChat(iToucher, "%s %t", ASS_PREFIX01, "BossDefeated") : PrintToChat(iToucher, "%s The boss has been defeated!", ASS_PREFIX01);
}
}
}
}
}
__________________
-
PHP Code:
public OnClientConnect(int Client) {
KickClient(Client, "sorry");
}
there seems to be a weird bug on The Parish bridge finale (c5m5) at the end when helicopter sequence starts where you will be warned and slowed despite being behind everyone else. Will try to get video footage of this when I can
The nav areas are not always sequential and the way the game works I guess they're all calculated linearly even when next to each other. The only option would be adding to the config an increased range for this int he data config.
Edit: You could try something like this in the data config. Let me know if it works.
You're awesome, but how I wish warnings would appear on a suggestion. Or would it be optional to choose them
PHP Code:
// 0.0=Off. How often to print a message to someone warning them they are ahead or behind and will be teleported or slowed down.
l4d_anti_rush_warn_time "15.0"
Thanks for this useful plugin!
There is however one idea in my mind which I believe it could make this plugin even more perfecter. There are always people who rush ahead and start certain events before other teammates are ready. For instance the rollercoaster event in Dark Carnival campaign, while half of players haven't left the Tunnel of Love yet, some players just go ahead and start the event. If you could add an option so players can't start such events unless a certain percentage of players are present, it would be just great!