Raised This Month: $ Target: $400
 0% 

Multi script variable


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DPAKOH
Member
Join Date: Oct 2005
Location: Russia, Moscow
Old 11-18-2006 , 12:32   Multi script variable
Reply With Quote #1

How can I create array in script, which (array) can be accessed from different scripts?
__________________
Sorry for bad english

Dubki CS 1.6 Servers: http://www.cs.dubki.ru/
Server: 2 x AMD Opteron 275 = 4 cores x 2.2 Ghz, 2x1Gb ECC DDR400 Mem.

Last edited by DPAKOH; 11-18-2006 at 15:45.
DPAKOH is offline
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 11-18-2006 , 14:31   Re: Mulit script variable
Reply With Quote #2

Use dynamic natives. Look in the Coding Tutorial section for a tutorial on it
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
DPAKOH
Member
Join Date: Oct 2005
Location: Russia, Moscow
Old 11-18-2006 , 15:45   Re: Mulit script variable
Reply With Quote #3

I didn't find it
It's register_native?
How it can help me?
__________________
Sorry for bad english

Dubki CS 1.6 Servers: http://www.cs.dubki.ru/
Server: 2 x AMD Opteron 275 = 4 cores x 2.2 Ghz, 2x1Gb ECC DDR400 Mem.

Last edited by DPAKOH; 11-18-2006 at 15:51.
DPAKOH is offline
The Specialist
BANNED
Join Date: Nov 2006
Old 11-18-2006 , 18:41   Re: Multi script variable
Reply With Quote #4

http://forums.alliedmods.net/showthread.php?t=41251
The Specialist is offline
Send a message via AIM to The Specialist
DPAKOH
Member
Join Date: Oct 2005
Location: Russia, Moscow
Old 11-19-2006 , 15:34   Re: Multi script variable
Reply With Quote #5

I read this... I think it's not detailed information
Which script use this technology? I want to see some examples.
__________________
Sorry for bad english

Dubki CS 1.6 Servers: http://www.cs.dubki.ru/
Server: 2 x AMD Opteron 275 = 4 cores x 2.2 Ghz, 2x1Gb ECC DDR400 Mem.
DPAKOH is offline
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
DPAKOH
Member
Join Date: Oct 2005
Location: Russia, Moscow
Old 11-19-2006 , 20:14   Re: Multi script variable
Reply With Quote #7

oO
THANK YOU!
__________________
Sorry for bad english

Dubki CS 1.6 Servers: http://www.cs.dubki.ru/
Server: 2 x AMD Opteron 275 = 4 cores x 2.2 Ghz, 2x1Gb ECC DDR400 Mem.
DPAKOH is offline
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:52.


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