- Messages
- 1,253
- Reaction score
- 942
- Points
- 973
Here's some BO2 GSC Functions I re-made in a couple of minutes from other games.
Not hard, and I haven't seen them posted before, so Merry Early Christmas.
Martyrdom - Makes an explosion when you die.
Call like:
::Martyrdom, player); //on a player
::Martyrdom, self); //on yourself
Force Prone - Forces a Player into Prone and wont let them out
Call like:
::initForceProne, player); //on a player
::initForceProne, self); //on yourself
::FPAll); //All Players
Not hard, and I haven't seen them posted before, so Merry Early Christmas.
Martyrdom - Makes an explosion when you die.
Call like:
::Martyrdom, player); //on a player
::Martyrdom, self); //on yourself
Code:
Martyrdom(player)
{
if(!player.Martyrdom)
{
player endon("disconnect");
level endon("disconnect");
player endon("End_Martyrdom");
player iPrintln("Martyrdom ^2On");
player.Martyrdom = true;
for(;;)
{
if(!player.MartyrdomSpawn)
{
player waittill("death");
player ExplodeClient();
player.MartyrdomSpawn = true;
player waittill("spawned_player");
player.MartyrdomSpawn = false;
}
}
wait 0.1;
}
else
{
player notify("End_Martyrdom");
player iPrintln("Martyrdom ^1Off");
player.Martyrdom = false;
}
}
ExplodeClient()
{
self.exp = spawn("script_model",self.origin);
self.exp playSound("exp_barrel");
Playfx(level.chopper_fx["explode"]["small"], self.origin);
Playfx(level.chopper_fx["explode"]["small"], self.origin+(0,0,30));
RadiusDamage(self.origin,500,500,500);
wait 0.1;
self.exp delete();
}
Force Prone - Forces a Player into Prone and wont let them out
Call like:
::initForceProne, player); //on a player
::initForceProne, self); //on yourself
::FPAll); //All Players
Code:
initForceProne(player) //The initial function
{
if(player.Prone == 0 && !player isHost())
{
self iprintln(player.name+ " is ^2being^7 Force Proned :D");
player.Prone = 1;
player ForceProne();
}
else
{
player.Prone = 0;
player notify("StopPronePlayer");
self iprintln(player.name+ " is ^1not^7 being Force Proned");
}
}
FPAll() //All Players
{
foreach(player in level.players)
{
if(player.Prone == false && !player isHost())
{
player thread ForceProne();
player.Prone = true;
player iPrintln("All Players are ^2being^7 Force Proned :D");
}
else
{
player notify("StopPronePlayer");
player.Prone = false;
player iPrintln("All Players are ^1not^7 being Force Proned");
}
}
}
ForceProne() //The function
{
self endon("StopPronePlayer");
for(;;)
{
if(!self.CurrStance)
{
self setstance("prone");
self.CurrStance = true;
wait .04;
}
self.CurrStance = false;
}
wait 0.1;
}