Fixed spawn protection being buggy when admin infects them, added better countdown, changed variable names (consistency), fixed typo in world kill respawn cvar, gKilledByWorld initialized on connect
This commit is contained in:
@ -212,8 +212,8 @@ public Action:PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
|
||||
{
|
||||
decl String:respawnteam[32];
|
||||
GetConVarString(gCvars[CVAR_RESPAWN_TEAM], respawnteam, sizeof(respawnteam));
|
||||
|
||||
if (!StrEqual(respawnteam, "zombie", false))
|
||||
|
||||
if (!StrEqual(respawnteam, "zombie", false) && !(GetConVarBool(gCvars[CVAR_SUICIDE_WORLD_DAMAGE]) && gKilledByWorld[index]))
|
||||
{
|
||||
SetPlayerAlpha(index, 0);
|
||||
SetPlayerSpeed(index, 600.0);
|
||||
@ -227,11 +227,11 @@ public Action:PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
|
||||
CloseHandle(tHandles[index][TPROTECT]);
|
||||
}
|
||||
|
||||
protCount[index] = protect;
|
||||
PrintHintText(index, "%d", protCount[index]);
|
||||
protCount[index]--;
|
||||
pTimeLeft[index] = protect;
|
||||
|
||||
PrintHintText(index, "%d", pTimeLeft[index]);
|
||||
|
||||
tHandles[index][TPROTECT] = CreateTimer(1.0, EndProtect, index, TIMER_FLAG_NO_MAPCHANGE|TIMER_REPEAT);
|
||||
tHandles[index][TPROTECT] = CreateTimer(1.0, ProtectTimer, index, TIMER_FLAG_NO_MAPCHANGE|TIMER_REPEAT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user