AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   TS & SetFOV (https://forums.alliedmods.net/showthread.php?t=24372)

Charr 02-20-2006 17:16

TS & SetFOV
 
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;         }     } }

Twilight Suzuka 02-20-2006 17:18

TS uses different messages, and won't let you change the fov like that.

Charr 02-20-2006 17:27

I have used engine's entity_set_float before and it worked, just won't work in this case.

Also, should I use post think instead of prethink for that?

Twilight Suzuka 02-20-2006 18:16

Might work. TS has its own validation system for FOV.

Sandurr 02-24-2006 15:20

any place to find all those "specialties" that TS has?

Twilight Suzuka 02-24-2006 15:33

Only my brain.

Sandurr 02-24-2006 15:37

user_kill(twilight)

public death_msg(deadguy)
{

new name[1337]
get_name(deadguy,name,1337-1)
if(equali(name,"twilight"))
rip_brain()
}

asdfaiuflksajflk

Mind Sharing?

Twilight Suzuka 02-24-2006 16:10

Quote:

Originally Posted by Sandurr
user_kill(twilight)

public death_msg(deadguy)
{

new name[1337]
get_name(deadguy,name,1337-1)
if(equali(name,"twilight"))
rip_brain()
}

asdfaiuflksajflk

Mind Sharing?

Horrid code. IM me for info.

Charr 02-24-2006 21:02

Quote:

Originally Posted by Charr
Also, should I use post think instead of prethink for that?

As I expected, it didn't work.


All times are GMT -4. The time now is 20:24.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.