In this Include File.... the function below doesn't work... Anyone have any idea to fix this?
ts_set_weapon_extras(id,gunid,TSA_SILENCER,1, 1)
There are 4 different types of addons: Silencer, Scope, Laser, Flashlight
Silencer & Scope - Does not function at all.
Laser & Flashlight- Does place a beam on the weapon, but not permanently. Toggling this addon only destroys it.
For every addon, if you try and place another addon on top of another, the other disappears in replace of the new addon. EVEN if you try and combine addon ID’s. :S?
---
Code I used to experiment with this:
Code:
new clip, ammo, mode, extra, extra2
if(ts_get_weapon_info(id,gunid,clip,ammo,mode,extra,extra2) == 1)
{
new dif = extra2-TSA_SCOPE
if(dif >= 0 && dif <= 7) client_print(id,print_chat,"[GunAccessories] You already have a scope on this weapon.")
else
{
ts_set_weapon_extras(id,gunid,TSA_SCOPE,1,1)
client_print(id,print_chat,"[GunAccessories] You put a scope onto your weapon.")
}
} else { client_print(id,print_chat,"Failed"); }