Raised This Month: $ Target: $400
 0% 

Calling from another plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bwgrubbs1
Senior Member
Join Date: Sep 2006
Old 04-30-2007 , 14:42   Calling from another plugin
Reply With Quote #1

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??
bwgrubbs1 is offline
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 04-30-2007 , 14:55   Re: Calling from another plugin
Reply With Quote #2

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.
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
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 06:36.


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