Is there a way to make a function in a WNPC(say, onPlayerenters()) wait until the same function in the level is called before continuing? For example I have a scripted map that relies on default map being disabled. However on servers like UN with extensive level scripts running all the time and some enabling the default map, depending on circumstance and lag, the level function is called after the WNPC map's, thus reenabling the default map after my script has disabled it.
This is what I tried:
PHP Code:
function onPlayerenters() {
disablemap();
waitfor(level,"onPlayerEnters",5);
player.chat = "test";
disablemap();
}
But that doesn't seem to work. Any ideas?