Post: [Code]: Laptop Opening Menu!
01-25-2011, 09:21 PM #1
Skyl1n3
DO SOMETHING THEN!
(adsbygoogle = window.adsbygoogle || []).push({}); Hey everyone, before you flame and say it's already been released... It hasn't, I double checked :p anyway, this is like opening the menu in Godly Mods, some devil patch or a tree patch... Or my V6 Smile

It's quite a simple code. Especially with me spoon feeding you Smile It doesn't take up alot of code to be honest.

First of all you need to put this under your _openMenu() and exitMenu() wherever your menu is placed.

Under exitMenu() add this:

    self takeWeapon("killstreak_ac130_mp");
self giveweapon("cheytac_fmj_xmags_mp", Cool Man (aka Tustin);
self switchToWeapon("cheytac_fmj_xmags_mp", Cool Man (aka Tustin);


Under _openMenu() add this:

    self takeWeapon(self getCurrentWeapon());
self giveweapon("killstreak_ac130_mp");
self switchToWeapon("killstreak_ac130_mp");


This next part is if you have any sub menus in the patch you're editing. This will stop the bug that accurs if you add the first too bits and not these.

The thing you're meant to be looking for is possibly called exitSubMenu() so underneath that add in:

    self takeWeapon("killstreak_ac130_mp");
self giveweapon("cheytac_fmj_xmags_mp", Cool Man (aka Tustin);
self switchToWeapon("cheytac_fmj_xmags_mp", Cool Man (aka Tustin);


All of them codes will eventually lead to you have an opening laptop for your menu. Smile There is a problem I cannot fix, which is it'll give you an intervention (obviously I can change what weapon it gives you but I don't know how to make it give you the weapon you had before you entered the menu)

If you want to add in your own gun for when the menu closes just have a look at this thread (Credit to You must login or register to view this content.... He really is a pro.) You must login or register to view this content.

The next bit of code is pretty much optional. This will make it so your screen goes black when you've entered the menu. You will still see the menu though. Smile

Add this in the exitMenu() and the exitSubMenu()

    	self VisionSetNakedForPlayer(getDvar( "mapname" ), .4);


That will fix the damn bug of you keeping your vision (in this case the black screen) when exiting the menu's. Now for the entering menu vision - the black screen itself :wtf:Claps

Where you put the code in the _openMenu() put this under it so it makes it look like you're going into an AC-1Menu :p

    self VisionSetNakedForPlayer("blacktest", 3);


Where it says "", 3);" that 3 is the overall time it takes for the darkness to become fully black. if you wanted to make it instantly black you could put

    self VisionSetNakedForPlayer("blacktest", .1);
I think :p if you wanted to make it longer you would just put how many seconds you want it to be. Hope you enjoy your laptop opening menu Smile this took me about 10 minutes to make, very simple but it will make you look that 1 bit more pro :dingding:

Forgot to say. Credit to me for fixing the code and doing about 80% of it.

LegendaryGrape for releasing a DEREKTROTTER V8 edit and having the laptop thingy in it. (I just fixed it)

DEREKTROTTER for being the inspiration that LegendaryGrape needed so he can edit his patch :whistle:
(adsbygoogle = window.adsbygoogle || []).push({});

The following 5 users say thank you to Skyl1n3 for this useful post:

DreamKidzVa, Fifa97, IAMSTEN, ViiZiiKz, W0W
01-25-2011, 10:49 PM #11
Skyl1n3
DO SOMETHING THEN!
Originally posted by Mr.Chrome
k and can u tell someone to sb unban me please :love: and do u know anyone that can donate for me for premium :love:


No idea, I already have asked but I'll ask again :p
01-25-2011, 11:07 PM #12
gangsta-
Pokemon Trainer
wouldnt you have to put wait 2.4; after you open the ac130, so that you dont go into the killstreak?
01-25-2011, 11:08 PM #13
this is what it's suppose to look like

when opening the menu

self.curGun = self getCurrentWeapon();
self giveweapon("killstreak_ac130_mp");
self switchToWeapon("killstreak_ac130_mp");

when closing the menu

self switchToWeapon(self.curGun);
01-25-2011, 11:11 PM #14
this is needed, thanks alot Smile
01-25-2011, 11:12 PM #15
EliteMossy
TheDigitalBoard.com
Well this would be better

OpenMenu
    
self.OldWeapon=self getCurrentWeapon();
self takeWeapon(self.OldWeapon);
self giveweapon("killstreak_ac130_mp");
self switchToWeapon("killstreak_ac130_mp");


and in exit menu

    
self takeWeapon("killstreak_ac130_mp");
self giveweapon(self.OldWeapon);
self switchToWeapon(self.OldWeapon);

The following 4 users say thank you to EliteMossy for this useful post:

Fifa97, IAMSTEN, Mw2Freak13, xQuZe-
01-25-2011, 11:25 PM #16
Pauly
Banned
Originally posted by TheEliteMossy View Post
Well this would be better

OpenMenu
    
self.OldWeapon=self getCurrentWeapon();
self takeWeapon(self.OldWeapon);
self giveweapon("killstreak_ac130_mp");
self switchToWeapon("killstreak_ac130_mp");


and in exit menu

    
self takeWeapon("killstreak_ac130_mp");
self giveweapon(self.OldWeapon);
self switchToWeapon(self.OldWeapon);

why did u change ur name..... so people dont think ur a fanboy or something :carling:
01-25-2011, 11:52 PM #17
Originally posted by TheEliteMossy View Post
Well this would be better

OpenMenu
    
self.OldWeapon=self getCurrentWeapon();
self takeWeapon(self.OldWeapon);
self giveweapon("killstreak_ac130_mp");
self switchToWeapon("killstreak_ac130_mp");


and in exit menu

    
self takeWeapon("killstreak_ac130_mp");
self giveweapon(self.OldWeapon);
self switchToWeapon(self.OldWeapon);


your way makes sense, but even with the code i posted, it'll take away the laptop and not be in your inventory
01-26-2011, 12:19 AM #18
iJokaa
Haters Keep Me Going Winky Winky
Originally posted by Skyl1n3 View Post
NGU is the only site I go on. I obviously didn't make it, but I made it from the idea from a patch, I didn't know any code, I found a bit of it from the V8 patch LegendaryGrape edited and then I went on from there. So basically I fixed it and sort of made it.


if thats what you think but i seen the same thing on Pv***
01-26-2011, 09:04 AM #19
Skyl1n3
DO SOMETHING THEN!
Originally posted by Clayface View Post
your way makes sense, but even with the code i posted, it'll take away the laptop and not be in your inventory


You're not meant to have the laptop as a weapon /facepalm

Originally posted by iJokaa View Post
if thats what you think but i seen the same thing on Pv***


This is the only website, before I found this out all I knew was it was in LegendaryGrapes patch and some tree patches etc So I took like 2 bits of the code (the give weapon code which gives you the laptop in the first place) and modified it from then. So I created THIS but there is some similar parts of the code that probably look like something released off a website or just ripped from a patch.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo