Иконка ресурса

addons Environment Variables 0.0.2

Нет прав для скачивания
Версия Дата выхода Скачиваний Оценка
0.0.2 19 0.00 звёзд 0 оценок
0.0.1 5 0.00 звёзд 0 оценок
Added windows version.
Now it's an pure amxmodx module and can be found only in amxx modules output.
Some code and compile options improvments.
enviroment -> environment.


Код:
#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 t5(id){
    /* Set's buffer to environment value and return Number of cells written to buffer. */
    new path[64]; server_print("--%d|%s--",GetEnvironmentVariable("PATH",path, 63),path);
}
public plugin_init(){
    register_concmd("1","t1");
    register_concmd("2","e2");
    register_concmd("3","s3");
    register_concmd("4","t4");
    register_concmd("5","t5");
}
Сверху Снизу