Closed dewobedil closed 10 months ago
I use your code and type !test2
it seems NoLimit_CreateInfected() doesnt work on Last Stand campaign for some reason. When special spawned they will die instantly.
Where exactly, what gamemode?
Is probably because game failed to find a spawn position sometimes and return false, you can try
Action CommandTest(int client, int args)
{
float vecPos[3];
if(L4D_GetRandomPZSpawnPosition(L4D_GetHighestFlowSurvivor(), 1, 5, vecPos))
{
L4D2_SpawnSpecial(1, vecPos, NULL_VECTOR);
}
else
{
PrintToServer("[CommandTest] Couldn't find a Smoker Spawn position in 5 tries");
PrintToChatAll("[CommandTest] Couldn't find a Smoker Spawn position in 5 tries");
}
return Plugin_Handled;
}
Action CommandTest2(int client, int args)
{
float vecPos[3];
if(L4D_GetRandomPZSpawnPosition(L4D_GetHighestFlowSurvivor(), 1, 5, vecPos))
{
NoLimit_CreateInfected("smoker", vecPos, NULL_VECTOR);
}
else
{
PrintToServer("[CommandTest2] Couldn't find a Smoker Spawn position in 5 tries");
PrintToChatAll("[CommandTest2] Couldn't find a Smoker Spawn position in 5 tries");
}
return Plugin_Handled;
}
Reason: It means that the game can not find a position to spawn special infected, usually happen when director stops spawning special infected (C1m4 before evelator) or NAV problem (can't find any valid nav area to spawn infected near survivors)
I will check again later on, since it having weird problems on my site about spawn area problems it should okay, since it spawned its just die instanly
it seems NoLimit_CreateInfected() doesnt work on Last Stand campaign for some reason. When special spawned they will die instantly. Here is the code if you want to test. You can spawn normally by using left4dhooks