AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved/Old Plugins (https://forums.alliedmods.net/forumdisplay.php?f=27)
-   -   Gravity API v0.3 (https://forums.alliedmods.net/showthread.php?t=278679)

Craxor 02-06-2016 04:37

Gravity API v0.3
 
2 Attachment(s)
Gravity API

Description
This plugin give you 2 natives wich you can manage user gravity(set/get).

Difference bettwen default one
  • + You can give give directly the exact gravity value you want( without calculating floats )
  • + Return the exact gravity you have
  • + Checking user alive for don't throw errors.
  • + An easy way to take/give gravity, example on "Examples" section.
  • + Save the gravity for users.
API
Quick preview of new natives:

Full documentation can be found there, as well in include file:


Example


Credit's
ChangeLog
V0.3:
  • + Added Save Gravity for users ( New Vault ).
  • + Some natives repaired and code optimized.
V0.2:
  • + Added a new native.
  • + Added some stocks
  • + Removed return -1 and put only "return".
  • + Change "iGravity < 0" to "iGravity < 1" ( Thanks to Nubo. )
V0.1:
  • + First release

HamletEagle 02-06-2016 05:13

Re: Gravity API v0.1
 
I'm not sure how such API is usefull. API is for giving control over some functionalities or to help the coder accomplish something that is hard without.

Here is not the case. Unapproved.

Craxor 02-06-2016 05:31

Re: Gravity API v0.1
 
Quote:

Originally Posted by HamletEagle (Post 2390464)
I'm not sure how such API is usefull. API is for giving control over some functionalities or to help the coder accomplish something that is hard without.

Here is not the case. Unapproved.

Not so important for me if is approved or unnaproved, just a question, if is unnaproved i have permision to continue add support for it?

Edit: give_user_gravity get_user_gravity ( native from default amxx addon ) is broken, mine working well.

HamletEagle 02-06-2016 05:48

Re: Gravity API v0.2
 
Yes, you can do whatever you want with your plugin, also it can be reviewed at any time you want.
Also, there is no give_user_gravity native in amxx core, but set_user_gravity, which you are using in your code and it's not broken in any way.

Craxor 02-06-2016 05:55

Re: Gravity API v0.2
 
Quote:

Originally Posted by HamletEagle (Post 2390470)
Yes, you can do whatever you want with your plugin, also it can be reviewed at any time you want.
Also, there is no give_user_gravity native in amxx core, but set_user_gravity, which you are using in your code and it's not broken in any way.

Lol, sorry! i wanna mean get_user_gravity :oops: .

Here: http://www.amxmodx.org/doc/index.htm...er_gravity.htm

HamletEagle 02-06-2016 06:00

Re: Gravity API v0.2
 
set_user_gravity is not broken. If you are talking about the float values, everyone should be able to understand how to use it, or simply do value/sv_gravity. API should not be a lazy wrapper around core functions.

Craxor 02-06-2016 07:18

Re: Gravity API v0.2
 
Quote:

Originally Posted by HamletEagle (Post 2390474)
set_user_gravity is not broken. If you are talking about the float values, everyone should be able to understand how to use it, or simply do value/sv_gravity. API should not be a lazy wrapper around core functions.

I'm talking about get_user_gravity

:3

( #Wrong link above sorry... )

Depresie 02-06-2016 08:09

Re: Gravity API v0.2
 
ahm, no offense, but why an API? for such thing?

Craxor 02-06-2016 08:45

Re: Gravity API v0.2
 
Quote:

Originally Posted by Depresie (Post 2390493)
ahm, no offense, but why an API? for such thing?

Normal gravity native: set_user_gravity( id, 0.5 ) // 500
My gravity native: set_player_gravity( id, 500 )

My API return corectly the user gravity, instead get_user_gravity is broken. + You have more natives to manage users gravity ( gravity_api.inc ).

But who care? If i need i use this, if not i will not use. That's all.

klippy 02-07-2016 12:26

Re: Gravity API v0.2
 
How is it broken? You never told or showed us what is broken about it? Tell us and show a code snippet that proves it.


All times are GMT -4. The time now is 15:45.

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