AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Calling from another plugin (https://forums.alliedmods.net/showthread.php?t=54641)

bwgrubbs1 04-30-2007 14:42

Calling from another plugin
 
Is there a way to call a function from one plugin to another plugin...like lets say in one plugin i have random numbers generated and if you get 1 < x < 6 then it does this command amx_blahblah on specified user??

teame06 04-30-2007 14:55

Re: Calling from another plugin
 
Code:
#include <amxmodx> public plugin_natives() {     register_natives("hat", "_hat"); } public _hat(plugin_id, parameters) {     return random_num(0, 1000); } // End of one plugin /* Include file */ if #defined _hat_included   #endinput #endif #define _hat_included native hat(); // end of include file #include <amxmodx> #include <hat> public plugin_init() {     server_print("Random Number [%d]", hat()); }

That how you make a native and call that native. There a tutorial about dynamic natives in the tutorial section if you want to read any more about it.


All times are GMT -4. The time now is 06:36.

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