ItemSpawn: Clean up code.

This commit is contained in:
zaCade 2018-08-11 16:36:11 +02:00
parent cb137f0cac
commit 0f5f831445
2 changed files with 7 additions and 7 deletions

View File

@ -192,19 +192,19 @@ public void OnRoundStart(Event hEvent, const char[] sEvent, bool bDontBroadcast)
// player_weaponstrip. // player_weaponstrip.
int iPlayerStrip = CreateEntityByName("player_weaponstrip"); int iPlayerStrip = CreateEntityByName("player_weaponstrip");
DispatchKeyFormat(iPlayerStrip, "targetname", "item_spawn_weaponstrip"); DispatchKeyFormat(iPlayerStrip, "targetname", "item_spawn_weaponstrip");
SpawnAndActivate(iPlayerStrip); SpawnAndActivate(iPlayerStrip);
// player_speedmod. // player_speedmod.
int iPlayerSpeed = CreateEntityByName("player_speedmod"); int iPlayerSpeed = CreateEntityByName("player_speedmod");
DispatchKeyFormat(iPlayerSpeed, "targetname", "item_spawn_speedmod"); DispatchKeyFormat(iPlayerSpeed, "targetname", "item_spawn_speedmod");
SpawnAndActivate(iPlayerSpeed); SpawnAndActivate(iPlayerSpeed);
// filter_activator_team humans. // filter_activator_team humans.
int iHumanFilter = CreateEntityByName("filter_activator_team"); int iHumanFilter = CreateEntityByName("filter_activator_team");
DispatchKeyFormat(iHumanFilter, "targetname", "item_spawn_human_filter"); DispatchKeyFormat(iHumanFilter, "targetname", "item_spawn_human_filter");
DispatchKeyFormat(iHumanFilter, "Negated", "0"); DispatchKeyFormat(iHumanFilter, "Negated", "0");
DispatchKeyFormat(iHumanFilter, "filterteam", "3"); DispatchKeyFormat(iHumanFilter, "filterteam", "3");
SpawnAndActivate(iHumanFilter); SpawnAndActivate(iHumanFilter);
// filter_activator_team zombies. // filter_activator_team zombies.

View File

@ -29,7 +29,7 @@ public Action Command_WhiteKnight(int client, int argc)
for (int i = 0; i < iTargetCount; i++) for (int i = 0; i < iTargetCount; i++)
{ {
if(IsClientInGame(iTargets[i]) && IsPlayerAlive(iTargets[i]) && (ZR_IsClientZombie(iTargets[i]))) if(IsClientInGame(iTargets[i]) && IsPlayerAlive(iTargets[i]) && (ZR_IsClientHuman(iTargets[i])))
{ {
GetClientEyePosition(iTargets[i], fOrigin); GetClientEyePosition(iTargets[i], fOrigin);
SpawnWhiteKnight(fOrigin); SpawnWhiteKnight(fOrigin);