mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-07 09:23:21 +00:00
Use 'give' directly
This commit is contained in:
parent
4a5cd83c66
commit
68a43a78cf
2 changed files with 5 additions and 10 deletions
Binary file not shown.
|
@ -735,7 +735,6 @@ public void Frame_SetupNewClient(int client) {
|
||||||
Format(weaponName, sizeof(weaponName), "weapon_%s", TIER1_WEAPONS[GetRandomInt(0, TIER1_WEAPON_COUNT - 1)]);
|
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);
|
PrintToServer("[EPI/debug] Giving new client (%N) tier 1: %s", client, weaponName);
|
||||||
}
|
}
|
||||||
int item = GivePlayerItem(client, weaponName);
|
|
||||||
if(lowestClient > 0) {
|
if(lowestClient > 0) {
|
||||||
float pos[3];
|
float pos[3];
|
||||||
GetClientAbsOrigin(lowestClient, pos);
|
GetClientAbsOrigin(lowestClient, pos);
|
||||||
|
@ -743,15 +742,11 @@ public void Frame_SetupNewClient(int client) {
|
||||||
}
|
}
|
||||||
delete tier2Weapons;
|
delete tier2Weapons;
|
||||||
|
|
||||||
if(item > 0) {
|
|
||||||
if(L4D2_IsValidWeapon(weaponName)) {
|
if(L4D2_IsValidWeapon(weaponName)) {
|
||||||
L4D_SetReserveAmmo(client, item, L4D2_GetIntWeaponAttribute(weaponName, L4D2IWA_Bullets));
|
CheatCommand(client, "give", weaponName[7], "");
|
||||||
SetEntProp(item, Prop_Send, "m_iClip1", L4D2_GetIntWeaponAttribute(weaponName, L4D2IWA_ClipSize));
|
|
||||||
} else {
|
} else {
|
||||||
LogError("EPI: INVALID WEAPON: %s for %N", weaponName, client);
|
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) {
|
public Action Timer_RemoveInvincibility(Handle h, int client) {
|
||||||
SDKUnhook(client, SDKHook_OnTakeDamage, OnInvincibleDamageTaken);
|
SDKUnhook(client, SDKHook_OnTakeDamage, OnInvincibleDamageTaken);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue