Seriously this time, last thread for a while. This is my third thread.
function radiationtimer(%player)
{
%newobjectid = findclientbyname(%cl.name);
schedule(1000, 0, "radiationdamage(%player)", %newobjectid);
}
function radiationdamage(%player)
{
%newobjectid.player.addHealth(-25);
}
function STATFUNCTION(%cl)
{
%radiation = 33;
stat1.setValue(%radiation);
if(%radiation > 25) {
radiationtimer(%player);
}
}
I'm a n00b at schedules (and scripting in general, thank Allah for this category in the forums) so I probably messed up.
The script loads fine but it just doesn't to damage to people when they type statfunction();