I tried make a plugin that give a player deagle with no ammo and I used this code but the client keep getting deagle with full ammo
PHP Code:
if (IsClientInGame(client) && GetClientTeam(client) == CS_TEAM_CT || IsClientInGame(client) && GetClientTeam(client) == CS_TEAM_T && CheckCommandAccess(client, "sm_admin", ADMFLAG_GENERIC))
{
PrintToChatAll("%s All the terrorist got empty deagle!", PREFIX);
for (int i = 1; i <= MaxClients; i++)
if (IsClientInGame(i) && GetClientTeam(i) == CS_TEAM_T && IsPlayerAlive(i))
{
Client_RemoveAllWeapons(i);
Client_GiveWeaponAndAmmo(i, "weapon_deagle", true, 0, 0, 0, 0);
return Plugin_Handled;
}
}