14.07.2016, 12:22
stock means that if that function is not used in your script, it will not be added to the .amx while compiling.
So if you have this:
So if you have this:
Код:
//In OnPlayerCommandText if(!strcmp(cmdtext, "/mycommand", true) { Func1(); Func2(); return 1; } //Somewhere in your script Func1() { //Do something } stock Func2() { //Do something } stock Func3() { //Do something } Func4() { //Do something }
- Func1 will be included in the .amx file, because it is not stock and is used in the command.
- Func2 will be included in the .amx file, because it is stock and used in the command.
- Func3 will be NOT included in the .amx file, because it is stock and not used.
- Func4 will give a compile warning that it is not used.