Its the same code as before, but the %heat changed to %obj.client.player.heat
%obj.client.player.heat += 1
if(%obj.client.player.heat >= 4)
{
%obj.spawnExplosion(AntimatterExplosion,"2 2 2");
%obj.client.player.addhealth("-35");
messageclient(%client, 'centerprint', "Overheating!" 2)
}
%obj.schedule(1000, %obj.client.player.heat -= 1)
In an onFire function, %obj is the player holding the gun. You're being very redundant.
%obj.heat += 1;
if(%obj.heat >= 4) {
%obj.spawnExplosion(AntimatterExplosion,"2 2 2");
%obj.addhealth("-35");
centerPrint(%client, "Overheating!", 3);
}
%obj.schedule(1000, 0, eval, %obj @ ".heat -= 1;");
Don't know if %obj.schedule works or not.