I'm trying to make a plugin that pays players once the easter egg is completed. I've got it mostly finished but i am unsure of how to detect when the EE is done.
I thought maybe:
easterEggComplete()
{
self endon("disconnect");
level endon("end_game");
path = "bank/" + self getGuid() + ".txt";
if (fileExists(path))
{
level waittill("ee_complete")
player.pers["bank"] = int(player.pers["bank"]) + 250000;
player updateBankValue(player.pers["bank"]);
player tell("^2$^7" + valueToString(250000) + " deposited for finishing EE");
}
}
Would work. I think im using waittill on the wrong dvar, or maybe that dvar doesn't even exist?
Any help would be great.