Disable/enable code? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Disable/enable code? (
/showthread.php?tid=409042)
Disable/enable code? -
Sellize - 20.01.2013
Hey ive seen something like this before:
You have a piece of code that will only be used when something is configurated at the top of the script like #define NoWeather or whatever... How can i do something like this?
Re: Disable/enable code? -
Devilxz97 - 20.01.2013
using a variables.
pawn Код:
new Disable[MAX_PLAYERS];
Re: Disable/enable code? -
Sinner - 20.01.2013
You're right, use defines.
Then:
pawn Код:
#if defined SOMETHING
// Put your code here, it'll only be executed/compiled if SOMETHING is defined, otherwise it will be skipped
#else
// Code if its NOT defined
#endif
Re: Disable/enable code? -
Vince - 20.01.2013
https://sampwiki.blast.hk/wiki/Keywords:Directives