[Question] How to share the same function?
#3

The use of new and alternative functions. Method found. Decided

test1.inc > If not available
PHP Code:
#if !defined  debug_1
#define debug_1 new_debug_1
stock debug_1() {
    print(
"debug file 1");
}
#endif 
test2.inc < used functions
PHP Code:
#if !defined  debug_1
#define debug_1 new_debug_1
stock debug_1() {
    print(
"debug file 2");
}
#endif 
gamemode:
PHP Code:
#include <a_samp>
#include <test1> //faworite functions
#include <test2> //alternative functions
main()
{
    print(
"\n----------------------------------");
    print(
" Blank Gamemode by your name here");
    print(
"----------------------------------\n");
    
    print(
"sta");
    
debug_1();
    print(
"eof");

Print if all included:
Code:
sta
debug file 1
eof
Print if one #include <test2> included:
Code:
sta
debug file 2
eof
Reply


Messages In This Thread
[Question] How to share the same function? - by Logofero - 14.05.2015, 11:50
Re: [Question] How to share the same function? - by ikkentim - 14.05.2015, 13:07
Re: [Question] How to share the same function? - by Logofero - 14.05.2015, 17:33
Respuesta: [Question] How to share the same function? - by admantis - 14.05.2015, 18:17

Forum Jump:


Users browsing this thread: 1 Guest(s)