Raised This Month: $ Target: $400
 0% 

view spin 360 degres .


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 08-27-2008 , 11:32   view spin 360 degres .
Reply With Quote #1

Fast question :

How can I spin someones view with 360 degres
so a that the player his view does a full turn .
Somebody knows ?
__________________
I am out of order!
grimvh2 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-27-2008 , 11:43   Re: view spin 360 degres .
Reply With Quote #2

Code:
new g_yawspeed[33][6]; new Float:g_start_angle[33]; new bool:g_spinning[33]; #define SPIN_SPEED 100 public plugin_init() {     register_forward(FM_PlayerPreThink, "FwdPlayerPreThink"); } public FwdPlayerPreThink(id) {     if( g_spinning[id] )     {         new Float:angles[3];         pev(id, pev_v_angle, angles);         // cant remember if its pev_v_angle or pev_angles                 if( floatabs(angles[1] - g_start_angle[plr]) < 5.0 )         {             client_cmd(id, "-left; cl_yawspeed %s", g_yawspeed[id]);             g_spinning[id] = false;         }     } } SpinPlayer(id) {     query_client_cvar(id, "cl_yawspeed", "DoSpin"); } public DoSpin(id, const cvar_name[], const cvar_value[]) {     copy(g_yawspeed[id], sizeof(g_yawspeed[]) - 1, cvar_value);         client_cmd(id, "cl_yawspeed %i; +left", SPIN_SPEED);     //g_spinning[id] = true;         new Float:angles[3];     pev(id, pev_v_angle, angles);     // again, I can't remember which it was         g_start_angle[plr] = angles[1];         set_task(0.5, "TaskAllowStop", plr); } public TaskAllowStop(plr) {     g_spinning[plr] = true; }

Code:
public myfunction(id) {     SpinPlayer(id); // spins player for 360 degree turn }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!

Last edited by Exolent[jNr]; 08-29-2008 at 15:49.
Exolent[jNr] is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 08-27-2008 , 15:39   Re: view spin 360 degres .
Reply With Quote #3

Or you can add +1.0 or w/e to original angle[1] until is equal to initial one.This in case you don't want to use client_cmd()...

Hi Exolent.

EDIT:Yea, indeed.

Last edited by Alka; 08-27-2008 at 15:42.
Alka is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-27-2008 , 15:41   Re: view spin 360 degres .
Reply With Quote #4

Hi Alka! I have another way of doing it like you said, but it's not as smooth like the one I showed.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 08-27-2008 , 16:28   Re: view spin 360 degres .
Reply With Quote #5

Thanks , gonna test it now .

Sorry for late reply I was footballing
__________________
I am out of order!
grimvh2 is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 08-29-2008 , 11:32   Re: view spin 360 degres .
Reply With Quote #6

Well I tested it and it doesnt stop with spinning , also is there a way to make it faster ?
__________________
I am out of order!
grimvh2 is offline
[X]-RayCat
Senior Member
Join Date: Sep 2006
Old 08-29-2008 , 13:50   Re: view spin 360 degres .
Reply With Quote #7

you must set the yawspeed higher.
[X]-RayCat is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-29-2008 , 15:48   Re: view spin 360 degres .
Reply With Quote #8

Changed the plugin a bit, highlighted lines changed.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 08-29-2008 , 16:27   Re: view spin 360 degres .
Reply With Quote #9

Quote:
Originally Posted by Exolent[jNr] View Post
Changed the plugin a bit, highlighted lines changed.
Thanks again , ill test it .
__________________
I am out of order!
grimvh2 is offline
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 03:18.


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