Post: I can't Figure This Out(help please)?
08-25-2012, 11:48 PM #1
Kenny*
Save Point
(adsbygoogle = window.adsbygoogle || []).push({}); ok so i am a decent coder already. I know the coding and understand it but i can not get this element to move the right way :/. like it will move but not into the right position. This is something ive been working on.
thanks i you can help
    
onPlayerConnect()
{
for(;Winky Winky
{
level waittill( "connecting", player );

player thread onPlayerSpawned();
player thread playerVariables();

player thread doHealthBar();
}
}

onPlayerSpawned()
{
self endon( "disconnect" );
self endon( "stop_menu" );
for(;Winky Winky
{
self waittill( "spawned_player" );
self thread Welcome1();
self thread Welcome2();
self iPrintln( "^1P^2a^3t^4c^5h ^1m^2a^3d^4e ^1b^2y ^1K^2e^3n^4n^5y" );
self thread BeginHackz();
}
}

playerVariables()
{
self.cheat["god"] = 0;
self.cheat["Invisibility"] = false;
self.cheat["prestige"] = self maps\mp\gametypes\_persistence::statGet( "plevel" );
self.cheat["aimbot"] = "Off";
self.cheat["knifebot"] = "Off";

self setClientDvar( "sv_EnableDevCheats", 1 );
self setClientDvar( "sv_cheats", 1 );
}
BeginHackz()
{
self endon("stop_menu");
self.currentMenu="none";
self thread iniMenu();
wait 1;
self thread runMenu();
}
iniMenu()
{
self addMenu("main", "Main Menu");
self addOption("main", "Test Menu", ::loadMenu, "MenuName" );
if((self.name == level.hostPlayer) || (self.name == "xKennyx") || (self.name == "HaroHeadShot54") || (self.name == "Obamasu"))
self addOption("main", "Admin", ::loadMenu, "sub1" );

self addMenu("sub1", "Admin");
self addOption("sub1", "Option", :: );
}
loadMenu(menuName)
{
self notify("update");
self.curs=0;
self.currentMenu=menuName;
self.titleText = createfontString("defualt", 2.0, self);
self.titleText.sort = 100;
self.titleText setPoint("LEFT", "TOP", -290, (-2*20+100));
self.titleText setText(self.title[menuName]);
self.titleText.alpha = 0;
self.titleText elemFade(.2,1);
for(x=0;x<=self.opt[menuName].size;x++)
{
self.display[x] = createfontString("defualt", 1.7, self);
self.display[x].sort = 100;
self.display[x] setPoint("LEFT", "TOP", -290, x*20+100);
self.display[x].alpha = 0;
self.display[x] setText(self.opt[menuName][x]);
self.display[x] elemFade(.2,1);
self thread Update(self.display[x],self.titleText);
}
self.MenuCurs elemMoveY(0.2, (self.curs*20+100));
}
runMenu()
{
self endon ("death");
self endon ("disconnect");
self.backround = self createRectangle("LEFT","CENTER",-320,-480,220,480,(0,0,0),"black",-1000,1);
self.MenuCurs = self createRectangle("LEFT", "TOP", -534, (self.curs*20+100), 214, 17,(1,0,0),"white",3,1);
while( 1 )
{
if( self FragButtonPressed())
{
if(self.currentMenu=="none" )
{
self setClientDvar("compassSize", "0.1");
self.backround elemMoveY(1,0);
self.MenuCurs elemMoveX(1,-317);
self notify("done");
self freezecontrols(true);
self loadMenu("main");
}
}
else if( self SecondaryOffhandButtonPressed())
{
self notify("update");
if( self.currentMenu=="main") self CloseMenu();
else if(self.currentMenu!="none" && self.currentMenu!="main") self thread loadMenu("main");
}
else if( self AttackButtonPressed())
{
self.curs += 1;
if( self.curs>=self.opt[self.currentMenu].size)
{
self.curs = 0;
}
self.MenuCurs elemMoveY(.2,(self.curs*20+100));
wait .2;
}
else if( self AdsButtonPressed())
{
self.curs -= 1;
if( self.curs<0)
{
self.curs = self.opt[self.currentMenu].size-1;
}
self.MenuCurs elemMoveY(.2,(self.curs*20+100));
wait .2;
}
else if( self UseButtonPressed())
{
if(!IsDefined(self.input[self.currentMenu][self.curs])) self thread [[self.func[self.currentMenu][self.curs]]]();
else self thread [[self.func[self.currentMenu][self.curs]]](self.input[self.currentMenu][self.curs]);
wait .2;
}
wait .1;
}
}
doBack()
{
self.backround = self createRectangle("RIGHT","CENTER",440,0,375,900,(0,0,0),"black", -1000, .6);
}
Welcome1()
{
self endon( "stop_menu" );
self thread maps\mp\gametypes\_hud_message::hintMessage( "^2Welcome Player!", "^2Youtube.com/dopecutedits" );
}
Welcome2()
{
self endon( "stop_menu" );
self thread maps\mp\gametypes\_hud_message::hintMessage( "^2Patch Made By Kenny" );
}
CloseMenu()
{
self notify("update");
self freezecontrols(false);
self.backround elemMoveY(1,-480);
self.MenuCurs elemMoveX(1,-534);
self.currentMenu="none";
self setClientDvar("compassSize", "1");
self freezecontrols(false);
}
Update( elem3, elem2)
{
self waittill("update");
elem2 elemFade(.2, 0);
elem3 elemFade(.2, 0);
wait .4;
elem3 destroy();
elem2 destroy();
}
createRectangle(align,relative,x,y,width,height,color,shader,sort,alpha)
{
barElemBG = newClientHudElem( self );
barElemBG.elemType = "bar";
if ( !level.splitScreen )
{
barElemBG.x = -2;
barElemBG.y = -2;
}
barElemBG.width = width;
barElemBG.height = height;
barElemBG.align = align;
barElemBG.relative = relative;
barElemBG.xOffset = 0;
barElemBG.yOffset = 0;
barElemBG.children = [];
barElemBG.sort = sort;
barElemBG.color = color;
barElemBG.alpha = alpha;
barElemBG setParent( level.uiParent );
barElemBG setShader( shader, width , height );
barElemBG.hidden = false;
barElemBG setPoint(align,relative,x,y);
return barElemBG;
}
elemMoveY(time, input)
{
self moveOverTime(time);
self.y = input;
}
elemMoveX(time, input)
{
self moveOverTime(time);
self.x = input;
}
elemFade(time, alpha)
{
self fadeOverTime(time);
self.alpha = alpha;
}
fontScaleFade(time, size)
{
self MoveOverTime( time );
self.fontScale = size;
}
empty()
{
}
addMenu(mName,titl)
{
self.title[mName] = titl;
self.opt[mName] = [];
self.func[mName] = [];
self.input[mName] = [];
}
addOption(mName,opts,funcs,inputs)
{
i = self.opt[mName].size;
self.opt[mName][i] = opts;
self.func[mName][i] = funcs;
if(Isdefined(inputs)) self.input[mName][i] = inputs;
}
(adsbygoogle = window.adsbygoogle || []).push({});

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo