Raised This Month: $ Target: $400
 0% 

TS & SetFOV


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Charr
Senior Member
Join Date: Jul 2005
Location: Long Island, New York, U
Old 02-20-2006 , 17:16   TS & SetFOV
Reply With Quote #1

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;         }     } }
__________________
Charr is offline
Send a message via AIM to Charr Send a message via MSN to Charr
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 02-20-2006 , 17:18  
Reply With Quote #2

TS uses different messages, and won't let you change the fov like that.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
Charr
Senior Member
Join Date: Jul 2005
Location: Long Island, New York, U
Old 02-20-2006 , 17:27  
Reply With Quote #3

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?
__________________
Charr is offline
Send a message via AIM to Charr Send a message via MSN to Charr
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 02-20-2006 , 18:16  
Reply With Quote #4

Might work. TS has its own validation system for FOV.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
Sandurr
Senior Member
Join Date: Aug 2005
Old 02-24-2006 , 15:20  
Reply With Quote #5

any place to find all those "specialties" that TS has?
Sandurr is offline
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 02-24-2006 , 15:33  
Reply With Quote #6

Only my brain.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
Sandurr
Senior Member
Join Date: Aug 2005
Old 02-24-2006 , 15:37  
Reply With Quote #7

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?
Sandurr is offline
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 02-24-2006 , 16:10  
Reply With Quote #8

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.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
Charr
Senior Member
Join Date: Jul 2005
Location: Long Island, New York, U
Old 02-24-2006 , 21:02  
Reply With Quote #9

Quote:
Originally Posted by Charr
Also, should I use post think instead of prethink for that?
As I expected, it didn't work.
__________________
Charr is offline
Send a message via AIM to Charr Send a message via MSN to Charr
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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