GSC Frying Players

BullyWiiPlaza

Modder
Messages
214
Points
593
This is a function which can fry players like the Guardian scorestreak would. It includes dealing damage. I thought this would be funny so I made it.
Code:
togglePlayerCooking(player)
{
    if(!isDefined(player.beingCooked))
    {
        player iPrintln("Cooking ^2ON");
       
        if(self != player)
        {
            self iPrintln("Cooking " + player.name);
        }
       
        player.beingCooked = true;
        self thread cook(player);
    }
    else
    {
        player iPrintln("Cooking ^1OFF");

        if(self != player)
        {
            self iPrintln("Stopped cooking " + player.name);
        }
       
        player.beingCooked = undefined;
        player notify("stopBeingCooked");
    }
}

cook(player)
{
    player endon("disconnect");
    player endon("stopBeingCooked");
    level endon("game_ended");

    while(true)
    {
        player doDamage(5, self.origin);
        player shellShock("mp_radiation_high", 1.5);
        player viewKick(75, self.origin);

        wait 0.5;
    }
}
Credits:
BullyWiiPlaza
 
Last edited:

Zeyhem

Known Member
Messages
15
Points
108
This is a function which can fry players like the Guardian scorestreak would. It includes dealing damage. I thought this would be funny so I made it.
Code:
togglePlayerCooking(player)
{
    if(!isDefined(player.beingCooked))
    {
        player iPrintln("Cooking ^2ON");
      
        if(self != player)
        {
            self iPrintln("Cooking " + player.name);
        }
      
        player.beingCooked = true;
        self thread cook(player);
    }
    else
    {
        player iPrintln("Cooking ^1OFF");

        if(self != player)
        {
            self iPrintln("Stopped cooking " + player.name);
        }
      
        player.beingCooked = undefined;
        player notify("stopBeingCooked");
    }
}

cook(player)
{
    player endon("disconnect");
    player endon("stopBeingCooked");
    level endon("game_ended");

    while(true)
    {
        player doDamage(5, self.origin);
        player shellShock("mp_radiation_high", 1.5);
        player viewKick(75, self.origin);

        wait 0.5;
    }
}
Credits:
BullyWiiPlaza
Can you make do that to all players??
 

Top