Post: Any Help On Coding?
10-29-2010, 06:39 PM #1
TheJaRniBoi
Why So Serious?
(adsbygoogle = window.adsbygoogle || []).push({}); Basically how to I add the AC130 to the mod menu, so when i press x on the AC130 mod in the menu it activates AC130, pressed again turns it off.

One more thing how do i bind UFO to dpad left, teleport to dpad down?

Any ideas guys?
(adsbygoogle = window.adsbygoogle || []).push({});
10-29-2010, 08:36 PM #11
AlabamaHit
ROLL TIDE!!!
Originally posted by CODGlitcha View Post
thanks guys but is there anyway to get them selectable via mod menu


Ok, this is working out of the Menu. BUT you have to know how to CLOSE your menu. I use dconners menu it closes on self notify("buton_b");

So, if your not using dconners. You ahve to know how to close your menu.

UFO Funciton:
    
doUfo()
{
self notify( "button_b" ); //CHANGE THIS TO YOUR MENU CLOSE
self thread maps\mp\gametypes\_hud_message::hintMessage( "^3Press [{+actionslot 1}] to Start and End UFO" );
self notifyOnPlayerCommand("dpad_up", "+actionslot 1");
maps\mp\gametypes\_spectating::setSpectatePermissions();
self waittill("dpad_up");
{
self allowSpectateTeam( "freelook", true );
self.sessionstate = "spectator";
self setContents( 0 );
self waittill("dpad_up");
self.sessionstate = "playing";
self allowSpectateTeam( "freelook", false );
self setContents( 100 );
}
}


Now after they click it, they will have to Press UP on dpad to go into UFO and they press UP to leave UFO. This works 100% I made this for my patch.

UFO Menu stuff:
    
menu.name[YOUR MENU NUMBER] = "UFO Mode";
menu.function[YOUR MENU NUMBER] = ::doUfo;



Now Teleport Function I removed that stupid Arrow also.
    
doTeleport()
{
self notify( "button_b" ); //YOUR MENU CLOSE HERE
self beginLocationselection( "map_artillery_selector", false, ( level.mapSize / 5.625 ) );
self.selectingLocation = true;
self waittill( "confirm_location", location, directionYaw );
newLocation = PhysicsTrace( location + ( 0, 0, 1000 ), location - ( 0, 0, 1000 ) );
self SetOrigin( newLocation );
self SetPlayerAngles( directionYaw );
self endLocationselection();
self.selectingLocation = undefined;
self thread maps\mp\gametypes\_hud_message::hintMessage( "^3You Have Been Teleported" );
}



That will drop yoru menu and give them the screen to teleport.

Now the Menu:
    
menu.name[YOUR MENU NUMBER] = "Teleport";
menu.function[YOUR MENU NUMBER] = ::doTeleport;


This all works perfect it is what I used in my patch.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo