A few runtime fixes for basefuncommands
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401833
This commit is contained in:
parent
d0fac2def9
commit
9970ad59ac
@ -46,8 +46,7 @@ CreateDrug(client)
|
|||||||
|
|
||||||
KillDrug(client)
|
KillDrug(client)
|
||||||
{
|
{
|
||||||
KillTimer(g_DrugTimers[client]);
|
KillDrugTimer(client);
|
||||||
g_DrugTimers[client] = INVALID_HANDLE;
|
|
||||||
|
|
||||||
new Float:pos[3];
|
new Float:pos[3];
|
||||||
GetClientAbsOrigin(client, pos);
|
GetClientAbsOrigin(client, pos);
|
||||||
@ -72,6 +71,12 @@ KillDrug(client)
|
|||||||
EndMessage();
|
EndMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
KillDrugTimer(client)
|
||||||
|
{
|
||||||
|
KillTimer(g_DrugTimers[client]);
|
||||||
|
g_DrugTimers[client] = INVALID_HANDLE;
|
||||||
|
}
|
||||||
|
|
||||||
KillAllDrugs()
|
KillAllDrugs()
|
||||||
{
|
{
|
||||||
new maxclients = GetMaxClients();
|
new maxclients = GetMaxClients();
|
||||||
@ -79,7 +84,14 @@ KillAllDrugs()
|
|||||||
{
|
{
|
||||||
if (g_DrugTimers[i] != INVALID_HANDLE)
|
if (g_DrugTimers[i] != INVALID_HANDLE)
|
||||||
{
|
{
|
||||||
KillDrug(i);
|
if(IsClientInGame(i))
|
||||||
|
{
|
||||||
|
KillDrug(i);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
KillDrugTimer(i);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -124,7 +136,14 @@ PerformDrug(client, target, toggle)
|
|||||||
|
|
||||||
public Action:Timer_Drug(Handle:timer, any:client)
|
public Action:Timer_Drug(Handle:timer, any:client)
|
||||||
{
|
{
|
||||||
if (!IsClientInGame(client) || !IsPlayerAlive(client))
|
if (!IsClientInGame(client))
|
||||||
|
{
|
||||||
|
KillDrugTimer(client);
|
||||||
|
|
||||||
|
return Plugin_Handled;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!IsPlayerAlive(client))
|
||||||
{
|
{
|
||||||
KillDrug(client);
|
KillDrug(client);
|
||||||
|
|
||||||
|
@ -60,8 +60,6 @@ KillFireBomb(client)
|
|||||||
{
|
{
|
||||||
KillTimer(g_FireBombTimers[client]);
|
KillTimer(g_FireBombTimers[client]);
|
||||||
g_FireBombTimers[client] = INVALID_HANDLE;
|
g_FireBombTimers[client] = INVALID_HANDLE;
|
||||||
|
|
||||||
SetEntityRenderColor(client, 255, 255, 255, 255);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
KillAllFireBombs()
|
KillAllFireBombs()
|
||||||
@ -96,6 +94,7 @@ PerformFireBomb(client, target, toggle)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
KillFireBomb(target);
|
KillFireBomb(target);
|
||||||
|
SetEntityRenderColor(client, 255, 255, 255, 255);
|
||||||
LogAction(client, target, "\"%L\" removed a FireBomb on \"%L\"", client, target);
|
LogAction(client, target, "\"%L\" removed a FireBomb on \"%L\"", client, target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -114,6 +113,7 @@ PerformFireBomb(client, target, toggle)
|
|||||||
if (g_FireBombTimers[target] != INVALID_HANDLE)
|
if (g_FireBombTimers[target] != INVALID_HANDLE)
|
||||||
{
|
{
|
||||||
KillFireBomb(target);
|
KillFireBomb(target);
|
||||||
|
SetEntityRenderColor(client, 255, 255, 255, 255);
|
||||||
LogAction(client, target, "\"%L\" removed a FireBomb on \"%L\"", client, target);
|
LogAction(client, target, "\"%L\" removed a FireBomb on \"%L\"", client, target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -186,6 +186,7 @@ public Action:Timer_FireBomb(Handle:timer, any:client)
|
|||||||
|
|
||||||
IgniteEntity(client, GetConVarFloat(g_BurnDuration));
|
IgniteEntity(client, GetConVarFloat(g_BurnDuration));
|
||||||
KillFireBomb(client);
|
KillFireBomb(client);
|
||||||
|
SetEntityRenderColor(client, 255, 255, 255, 255);
|
||||||
|
|
||||||
if (GetConVarInt(g_FireBombMode) > 0)
|
if (GetConVarInt(g_FireBombMode) > 0)
|
||||||
{
|
{
|
||||||
|
@ -71,6 +71,21 @@ FreezeClient(client, time)
|
|||||||
}
|
}
|
||||||
|
|
||||||
UnfreezeClient(client)
|
UnfreezeClient(client)
|
||||||
|
{
|
||||||
|
KillFreezeTimer(client);
|
||||||
|
|
||||||
|
new Float:vec[3];
|
||||||
|
GetClientAbsOrigin(client, vec);
|
||||||
|
vec[2] += 10;
|
||||||
|
|
||||||
|
GetClientEyePosition(client, vec);
|
||||||
|
EmitAmbientSound(SOUND_FREEZE, vec, client, SNDLEVEL_RAIDSIREN);
|
||||||
|
|
||||||
|
SetEntityMovetype(client, MOVETYPE_WALK);
|
||||||
|
SetEntityRenderColor(client, 255, 255, 255, 255);
|
||||||
|
}
|
||||||
|
|
||||||
|
KillFreezeTimer(client)
|
||||||
{
|
{
|
||||||
KillTimer(g_FreezeTimers[client]);
|
KillTimer(g_FreezeTimers[client]);
|
||||||
g_FreezeTimers[client] = INVALID_HANDLE;
|
g_FreezeTimers[client] = INVALID_HANDLE;
|
||||||
@ -82,7 +97,6 @@ CreateFreezeBomb(client)
|
|||||||
g_FreezeBombTracker[client] = GetConVarInt(g_FreezeBombTicks);
|
g_FreezeBombTracker[client] = GetConVarInt(g_FreezeBombTicks);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
KillFreezeBomb(client)
|
KillFreezeBomb(client)
|
||||||
{
|
{
|
||||||
KillTimer(g_FreezeBombTimers[client]);
|
KillTimer(g_FreezeBombTimers[client]);
|
||||||
@ -98,7 +112,14 @@ KillAllFreezes()
|
|||||||
{
|
{
|
||||||
if (g_FreezeTimers[i] != INVALID_HANDLE)
|
if (g_FreezeTimers[i] != INVALID_HANDLE)
|
||||||
{
|
{
|
||||||
UnfreezeClient(i);
|
if(IsClientInGame(i))
|
||||||
|
{
|
||||||
|
UnfreezeClient(i);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
KillFreezeTimer(i);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_FreezeBombTimers[i] != INVALID_HANDLE)
|
if (g_FreezeBombTimers[i] != INVALID_HANDLE)
|
||||||
@ -154,9 +175,16 @@ PerformFreezeBomb(client, target, toggle)
|
|||||||
|
|
||||||
public Action:Timer_Freeze(Handle:timer, any:client)
|
public Action:Timer_Freeze(Handle:timer, any:client)
|
||||||
{
|
{
|
||||||
if (!IsClientInGame(client) || !IsPlayerAlive(client))
|
if (!IsClientInGame(client))
|
||||||
{
|
{
|
||||||
KillFreezeBomb(client);
|
KillFreezeTimer(client);
|
||||||
|
|
||||||
|
return Plugin_Handled;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!IsPlayerAlive(client))
|
||||||
|
{
|
||||||
|
UnfreezeClient(client);
|
||||||
|
|
||||||
return Plugin_Handled;
|
return Plugin_Handled;
|
||||||
}
|
}
|
||||||
@ -176,12 +204,6 @@ public Action:Timer_Freeze(Handle:timer, any:client)
|
|||||||
if (g_FreezeTracker[client] == 0)
|
if (g_FreezeTracker[client] == 0)
|
||||||
{
|
{
|
||||||
UnfreezeClient(client);
|
UnfreezeClient(client);
|
||||||
|
|
||||||
GetClientEyePosition(client, vec);
|
|
||||||
EmitAmbientSound(SOUND_FREEZE, vec, client, SNDLEVEL_RAIDSIREN);
|
|
||||||
|
|
||||||
SetEntityMovetype(client, MOVETYPE_WALK);
|
|
||||||
SetEntityRenderColor(client, 255, 255, 255, 255);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return Plugin_Handled;
|
return Plugin_Handled;
|
||||||
|
@ -57,8 +57,6 @@ KillTimeBomb(client)
|
|||||||
{
|
{
|
||||||
KillTimer(g_TimeBombTimers[client]);
|
KillTimer(g_TimeBombTimers[client]);
|
||||||
g_TimeBombTimers[client] = INVALID_HANDLE;
|
g_TimeBombTimers[client] = INVALID_HANDLE;
|
||||||
|
|
||||||
SetEntityRenderColor(client, 255, 255, 255, 255);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
KillAllTimeBombs()
|
KillAllTimeBombs()
|
||||||
@ -87,6 +85,7 @@ PerformTimeBomb(client, target, toggle)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
KillTimeBomb(target);
|
KillTimeBomb(target);
|
||||||
|
SetEntityRenderColor(client, 255, 255, 255, 255);
|
||||||
LogAction(client, target, "\"%L\" removed a TimeBomb on \"%L\"", client, target);
|
LogAction(client, target, "\"%L\" removed a TimeBomb on \"%L\"", client, target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -105,6 +104,7 @@ PerformTimeBomb(client, target, toggle)
|
|||||||
if (g_TimeBombTimers[target] != INVALID_HANDLE)
|
if (g_TimeBombTimers[target] != INVALID_HANDLE)
|
||||||
{
|
{
|
||||||
KillTimeBomb(target);
|
KillTimeBomb(target);
|
||||||
|
SetEntityRenderColor(client, 255, 255, 255, 255);
|
||||||
LogAction(client, target, "\"%L\" removed a TimeBomb on \"%L\"", client, target);
|
LogAction(client, target, "\"%L\" removed a TimeBomb on \"%L\"", client, target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -163,6 +163,7 @@ public Action:Timer_TimeBomb(Handle:timer, any:client)
|
|||||||
|
|
||||||
ForcePlayerSuicide(client);
|
ForcePlayerSuicide(client);
|
||||||
KillTimeBomb(client);
|
KillTimeBomb(client);
|
||||||
|
SetEntityRenderColor(client, 255, 255, 255, 255);
|
||||||
|
|
||||||
if (GetConVarInt(g_TimeBombMode) > 0)
|
if (GetConVarInt(g_TimeBombMode) > 0)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user