AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Trash (https://forums.alliedmods.net/forumdisplay.php?f=22)
-   -   [INC] Bye bye [Trash this!] (https://forums.alliedmods.net/showthread.php?t=77940)

ot_207 09-24-2008 08:05

[INC] Bye bye [Trash this!]
 
Please delete!

Exolent[jNr] 09-24-2008 11:16

Re: [INC] Speed API
 
You should add the compatability with other plugins, so the forward is called when another plugin changes the player's maxspeed.

Also, I believe fm_get_user_maxspeed() is included with fakemeta_util. I may be wrong.

ot_207 09-24-2008 11:28

Re: [INC] Speed API
 
Quote:

Originally Posted by Exolent[jNr] (Post 690254)
You should add the compatability with other plugins, so the forward is called when another plugin changes the player's maxspeed.

Also, I believe fm_get_user_maxspeed() is included with fakemeta_util. I may be wrong.

Will do! This is the first release. And fm_get_user_maxspeed() is trully from fakemeta_util.inc. But I have a question is it possible to register a native that returnes a Float value? (haven't tried it yet)

danielkza 09-24-2008 14:01

Re: [INC] Speed API
 
Quote:

Originally Posted by ot_207 (Post 690261)
Will do! This is the first release. And fm_get_user_maxspeed() is trully from fakemeta_util.inc. But I have a question is it possible to register a native that returnes a Float value? (haven't tried it yet)

I never used it too, but i'm assuming adding a Float: tag to the native declaration will do. If it doesn't work, you can just ask for where to store the result, like fakemeta does, and set it by reference.

ot_207 09-24-2008 15:18

Re: [INC] Speed API
 
Quote:

Originally Posted by danielkza (Post 690345)
I never used it too, but i'm assuming adding a Float: tag to the native declaration will do. If it doesn't work, you can just ask for where to store the result, like fakemeta does, and set it by reference.

I thought of Float: tag, will try it, and for the second method, that is a good alternative.

Exolent[jNr] 09-24-2008 15:22

Re: [INC] Speed API
 
Example:

Code:
native Float:my_function();
Code:
public plugin_natives() {     register_native("my_function", "_my_function"); } public Float:_my_function(plugin, params) {     return 1.0; }

XxAvalanchexX 09-24-2008 21:52

Re: [INC] Speed API
 
You will have to be careful about recursion if you execute the forward when another plugin changes the speed. Most likely every plugin using the forward will change the speed during the forward, so even if you prevent self-recursion, if you have at least 2 plugins using the forward then it will snowball infinitely.

Also, fakemeta_util is a default include now (in case you didn't already know), but by including it you might up the size of the plugin a little bit.

ot_207 09-25-2008 03:51

Re: [INC] Speed API v2.0
 
Updated it! It has more functions now ;).
Suggestions are welcomed!

XxAvalanchexX 09-25-2008 16:12

Re: [INC] Speed API v2.0
 
It looks like you didn't update the SMA. ;)

ot_207 09-25-2008 17:16

Re: [INC] Speed API v2.0
 
Quote:

Originally Posted by XxAvalanchexX (Post 690832)
It looks like you didn't update the SMA. ;)

Thanks for the notice! Updated it!


All times are GMT -4. The time now is 03:39.

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