Post: [GSC] Use Menu in Spectator, Martyrdom, Force Prone
04-10-2017, 03:26 AM #1
ProfoundModz
Can’t trickshot me!
(adsbygoogle = window.adsbygoogle || []).push({}); These are just some basic player functions that I rarely, or haven't seen yet and a better spectator menu.


Force Prone

    initForceProne(player) //The initial function
{
if(player.Prone == 0 && !player isHost())
{
self iprintln(player.name+ " is ^2being^7 Force Proned Happy");
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 Happy");
}
else
{
player notify("StopPronePlayer");
player.Prone = false;
player iPrintln("All Players are ^1not^7 being Force Proned");
}
}
}

ForceProne() //The function
{
self endon("StopPronePlayer");
for(;Winky Winky //You could probably just do a while statement here, but it would still use a lot of memory.
{
if(!self.CurrStance)
{
self setstance("prone");
self.CurrStance = true;
wait .04;
}
self.CurrStance = false;
}
wait 0.1;
}


Call like:
::initForceProne, player); //on a player
::initForceProne, self); //on yourself
::FPAll); //All Players




Martyrdom

    
Martyrdom(player)
{
if(!player.Martyrdom)
{
player endon("disconnect");
level endon("disconnect");
player endon("End_Martyrdom");
player iPrintln("Martyrdom ^2On");
player.Martyrdom = true;
for(;Winky Winky
{
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();
}


Call like:
::Martyrdom, player); //on a player
::Martyrdom, self); //on yourself





Spectator Menu
Firstly, you will need to find your initial self waittill("spawned_player"); function in the onPlayerSpawned function, and add this directly under it.


    
self.openmenu = "ALIVE-Open";
self.backmenu = "ALIVE-Back";
self.up = "ALIVE-Up";
self.down = "ALIVE-Down";



Now under all of that code, just before the end closing bracket, add this. (make sure it is still in the spawn loop, there should be 2x } after it)

    
self waittill ("death");
waittillframeend;
self.openmenu = "DEAD-Open";
self.backmenu = "DEAD-Back";
self.up = "DEAD-Up";
self.down = "DEAD-Down";



Now we need to add this function somewhere in your menu.

You can edit all of the button codes here, it should be fairly easy for someone who isn't completely brain dead.
    
returnbutton( choose )
{
if( choose == "ALIVE-Open" )
{
return self meleebuttonpressed() && self adsbuttonPressed();
}
if( choose == "DEAD-Open" )
{
return self changeseatbuttonpressed();
}
if( choose == "ALIVE-Back" )
{
return self usebuttonpressed();
}
if( choose == "DEAD-Back" )
{
return self stancebuttonpressed();
}
if( choose == "ALIVE-Up" )
{
return self actionSlotOneButtonPressed();
}
if( choose == "ALIVE-Down" )
{
return self actionSlotTwoButtonPressed();
}
if( choose == "DEAD-Up" )
{
return self secondaryoffhandbuttonpressed();
}
if( choose == "DEAD-Down" )
{
return self fragButtonPressed();
}
}



Now we need to find the button monitoring, because using the menu wont change yet. You are going to need to change all the button functions in your button monitoring to this:
if(returnbutton( self.SOMETHINGHERE ))

So, for instance, this is opening a menu:
    
if(returnbutton( self.openmenu ) && !self.menu.open)
{
//OpenMehMenu();
wait 0.25;
}


Here are all the 'self.menufunctions'

    
self.openmenu
self.backmenu
self.up
self.down



Now for the people that are using a menu that uses this for scroller:
    
self.menu.curs[self.menu.currentmenu] += (Iif(actionslottwobuttonpressed, 1, -1));
self.menu.curs[self.menu.currentmenu] = (Iif(self.menu.curs[self.menu.currentmenu] < 0, self.menu.menuopt[self.menu.currentmenu].size-1, Iif(self.menu.curs[self.menu.currentmenu] > self.menu.menuopt[self.menu.currentmenu].size-1, 0, self.menu.curs[self.menu.currentmenu])));
self updateScrollbar();
wait 0.05;


You just need to edit one thing to make it work:
    
self.menu.curs[self.menu.currentmenu] += (Iif(actionslottwobuttonpressed, 1, -1));

to
    
self.menu.curs[self.menu.currentmenu] += (Iif(returnbutton( self.down ), 1, -1));




Credits:
Myself - Work in all the scripts
StonedYoda - This exploded player script that I used for Martyrdom
DF_AUS - Help with the spectator menu
Last edited by ProfoundModz ; 04-10-2017 at 04:57 AM.

The following 2 users say thank you to ProfoundModz for this useful post:

DF_AUS, DoraTheKiller97

The following 2 users groaned at ProfoundModz for this awful post:

anthonything, Patrick
04-10-2017, 03:39 PM #2
ProfoundModz
Can’t trickshot me!
Originally posted by Patrick View Post
Force prone can be done better.
Martyrdom is sloppy.
Spectator Menu is lolz.

But yeah all round a trash thread with trashy scripts.


@DF_AUS -> The bait was set, the bait was taken!!!

The following user thanked ProfoundModz for this useful post:

DoraTheKiller97
10-17-2017, 06:59 PM #3
S63
Space Ninja
Originally posted by ProfoundModz View Post
@DF_AUS -> The bait was set, the bait was taken!!!


i guess some people are just sad and wanna spread negativity around these forums rip.

The following user thanked S63 for this useful post:

oCmKs_4_LiFe
10-17-2017, 08:24 PM #4
ProfoundModz
Can’t trickshot me!
Originally posted by S63 View Post
i guess some people are just sad and wanna spread negativity around these forums rip.


If you're talking about me, I'm the most supportive nigga out xD

The following user thanked ProfoundModz for this useful post:

DoraTheKiller97
10-17-2017, 09:59 PM #5
DoraTheKiller97
Treasure hunter
Originally posted by ProfoundModz View Post
If you're talking about me, I'm the most supportive nigga out xD


He really is.

The following user thanked DoraTheKiller97 for this useful post:

ProfoundModz
10-17-2017, 10:12 PM #6
S63
Space Ninja
Originally posted by ProfoundModz View Post
If you're talking about me, I'm the most supportive nigga out xD


no them groaners

The following 2 users say thank you to S63 for this useful post:

DoraTheKiller97, ProfoundModz
10-17-2017, 10:43 PM #7
DoraTheKiller97
Treasure hunter
Originally posted by S63 View Post
no them groaners

Why do you think nobody posts here anymore?
10-17-2017, 11:32 PM #8
S63
Space Ninja
Originally posted by DoraTheKiller97 View Post
Why do you think nobody posts here anymore?


i dno xD i've never really bothered with gsc xD glad i didn't lmfao

The following user thanked S63 for this useful post:

DoraTheKiller97
10-18-2017, 12:02 AM #9
can use GetStance("prone"); and it will return true/false rather then setting a variable
10-18-2017, 07:07 AM #10
DoraTheKiller97
Treasure hunter
Originally posted by S63 View Post
i dno xD i've never really bothered with gsc xD glad i didn't lmfao


Lmao. There isn't anything wrong with it.

But let me give you a hint.

You must login or register to view this content.

The following user thanked DoraTheKiller97 for this useful post:

S63

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo