AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   is_module_loaded (https://forums.alliedmods.net/showthread.php?t=29721)

Z@C 06-11-2006 07:48

is_module_loaded
 
how this function must be used?
write example for me,PLZ

VEN 06-11-2006 07:50

Code:
if (is_module_loaded("mymodule") != -1)     server_print("My module is loaded!")

Code:
/* Checks whether a module is loaded. If it is not, the return value is -1, otherwise * the return value is the module id. The function is case insensitive. */ native is_module_loaded(const name[]);

Z@C 06-11-2006 07:59

oh,sorry ...
i mean native get_module(id, name[], nameLen, author[], authorLen, version[], versionLen, &status);
i can write this:
get_module(id,"cstrike",7,_,_,version,63)

VEN 06-11-2006 08:38

Here is how you probably will use that:
Code:
new id = is_module_loaded("cstrike") if (id != -1) {     new name[32], author[31], version[10], status     get_module(id, name, 31, author, 31, version, 9, status)     server_print("Module ^"%s^" v%s by ^"%s^" is loaded", name, version, author) }

Z@C 06-11-2006 09:01

i need this for get value of command "version" of HLmod>CStrike
not for get information about cstrike_amxx.dll or cstrike_amxx.so
can i do that?

VEN 06-11-2006 09:35

No.

Z@C 06-11-2006 11:46

you know how can i do this?

VEN 06-11-2006 12:26

I'm afraid that this is not possible. AMXX is a serverside mod, each client's "version" outputs strictly to their client side.


All times are GMT -4. The time now is 07:59.

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