mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-06 19:13:21 +00:00
epi: Up players active ammo on ammo pack use
This commit is contained in:
parent
f692231542
commit
62788435d4
1 changed files with 4 additions and 2 deletions
|
@ -228,7 +228,7 @@ public Action Event_PlayerSpawn(Event event, const char[] name, bool dontBroadca
|
||||||
if(firstSaferoomDoorEntity > 0 && percentIn > hMinPlayersSaferoomDoor.FloatValue) {
|
if(firstSaferoomDoorEntity > 0 && percentIn > hMinPlayersSaferoomDoor.FloatValue) {
|
||||||
UnlockDoor(firstSaferoomDoorEntity, 2);
|
UnlockDoor(firstSaferoomDoorEntity, 2);
|
||||||
}
|
}
|
||||||
}else{
|
}else if(firstSaferoomDoorEntity > 0) {
|
||||||
UnlockDoor(firstSaferoomDoorEntity, 2);
|
UnlockDoor(firstSaferoomDoorEntity, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -481,7 +481,9 @@ public Action OnUpgradePackUse(int entity, int activator, int caller, UseType ty
|
||||||
if(clients.Length == 0) {
|
if(clients.Length == 0) {
|
||||||
CreateTimer(60.0, Timer_ResetAmmoPack, entity);
|
CreateTimer(60.0, Timer_ResetAmmoPack, entity);
|
||||||
}
|
}
|
||||||
|
if(GetEntProp(primaryWeapon, Prop_Send, "m_iClip1") < ammo) {
|
||||||
|
SetEntProp(primaryWeapon, Prop_Send, "m_iClip1", ammo);
|
||||||
|
}
|
||||||
SetEntProp(primaryWeapon, Prop_Send, "m_nUpgradedPrimaryAmmoLoaded", ammo);
|
SetEntProp(primaryWeapon, Prop_Send, "m_nUpgradedPrimaryAmmoLoaded", ammo);
|
||||||
clients.Push(activator);
|
clients.Push(activator);
|
||||||
ClientCommand(activator, "play player/orch_hit_csharp_short.wav");
|
ClientCommand(activator, "play player/orch_hit_csharp_short.wav");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue