1
Modification Help / Parent Delay
« on: January 18, 2016, 02:03:59 PM »Code: [Select]
package hasLight{
function serverCmdLight(%client){
if(!%client.hasLight){
%client.hasLight = true;
}
else{
%client.hasLight = false;
}
schedule(5000,0,parent::serverCmdLight(%client));
}
};
activatePackage(hasLight);
So basically this code detects whether or not a player has their light out..what I'm TRYING to make it do is have a 5 second delay so that it takes
5 seconds to turn it on/off. For some reason that won't work... how can
I fix this? Also, do I need my own code to detect players' lights? I feel like
there was already some code written in for that. If so, what is it?