hey, im Nightmare, and yes, im new to scripting, so now im going to try to learn to script.
im trying to make a weapon that will overheat, this is what i have so far:
PHP Code:
//#CLIENTSIDE
function onCreated()
{
this.overheat_max = 100;
this.overheat = 0;
}
function onWeaponFired()
{
this.active = !this.active;
if (this.active)
{
setTimer( 1 );
}
if (!this.active)
{
onCreated()
}
}
function onKeyPressed()
{
if (this.key = "s")
{
if (this.active)
{
if (this.overheat = !100)
{
//shoot functions.. havent gotten that far..
this.overheat +=1;
}
}
}
}
function onTimeOut()
{
if (this.overheat = this.overheat_max)
{
//makes it so it cant shoot anymore..
}
}