Ok so my plugin allows you to change how much metal you can have thus setting the windowmakers ammo but I found an issue on my bug tracker that someone had found the this breaks the gun allowing infinite ammo in game and not depleting the ammo this causes a lot of issues from what I can think of and I'm not entirely sure its something that could be fixed unless not allowing them the extra metal if they have the weapon active
Taken from my premium plugin
PHP Code:
Premium(client)
{
if( IsValidEntity(client) && IsClientInGame(client) && IsPlayerAlive(client) )
{
new health = GetClientHealth(client);
new TFClassType:pClass = TF2_GetPlayerClass(client);
if(cHPBoost > 1)
SetEntityHealth(client, health + cHPBoost);
if(cGravity != 1)
SetEntityGravity(client, cGravity);
if(cJarates > 1)
SetGrenadeAmmo(client, cJarates, 58, 1);
if(cStunballs > 1)
SetGrenadeAmmo(client, cStunballs, 44, 2);
if(pClass == TFClass_Medic)
SetEntPropFloat(GetPlayerWeaponSlot(client, 1), Prop_Send, "m_flChargeLevel", cUber * 0.01);
if(pClass != TFClass_Heavy && pClass != TFClass_Medic && pClass != TFClass_Pyro && pClass != TFClass_Sniper)
SetEntProp(GetPlayerWeaponSlot(client, 0), Prop_Send, "m_iClip1", GetEntProp(GetPlayerWeaponSlot(client, 0), Prop_Send, "m_iClip1") + cClip);
if(pClass == TFClass_Engineer)
SetEntData(client, FindDataMapOffs(client, "m_iAmmo") + (3 * 4), cMetal, 4, true); // this part here
if(cColor > 0)
SetClientColor(client, cColor);
if(pClass == TFClass_Spy)
SetEntityRenderColor(client, 255, 255, 255, 0);
pSpeed[client] = GetEntPropFloat(client, Prop_Send, "m_flMaxspeed");
if(pFov[client] == 0)
pFov[client] = cDefaultFov;
SetEntData(client, offsFOV, pFov[client], 1);
}
}