- Автор
-
Unknown
- Совместимость с
- Amx Mod X 1.8.2, Amx Mod X 1.9.0, Amx Mod X 1.10.0 dev
Simple wrapper on (un-) set/get env stdlib functions.
Usage example:
Usage example:
Код:
#include <amxmodx>
#include <EnvironmentVariables>
new errno;
public t1(id){
//If name doesn't exist in the environment, then its value is changed to value
server_print("%d",SetEnvironmentVariable("chocopie","kekc",false));
}
public e2(id){
//If name does exist in the environment, then its value is changed to value
server_print("%d|err %d",SetEnvironmentVariable("chocopie","kekc123",true,errno),errno);
}
public s3(id){
//Deletes the variable name from the environment
server_print("%d",UnSetEnvironmentVariable("chocopie"));
}
public t4(id){
/* Set's buffer to environment value and return Number of cells written to buffer. */
new path[64]; server_print("--%d|%s--",GetEnvironmentVariable("chocopie",path, 63),path);
}
public plugin_init(){
register_concmd("1","t1");
register_concmd("2","e2");
register_concmd("3","s3");
register_concmd("4","t4");
}