Raised This Month: $12 Target: $400
 3% 

[Question] Tinkering with FOV


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SamuraiBarbi
Senior Member
Join Date: Aug 2006
Location: United States
Old 09-10-2007 , 18:57   [Question] Tinkering with FOV
Reply With Quote #1

Hello everyone. I was trying to tinker with clients FOV, ( not by execing anything on their end, but just something temporary that undoes itself when they leave the server ) and what I think should work isn't. I'm coding this specifically for Counterstrike Source, not sure if it matters or not.

What I've attempted was:

SetEntProp(client, Prop_Send, "m_iFOV", 145, 4);

If it helps any, the es_tools equivalent would be:
es_setplayerprop event_var(userid) "CCSPlayer.baseclass.m_iFOV" 45


Anywho, if anyone could please toss a hint my way as to what the problem is I'd big time appreciate it.

Thanks!
SamuraiBarbi is offline
Send a message via AIM to SamuraiBarbi Send a message via MSN to SamuraiBarbi Send a message via Yahoo to SamuraiBarbi
BAILOPAN
Join Date: Jan 2004
Old 09-10-2007 , 21:19   Re: [Question] Tinkering with FOV
Reply With Quote #2

That looks like the right equivalent.
__________________
egg
BAILOPAN is offline
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 09-10-2007 , 21:19   Re: [Question] Tinkering with FOV
Reply With Quote #3

Never mind D:
__________________
http://www.nican132.com
I require reputation!
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
SamuraiBarbi
Senior Member
Join Date: Aug 2006
Location: United States
Old 09-10-2007 , 21:38   Re: [Question] Tinkering with FOV
Reply With Quote #4

yeah, it looks right but for some reason it doesn't work. doesn't seem to change the FOV at all.
SamuraiBarbi is offline
Send a message via AIM to SamuraiBarbi Send a message via MSN to SamuraiBarbi Send a message via Yahoo to SamuraiBarbi
SamuraiBarbi
Senior Member
Join Date: Aug 2006
Location: United States
Old 09-10-2007 , 21:43   Re: [Question] Tinkering with FOV
Reply With Quote #5

wtf, did valve break something? when i type fov in console nothing even pops up, and i can't change it at all. i tried using fov 145 in console just to see if it might had been me. can someone else try changing their own fov in console ( preferably in counterstrike source ) and verify if they experience the same thing?
SamuraiBarbi is offline
Send a message via AIM to SamuraiBarbi Send a message via MSN to SamuraiBarbi Send a message via Yahoo to SamuraiBarbi
SamuraiBarbi
Senior Member
Join Date: Aug 2006
Location: United States
Old 09-10-2007 , 22:30   Re: [Question] Tinkering with FOV
Reply With Quote #6

sorry for the triple post but I just wanted to let you guys know i figured it out. for some reason altering FOV now requires a user to run sv_cheats 1, IE. sv_cheats 1;fov 90

to my knowledge this wasn't the case several months ago. anywho, just fyi! thanks for trying guys!
SamuraiBarbi is offline
Send a message via AIM to SamuraiBarbi Send a message via MSN to SamuraiBarbi Send a message via Yahoo to SamuraiBarbi
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 09-10-2007 , 22:33   Re: [Question] Tinkering with FOV
Reply With Quote #7

Hm... I tried this:
PHP Code:
new test2;

public 
OnPluginStart()
{
    
RegConsoleCmd("test"Command_Test);
    
    
test2 FindSendPropOffs("CBasePlayer","m_iFOV");
}

public 
Action:Command_Test(client ,argc){
     
SetEntData(clienttest21454true);

I did change my view to something strange, but it did work...
__________________
http://www.nican132.com
I require reputation!
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
SamuraiBarbi
Senior Member
Join Date: Aug 2006
Location: United States
Old 09-10-2007 , 23:07   Re: [Question] Tinkering with FOV
Reply With Quote #8

OOO! That's perfect! Thank you so much!
SamuraiBarbi is offline
Send a message via AIM to SamuraiBarbi Send a message via MSN to SamuraiBarbi Send a message via Yahoo to SamuraiBarbi
SamuraiBarbi
Senior Member
Join Date: Aug 2006
Location: United States
Old 09-25-2007 , 07:56   Re: [Question] Tinkering with FOV
Reply With Quote #9

Hey, I was looking around on the wiki and saw something interesting so I figured I'd ask how to properly use it. The page I found had all these different signatures on it and one is for setting a clients fov ( only for their duration on the server I'm assuming ).

http://wiki.alliedmods.net/Useful_Si...Player::SetFOV

I'm not exactly sure how to use it though. Can someone post an example?
SamuraiBarbi is offline
Send a message via AIM to SamuraiBarbi Send a message via MSN to SamuraiBarbi Send a message via Yahoo to SamuraiBarbi
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 09-25-2007 , 16:08   Re: [Question] Tinkering with FOV
Reply With Quote #10

http://forums.alliedmods.net/showthread.php?t=57448

You see there is supercmds.gamedata.txt file and this:
PHP Code:
    StartPrepSDKCall(SDKCall_Player)
    
PrepSDKCall_SetFromConf(hGameConfSDKConf_Signature"SetModel")
    
PrepSDKCall_AddParameter(SDKType_StringSDKPass_Pointer)
    
hSetModel EndPrepSDKCall() 
Read a little from other people plugins so you can learn from it
__________________
http://www.nican132.com
I require reputation!
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
Reply


Thread Tools
Display Modes

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 13:20.


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