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

[NATIVE] Player AirAccelerate


Post New Thread Reply   
 
Thread Tools Display Modes
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, 1116 views)
File Type: sma Get Plugin or Get Source (airaccelerate.sma - 2761 views - 3.6 KB)
File Type: sma Get Plugin or Get Source (airaccelerate_test.sma - 1953 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
platzpatrone
Veteran Member
Join Date: Apr 2007
Location: Germany
Old 09-22-2010 , 17:32   Re: [NATIVE] Player AirAccelerate
Reply With Quote #2

nice Exolent, u uber haxorizor
platzpatrone is offline
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 09-22-2010 , 17:59   Re: [NATIVE] Player AirAccelerate
Reply With Quote #3

I think some of the natives posted in the code snippets are valuable enough to be put in a newer version of amxmodx. Very nice!
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 09-22-2010 , 19:14   Re: [NATIVE] Player AirAccelerate
Reply With Quote #4

Forgot to add requirements for this.
They are now in the first post.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 09-22-2010 , 19:57   Re: [NATIVE] Player AirAccelerate
Reply With Quote #5

Quote:
Originally Posted by Exolent[jNr] View Post
Forgot to add requirements for this.
They are now in the first post.
Bah. Orpheu.
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-22-2010 , 20:00   Re: [NATIVE] Player AirAccelerate
Reply With Quote #6

You better avoid to use the memory file PM, it uses offset and can be easily broken on update. It would be more safe to save it from PM_Move.

Quote:
Bah. Orpheu.
You have not idea how it's damn useful. ^^
__________________
Arkshine is offline
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 09-22-2010 , 21:07   Re: [NATIVE] Player AirAccelerate
Reply With Quote #7

Quote:
Originally Posted by Arkshine View Post
You better avoid to use the memory file PM, it uses offset and can be easily broken on update. It would be more safe to save it from PM_Move.



You have not idea how it's damn useful. ^^
Well of course, Orpheu is the best solution for everything
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 09-22-2010 , 22:08   Re: [NATIVE] Player AirAccelerate
Reply With Quote #8

Quote:
Originally Posted by Arkshine View Post
You better avoid to use the memory file PM, it uses offset and can be easily broken on update. It would be more safe to save it from PM_Move.
Agreed and updated.

Quote:
Originally Posted by GXLZPGX View Post
Well of course, Orpheu is the best solution for everything
No, it's not. But it is powerful when needed.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 09-22-2010 , 22:13   Re: [NATIVE] Player AirAccelerate
Reply With Quote #9

Good work. This probably won't receive as much appreciation as the hard work you put into this deserves, but it will be very useful to many people.
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 09-22-2010 , 22:15   Re: [NATIVE] Player AirAccelerate
Reply With Quote #10

Quote:
Originally Posted by wrecked_ View Post
Good work. This probably won't receive as much appreciation as the hard work you put into this deserves, but it will be very useful to many people.
It actually wasn't that much work.
All I had to do was look in the PM_AirAccelerate function to see what was happening and realized what needed to be done.
But thanks for appreciating my work
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
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 04:42.


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