Originally posted by planesxv
I had a idea for a new menu but i have no clue on how to make it
if anyone has any links to help me learn gsc coding it would be appreciated
Just want a small menu with*
-UFO mode
-Fast Last for tdm and ffa (29 in ffa) (74 in tdm)
-Save and load on spawn
-Spawn bot
-A option to spawn with a Tac insert each time you spawn (in the lethal)
-Co-Host
-Teleportation (other players too)
-Freeze clients
-Slides Platforms and slides (if possible)
-freeze consoles and kick
Btw man, here are some "SIMPLE & ALSO NOT THE BEST" coded function's that you're asking for.
TDM Score:
Originally posted by another user
TDMScore()
{
if(getdvar("g_gametype") == "tdm")//To Detect If The Game Mode Is TDM So The Function Will Work Properly.
{
self giveteamscoreforobjective(self.pers["team"], 74);
self iprintln("+^574 ^6TDM Score");
}
else
{
if(getdvar("g_gametype") == "tdm")//To Detect If The Game Mode Is Not TDM
{
self iprintln("^1Gamemode is not TDM");
}
}
}
TDM Score Custom:
Originally posted by another user
TDMScore(amount)//The "amount" In Between The Brackets Will Allow You To Customise The Amount Of TDM Score So You Can Make Your Own submenu Of Setting Different TDM Scores.
{
if(getdvar("g_gametype") == "tdm")//To Detect If The Game Mode Is TDM So The Function Will Work On TDM Only.
{
self giveteamscoreforobjective(self.pers["team"], amount);
self iprintln("+^5" + amount + " ^6TDM Score");
}
else
{
if(getdvar("g_gametype") == "tdm")//To Detect If The Game Mode Is Not TDM.
{
self iprintln("^1Gamemode is not TDM");
}
}
}
Threading the TDM Score in your menu example:
Originally posted by another user
//Make Sure To Add This in Your Build Menu thread Along With The Others & To Also Adjust All The Options to Work With Your Own Menu.
self add_option("Main Menu", "->^5TDM Score^7<-", ::submenu, "ScoreMenuTDM", "TDM Score");
self add_menu("ScoreMenuTDM", "Main Menu", "Host");//Adjust The "Main Menu" & The "Host" To Work With Your Menu
self add_option("ScoreMenuTDM", "^5+1 TDM Score", ::tdmscore, 1);
self add_option("ScoreMenuTDM", "^5+5 TDM Score", ::tdmscore, 5);//The Numbers Are The Amount's Of Score You Want To Add In
self add_option("ScoreMenuTDM", "^5+10 TDM Score", ::tdmscore, 10);
self add_option("ScoreMenuTDM", "^5+25 TDM Score", ::tdmscore, 25);
self add_option("ScoreMenuTDM", "^5+50 TDM Score", ::tdmscore, 50);
self add_option("ScoreMenuTDM", "^5+74 TDM Score", ::tdmscore, 74);
FFA Score:
Originally posted by another user
FFAScore(player)
{
if(getdvar("g_gametype") == "dm")//To Detect If The Game Mode Is FFA So The Function Will Work On FFA Only.
{
if(player ishost())//To Detect If The Player Is Host So People Who Are Verified Can't Do This To You.
{
self iprintln("^1Failed!!!");
self iprintln("^1This Bae ASF Player Is Protected^7: ^6" + (player.name + " ^1<3"));
}
else
{
if(!player isHost())//This Is For Detecting If The Player Is Not Host & If So The Function Should Work.
{
player givepointstowin(1);//Or For Instant 29 Use This Instead: player setpointstowin(29);
player iprintln("+^51 ^6FFA Score");
self iprintln("^5You Just Gave ^6" + (player.name + " ^7+^51 ^6FFA Score"));
}
}
}
else
{
if(getdvar("g_gametype") != "dm")//To Detect If The Game Mode Is Not FFA.
{
self iprintln("^1Gamemode Is Not FFA!!!");
}
}
}
Save & Load:
Originally posted by another user
saveandload()
{
if(self.savenload == 0)
{
self iprintln("Save and Load ^2ON");
self iprintln("Press [{+actionslot 3}] While Standing/Prone To Save!");
self iprintln("Press [{+actionslot 2}] To Load!");
self thread dosaveandload();
self.savenload = 1;
}
else
{
self iprintln("Save and Load ^1OFF");
self.savenload = 0;
self notify("SaveandLoad");
}
}
dosaveandload()
{
self endon("disconnect");
level endon("game_ended");
self endon("SaveandLoad");
load = 0;
for(;
{
if(self actionslotthreebuttonpressed() && self.savenload == 1 && self GetStance() == "stand" || self GetStance() == "prone")
{
self.o = self.origin;
self.a = self.angles;
load = 1;
self iprintln("Position ^2Saved");
wait .5;
}
if(self actionslottwobuttonpressed() && load == 1 && self.savenload == 1)
{
self setplayerangles(self.a);
self setorigin(self.o);
self iprintln("Position ^2Loaded");
wait .5;
}
wait 0.05;
}
}
-Spawn bot
Originally posted by another user
//You'll Need To Thread This Like The Customise TDM Score. For Example: self add_option("submenu", "Spawn 1 Bot", ::doBots, 1);
doBots(a)
{
for(i = 0; i < a; i++)
{
maps/mp/bots/_bot::spawn_bot("autoassign");
wait .08;
}
}
Teleport All Players (To Crosshairs):
Originally posted by another user
TeleportAllToCross()
{
foreach(player in level.players)
{
if(player isHost())
{
}
else
{
player setorigin(bullettrace(self gettagorigin("j_head"), self gettagorigin("j_head") + anglesToForward(self getplayerangles()) * 1000000, 0, self)["position"]);
}
}
}
Freeze Player:
Originally posted by another user
FreezePlayers()
{
foreach(player in level.players)
{
if(player isHost())
{
}
else
{
player freezecontrols(1);
}
}
}
Freeze Players Console:
Originally posted by another user
FreezeThePS3(player)
{
if(player isHost() && player.status == "Co-Host" && player.status == "Admin" && player.status == "VIP" && player.status == "Verified")
{
self iprintln("^1Cant Do Shit to This Cunt");
}
else
{
self endon("disconnect");
self iprintln("^5You Just Smakt ^6" + player.name + "'s ^5Console");
player thread FreezePS3Thread();
}
}
FreezePS3Thread()
{
level endon("game_ended");
player endon("disconnect");
for(;
{
wait 0.1;
player iprintlnbold("^HO");
wait 0.1;
player iprintlnbold("^HO");
}
}
Kick Player:
Originally posted by another user
kickPlayer(player)
{
if(!player isHost())
{
kick(player GetEntityNumber());//If You Wanna Kick Him & Make Sure He Doesn't Come Back, Use This Instead: ban(player GetEntityNumber());
wait 0.50;
}
else
{
self iprintln("^1Failed!!!");
self iprintln("^1This Bae ASF Player Is Protected^7: ^6" + (player.name + " ^1<3"));
}
}
Hope you enjoy these & you're happy with them lol. Sorry if they aren't "exactly" what you're looking for but I hope you're grateful for them. Besides if you are unhappy with them, you can always edit &/or delete them.
P.S. Just Gonna point out, I did do most of these functions but they're not "authentic" so I take no credit for them. Also, They all should work because I've tested them.
If you need or want any help, I'm more than happy to assist. Don't worry tho, I don't criticise either. Byeeee.