Use 'give' directly

This commit is contained in:
Jackz 2022-08-18 23:23:45 -05:00
parent 4a5cd83c66
commit 68a43a78cf
No known key found for this signature in database
GPG key ID: E0BBD94CF657F603
2 changed files with 5 additions and 10 deletions

Binary file not shown.

View file

@ -735,7 +735,6 @@ public void Frame_SetupNewClient(int client) {
Format(weaponName, sizeof(weaponName), "weapon_%s", TIER1_WEAPONS[GetRandomInt(0, TIER1_WEAPON_COUNT - 1)]);
PrintToServer("[EPI/debug] Giving new client (%N) tier 1: %s", client, weaponName);
}
int item = GivePlayerItem(client, weaponName);
if(lowestClient > 0) {
float pos[3];
GetClientAbsOrigin(lowestClient, pos);
@ -743,15 +742,11 @@ public void Frame_SetupNewClient(int client) {
}
delete tier2Weapons;
if(item > 0) {
if(L4D2_IsValidWeapon(weaponName)) {
L4D_SetReserveAmmo(client, item, L4D2_GetIntWeaponAttribute(weaponName, L4D2IWA_Bullets));
SetEntProp(item, Prop_Send, "m_iClip1", L4D2_GetIntWeaponAttribute(weaponName, L4D2IWA_ClipSize));
CheatCommand(client, "give", weaponName[7], "");
} else {
LogError("EPI: INVALID WEAPON: %s for %N", weaponName, client);
}
EquipPlayerWeapon(client, item);
} else LogError("EPI Failed to give new late player weapon: %s", weaponName);
}
public Action Timer_RemoveInvincibility(Handle h, int client) {
SDKUnhook(client, SDKHook_OnTakeDamage, OnInvincibleDamageTaken);