Raised This Month: $ Target: $400
 0% 

view spin 360 degres .


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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