please help
#1

how i make an if for include

Код:
    CMD:antimoneyhack(playerid, params[])
{
    
    #include <antimoneyhack>
    
}
is it true ?

and my error is
Код:
\gamemodes\codwaw32.pwn(8616) : error 029: invalid expression, assumed zero
\gamemodes\codwaw32.pwn(8616) : error 017: undefined symbol "cmd_antimoneyhack"
\gamemodes\codwaw32.pwn(8616) : error 029: invalid expression, assumed zero
Reply
#2

Place #include <antimoneyhack> at the top of your script
Reply
#3

Or toggle:
Код:
#define TOGGLE_AMH true

#if TOGGLE_AMH == true
    #include <antimoneyhack>
#endif
Reply
#4

Quote:
Originally Posted by F1N4L
Посмотреть сообщение
Or toggle:
Код:
#define TOGGLE_AMH true

#if TOGGLE_AMH == true
    #include <antimoneyhack>
#endif
thanks

how i make a cmd for this?
Reply
#5

You can not change the value of TOGGLE_AMH at runtime.
Reply
#6

could i set a timer for include?
Reply
#7

Quote:
Originally Posted by lordmahdi
Посмотреть сообщение
could i set a timer for include?
what are you saying you are totally misunderstood the fact about include please read this https://msdn.microsoft.com/en-us/library/36k2cdd4.aspx including means adding source (simply) to your script its not a thing called on run time (in game).
Reply
#8

When you use #include <antimoneyhack>, the code inside antimoneyhack.inc is copied inside your .pwn file. This is done at compile time (when you push F5 or F6). You can not change anything at runtime (when your sever is actually running) that is used with #define, #if, #else, ...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)