I am trying to modify people's FOV when SetFOV is called, but the problem is SetFOV is never called. I tried using this in client prethink but that didn't work either:
Code:
new gScope[33][36][2],gFov[33];
new gInScope[33] = {0,...};
...
public client_PreThink(id)
{
gFov[id] = entity_get_float(id,EV_FL_fov);
new clip,ammo,mode,extra,weapon = ts_getuserwpn(id,clip,ammo,mode,extra);
if(is_user_alive(id) && gFov[id] < 90.0 && gFov[id] != gScope[id][weapon][0] && gFov[id] != gScope[id][weapon][1])
{
if(!gInScope[id] && extra & TSA_SCOPE && gScope[id][weapon][0])
{
entity_set_float(id,EV_FL_fov,gScope[id][weapon][0]);
gInScope[id]++;
}
else if(gInScope[id] == 1 && extra & TSA_SCOPE && gScope[id][weapon][1])
{
entity_set_float(id,EV_FL_fov,gScope[id][weapon][1]);
gInScope[id]++;
}
else if(gInScope[id] == 2)
{
entity_set_float(id,EV_FL_fov,90.0);
gInScope[id] = 0;
}
}
}
__________________