View Single Post
Author Message
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 09-22-2010 , 17:27   [NATIVE] Player AirAccelerate
Reply With Quote #1

It has been said that changing sv_airaccelerate for only one player was impossible.
Well, that statement is no longer true.

The following natives allow you to modify a player's airaccelerate value:
Code:
/*  * Sets a player's personal value for airaccelerate  *  * @param    id - The player index  * @param    airaccelerate - The value for airaccelerate  *  * @return    The value for airaccelerate before setting to new value  *  * @note    Use 0 as id to set all players' airaccelerate  *  */ native set_user_airaccelerate(id, const airaccelerate); /*  * Gets a player's personal value for airaccelerate  *  * @param    id - The player index  *  * @return    The value for airaccelerate  *  */ native get_user_airaccelerate(id); /*  * Resets a player's personal value for airaccelerate  *  * @param    id - The player index  *  * @return    1  *  * @note    Use 0 as id to reset all players' airaccelerate  *  */ native reset_user_airaccelerate(id);

To use this, install airaccelerate.amxx above any plugin in the plugins.ini.
In the plugins that use this, you will need this line at the top:
Code:
#include <airaccelerate>
Also, the plugins using this include will obviously need to compile locally.
Here are some tutorials on compiling locally:
http://wiki.amxmodx.org/Compiling_Pl...28AMX_Mod_X%29
http://forums.alliedmods.net/showthread.php?t=130511




Requirements:



You can use my own test plugin to try it out for yourself.

Commands:
  • say /aa get
    - Shows your current airaccelerate value
  • say /aa reset
    - Resets your airaccelerate value to sv_airaccelerate
  • say /aa <integer>
    - Sets your airaccelerate value to <integer>



Feedback and suggestions are welcome.
Attached Files
File Type: inc airaccelerate.inc (1.2 KB, 1134 views)
File Type: sma Get Plugin or Get Source (airaccelerate.sma - 2787 views - 3.6 KB)
File Type: sma Get Plugin or Get Source (airaccelerate_test.sma - 1980 views - 3.1 KB)
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!

Last edited by Exolent[jNr]; 04-14-2011 at 18:18. Reason: Updated plugin.
Exolent[jNr] is offline