Raised This Month: $ Target: $400
 0% 

Multi script variable


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 11-19-2006 , 16:29   Re: Multi script variable
Reply With Quote #6

Code:
// This is the plugin your going to get the variable from. // This is using AMXX api style natives #include <amxmodx> new Var[33] = { 9999, ... } ; public plugin_natives() {     register_library("MyScript");     register_native("GetThisVar", "_GetThisVar"); } public _GetThisVar(pluginid, param) {     new index = get_param(1);         return Var[index]; }

Code:
// This file will be name like ThisPlugin.inc and put into your include folder in the compiler. #if defined _ThisInclude_included   #endinput #endif #define _ThisInclude_included native GetThisVar(player);


Code:
// This is the plugin using the native #include <amxmodx> #include <ThisPlugin> public plugin_init() {     register_concmd("run", "cmdRun"); } public cmdRun(id) {     server_print("This is suppose to be 9999. The value of that variable is [%d]", GetThisVar(id)); }
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
 



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:52.


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