Extract function ZTeleMustBeHuman.
This commit is contained in:
parent
918dd3100b
commit
583984489b
@ -131,9 +131,7 @@ bool:ZTeleClient(client, bool:force = false)
|
|||||||
|
|
||||||
new bool:infected = InfectIsClientInfected(client);
|
new bool:infected = InfectIsClientInfected(client);
|
||||||
|
|
||||||
// If zombie cvar is disabled and the client is a zombie, then stop.
|
if (!force && ZTeleMustBeHuman(client))
|
||||||
new bool:ztelezombie = GetConVarBool(g_hCvarsList[CVAR_ZTELE_ZOMBIE]);
|
|
||||||
if (!force && infected && !ztelezombie)
|
|
||||||
{
|
{
|
||||||
// Tell client they must be human to use this feature.
|
// Tell client they must be human to use this feature.
|
||||||
TranslationPrintToChat(client, "Must be human");
|
TranslationPrintToChat(client, "Must be human");
|
||||||
@ -452,3 +450,11 @@ ZTeleStopTimer(client)
|
|||||||
}
|
}
|
||||||
tZTele[client] = INVALID_HANDLE;
|
tZTele[client] = INVALID_HANDLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ZTeleMustBeHuman(client)
|
||||||
|
{
|
||||||
|
new bool:infected = InfectIsClientInfected(client);
|
||||||
|
new bool:ztelezombie = GetConVarBool(g_hCvarsList[CVAR_ZTELE_ZOMBIE]);
|
||||||
|
|
||||||
|
return (infected && !ztelezombie);
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user