GiveResource(own, ammotype, own.(weaponentity).(weapon_load[i]));
own.(weaponentity).(weapon_load[i]) = -1; // schedule the weapon for reloading
}
- SetResourceAmount(wep, ammotype, 0);
+ SetResource(wep, ammotype, 0);
}
else if(doreduce)
{
own.(weaponentity).(weapon_load[i]) = -1; // schedule the weapon for reloading
}
- float ownderammo = GetResourceAmount(own, ammotype);
- float thisammo = min(ownderammo, GetResourceAmount(wep, ammotype));
- SetResourceAmount(wep, ammotype, thisammo);
- SetResourceAmount(own, ammotype, ownderammo - thisammo);
+ float ownderammo = GetResource(own, ammotype);
+ float thisammo = min(ownderammo, GetResource(wep, ammotype));
+ SetResource(wep, ammotype, thisammo);
+ SetResource(own, ammotype, ownderammo - thisammo);
return thisammo;
}