AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   [Question] Tinkering with FOV (https://forums.alliedmods.net/showthread.php?t=60710)

SamuraiBarbi 09-10-2007 18:57

[Question] Tinkering with FOV
 
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!

BAILOPAN 09-10-2007 21:19

Re: [Question] Tinkering with FOV
 
That looks like the right equivalent.

Nican 09-10-2007 21:19

Re: [Question] Tinkering with FOV
 
Never mind D:

SamuraiBarbi 09-10-2007 21:38

Re: [Question] Tinkering with FOV
 
yeah, it looks right but for some reason it doesn't work. doesn't seem to change the FOV at all.

SamuraiBarbi 09-10-2007 21:43

Re: [Question] Tinkering with FOV
 
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 09-10-2007 22:30

Re: [Question] Tinkering with FOV
 
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!

Nican 09-10-2007 22:33

Re: [Question] Tinkering with FOV
 
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...

SamuraiBarbi 09-10-2007 23:07

Re: [Question] Tinkering with FOV
 
OOO! That's perfect! Thank you so much!

SamuraiBarbi 09-25-2007 07:56

Re: [Question] Tinkering with FOV
 
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?

Nican 09-25-2007 16:08

Re: [Question] Tinkering with FOV
 
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


All times are GMT -4. The time now is 19:34.

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