Posts: 1,008
Threads: 101
Joined: Apr 2008
Reputation:
0
I've tryed this before, but like say i had a command, and before i start the server, i want to disable it? so instead of going ALL THE WAY down the script to disable it, theres a simple variable at the top i can just change to 0 to disable it.
this probably has been done before, anyone know?
thanks in adavance.
Posts: 1,008
Threads: 101
Joined: Apr 2008
Reputation:
0
Not what i mean, Like at the top of your script.
Test = 1;
then on the command theres somthing. When i want to disable the command or function i change test to
Test = 0;
EDIT: angel knows what i mean. thanks,.
Posts: 1,008
Threads: 101
Joined: Apr 2008
Reputation:
0
Well shit, then does anyone know how i would do this?
At the top i can disable or enable the command.
Posts: 1,008
Threads: 101
Joined: Apr 2008
Reputation:
0
Yeah man, kinda like that. basicly, i have a function and a command i want to disable from the top of the script near my defines and what not. kind of like junkbuster. just needing a way where i can just put 0 to disable it. ill give your way a try.
Posts: 1,494
Threads: 120
Joined: Dec 2009
Reputation:
0
Nope, just like it is... Also if you don't want to be able to use the function (at all in script usage) comment the #define UseFunction
EDIT: well you can try like #define UseFunction 1
Posts: 1,494
Threads: 120
Joined: Dec 2009
Reputation:
0
My baby The Toni made it for me.
Posts: 1,008
Threads: 101
Joined: Apr 2008
Reputation:
0
@WillSuckForCandy: ok, ive seen alot of people with avatars like yours, also, i get one error with that code, says unkown symbol define on the line
#if define UseFunction
Idea?
Posts: 1,494
Threads: 120
Joined: Dec 2009
Reputation:
0
#if defined UseFunction
EDIT: Left out the D may been my fault.
Posts: 1,008
Threads: 101
Joined: Apr 2008
Reputation:
0
Ahh, alright simple mistake, how would i return it with a message? like if its not defined, "this command is disabled"
Posts: 1,494
Threads: 120
Joined: Dec 2009
Reputation:
0
hmm.. Dunno just OnPlayerCommandText where it should return 0; just have it say Command not recognized and/or has been disabled.
Posts: 1,008
Threads: 101
Joined: Apr 2008
Reputation:
0
Yeah, i guess i can do that. thanks for the help, Also, have toni hit me up one of those boss avatars, I would ask him myself, but i use msn anymore to contact him. thanks again.