GLoGG
28th October 2005, 17:58
ok first off all: this is taken out of my public béta 1.3 i released.
Many people have been asking some things bout this and so on so here it is.
First we begin at making some variables
var config bool bMenu;
var int Team, Enemy, OrigID;
var bool Toggle, bToggleMenu
Than we begin drawing the text on screen as an menu
function DrawMyMenu (Canvas MyCanvas)
{
local float PosX,PosY;
if (bMenu)
{
MyCanvas.Font=Font'OrigFont'; //Import Tamimego's font and rename it OrigFont
MyCanvas.SetPos(330, 10.00);
MyCanvas.SetDrawColor(102,255,204);
MyCanvas.DrawText("..:: 9L099Bot v1.3 béta Created by VLR::GLoGG ::..");
MyCanvas.SetPos(8.00, 150);
MyCanvas.SetDrawColor(255,0,0);
MyCanvas.DrawPattern(Texture'WhiteTexture', .00,10.00,1.00); // Drawing an nicely drawen box (as u can see in my released one :P
MyCanvas.SetDrawColor(255,255,255);
PosX=20.00;
PosY=150;
MyCanvas.SetPos(PosX,PosY);
MyCanvas.DrawText("9L099Bot v1.3 béta"); // Can change it to ur own title ^^
PosY += 20;
MyCanvas.SetPos(8.00, 170);
MyCanvas.SetDrawColor(255,0,0);
MyCanvas.DrawPattern(Texture'WhiteTexture',130.00, 90.00,1.00);
// Drawing an nicely drawen box (as u can see in my released one :P
MyCanvas.SetDrawColor(255,255,255);
if ( bToggleMenu )
{
MyCanvas.SetPos(10.00,PosY + OrigID * 10);
MyCanvas.DrawText(">");
}
MyCanvas.SetPos(PosX,PosY);
MyCanvas.DrawText("ESP "@int(bESP)); // Can replace this with ur own functions
PosY += 10;
MyCanvas.SetPos(PosX,PosY);
MyCanvas.DrawText("RetLock " @int(bRetLock)); // Can replace this with ur own functions
PosY += 10;
MyCanvas.SetPos(PosX,PosY);
MyCanvas.DrawText("C4 Hack "@int(bC4Hack)); // Can replace this with ur own functions
PosY += 10;
MyCanvas.SetPos(PosX,PosY);
MyCanvas.DrawText("WallHack "@int(bWallHack)); // Can replace this with ur own functions
PosY += 10;
MyCanvas.SetPos(PosX,PosY);
MyCanvas.DrawText("AutoReload "@int(bAutoReload)); // Can replace this with ur own functions
PosY += 10;
MyCanvas.SetPos(PosX,PosY);
MyCanvas.DrawText("NoRecoil "@int(bNoRecoil)); // Can replace this with ur own functions
PosY += 10;
MyCanvas.SetPos(PosX,PosY);
MyCanvas.DrawText("Removals "@int(bRemovals)); // Can replace this with ur own functions
PosY += 10;
MyCanvas.SetPos(PosX,PosY);
MyCanvas.DrawText("Aimbot "@int(bAimbot));
PosY += 10;// Can replace this with ur own functions
MyCanvas.SetPos(PosX,PosY);
MyCanvas.DrawText("AutoFire "@int(bAutoFire));
PosY += 20;// Drawing an nicely drawen box (as u can see in my released one :P
MyCanvas.SetPos(8.00, 270);
MyCanvas.SetDrawColor(255,0,0);
MyCanvas.DrawPattern(Texture'WhiteTexture',130.00, 40.00,1.00);
// Drawing an nicely drawen box (as u can see in my released one :P
MyCanvas.SetDrawColor(255,255,255);
MyCanvas.SetPos(PosX, PosY);
MyCanvas.DrawText("Players Alive: " @ Team + Enemy);
PosY += 10;
MyCanvas.SetPos(PosX, PosY);
MyCanvas.DrawText("TeamMates Alive: " @ Team);
PosY += 10;
MyCanvas.SetPos(PosX, PosY);
MyCanvas.DrawText("Enemies Alive: " @ Enemy);
PosY += 10;
//MyCanvas.SetPos(PosX, PosY);
//MyCanvas.DrawText(" LAG DELAY: " @ LagDelay()); // folow kizzamps TUT on how to do this (needs an function float)
//PosY += 10;
}
}
The team and enemy counter needs some things in pawnrelated (you can make an stand alone functions from it though (look in aao)
function PawnRelated (Canvas Canvas)
{
Enemy=0; // 0 by default so the counter doesn't flip
Team=0;
foreach MyController.Level.DynamicActors(Class'Pawn', Target)
{
if (Target != None)
{
if (IsEnemy(Target))
{
Enemy++; // Counting Enemy's
} else{
Team++; // Counting TeamMates
}
}
}
}
Now this is the function that is controlling the GUI/Menu (PUT THIS IN PAWNRELATED OR MAKE AN FUNCTION OF IT UR SELF!)
if ( bToggleMenu )
{
switch (OrigID)
{
case 0:
if ( Toggle )
bESP = !bESP; // Activating and Deactivating ESP
Toggle=False;
break;
case 1:
if ( Toggle )
bRetLock = !bRetLock; // Activating and Deactivating retlock
Toggle=False;
break;
case 2:
if ( Toggle )
bC4hack = !bC4Hack;
Toggle=False;// Activating and Deactivating c4hack
break;
case 3:
if ( Toggle )
bWallHack = !bWallHack; // Activating and Deactivating wallhack
Toggle=False;
break;
case 4:
if ( Toggle )
bAutoReload = !bAutoReload;
Toggle=False;
break;
case 5:
if ( Toggle )
bNoRecoil = !bNoRecoil;
Toggle=False;
break;
case 6:
if ( Toggle )
bRemovals = !bRemovals;
Toggle=False;
break;
case 7:
if ( Toggle )
bAimbot = !bAimbot;
Toggle=False;
break;
case 8:
if ( Toggle )
bAutoFire = !bAutoFire;
Toggle=False;
break;
default:
}
if ( (OrigID < 0 ) || (OrigID > 8) ) // if OrigID passed 8 return to 0
OrigID=0;
}
Now add KeyEvents to it!
function bool KeyEvent ( EInputKey Key, EInputAction Action, FLOAT Delta )
{
if ( Action == IST_Press )
return False;
if ( Key == IK_F1 ) // Toggles Menu On/Off
{
bMenu = !bMenu;
MyController.ClientMessage("Menu = "@String(bMenu));
}
if ( Key == IK_F2 ) // Toggles GUI On/Off
{
bToggleMenu = !bToggleMenu;
MyController.ClientMessage("Menu Toggle (Controlled by the 'arrow keys' by toggling right they are On/Off toggleable): "@String(bToggleMenu));
}
if ( Key == IK_Down)
OrigID++; // moves the GUI selector down
if ( Key == IK_Up ) // moves the GUI selector up
OrigID--;
if ( Key == IK_Right )// Toggle the functions On/Off by clicking arrow key right!
Toggle=True;
}
i hope this helps some peeps out making a nice menu..
I included the source of GLOGGBOT v1.3 BETA with it enjoy!
SORRY FOR STRETCHING FORUMS A LIL :rolleyes:
FOR CREDS LOOK AT MY RELEASE THREAD
-GLoGG
Many people have been asking some things bout this and so on so here it is.
First we begin at making some variables
var config bool bMenu;
var int Team, Enemy, OrigID;
var bool Toggle, bToggleMenu
Than we begin drawing the text on screen as an menu
function DrawMyMenu (Canvas MyCanvas)
{
local float PosX,PosY;
if (bMenu)
{
MyCanvas.Font=Font'OrigFont'; //Import Tamimego's font and rename it OrigFont
MyCanvas.SetPos(330, 10.00);
MyCanvas.SetDrawColor(102,255,204);
MyCanvas.DrawText("..:: 9L099Bot v1.3 béta Created by VLR::GLoGG ::..");
MyCanvas.SetPos(8.00, 150);
MyCanvas.SetDrawColor(255,0,0);
MyCanvas.DrawPattern(Texture'WhiteTexture', .00,10.00,1.00); // Drawing an nicely drawen box (as u can see in my released one :P
MyCanvas.SetDrawColor(255,255,255);
PosX=20.00;
PosY=150;
MyCanvas.SetPos(PosX,PosY);
MyCanvas.DrawText("9L099Bot v1.3 béta"); // Can change it to ur own title ^^
PosY += 20;
MyCanvas.SetPos(8.00, 170);
MyCanvas.SetDrawColor(255,0,0);
MyCanvas.DrawPattern(Texture'WhiteTexture',130.00, 90.00,1.00);
// Drawing an nicely drawen box (as u can see in my released one :P
MyCanvas.SetDrawColor(255,255,255);
if ( bToggleMenu )
{
MyCanvas.SetPos(10.00,PosY + OrigID * 10);
MyCanvas.DrawText(">");
}
MyCanvas.SetPos(PosX,PosY);
MyCanvas.DrawText("ESP "@int(bESP)); // Can replace this with ur own functions
PosY += 10;
MyCanvas.SetPos(PosX,PosY);
MyCanvas.DrawText("RetLock " @int(bRetLock)); // Can replace this with ur own functions
PosY += 10;
MyCanvas.SetPos(PosX,PosY);
MyCanvas.DrawText("C4 Hack "@int(bC4Hack)); // Can replace this with ur own functions
PosY += 10;
MyCanvas.SetPos(PosX,PosY);
MyCanvas.DrawText("WallHack "@int(bWallHack)); // Can replace this with ur own functions
PosY += 10;
MyCanvas.SetPos(PosX,PosY);
MyCanvas.DrawText("AutoReload "@int(bAutoReload)); // Can replace this with ur own functions
PosY += 10;
MyCanvas.SetPos(PosX,PosY);
MyCanvas.DrawText("NoRecoil "@int(bNoRecoil)); // Can replace this with ur own functions
PosY += 10;
MyCanvas.SetPos(PosX,PosY);
MyCanvas.DrawText("Removals "@int(bRemovals)); // Can replace this with ur own functions
PosY += 10;
MyCanvas.SetPos(PosX,PosY);
MyCanvas.DrawText("Aimbot "@int(bAimbot));
PosY += 10;// Can replace this with ur own functions
MyCanvas.SetPos(PosX,PosY);
MyCanvas.DrawText("AutoFire "@int(bAutoFire));
PosY += 20;// Drawing an nicely drawen box (as u can see in my released one :P
MyCanvas.SetPos(8.00, 270);
MyCanvas.SetDrawColor(255,0,0);
MyCanvas.DrawPattern(Texture'WhiteTexture',130.00, 40.00,1.00);
// Drawing an nicely drawen box (as u can see in my released one :P
MyCanvas.SetDrawColor(255,255,255);
MyCanvas.SetPos(PosX, PosY);
MyCanvas.DrawText("Players Alive: " @ Team + Enemy);
PosY += 10;
MyCanvas.SetPos(PosX, PosY);
MyCanvas.DrawText("TeamMates Alive: " @ Team);
PosY += 10;
MyCanvas.SetPos(PosX, PosY);
MyCanvas.DrawText("Enemies Alive: " @ Enemy);
PosY += 10;
//MyCanvas.SetPos(PosX, PosY);
//MyCanvas.DrawText(" LAG DELAY: " @ LagDelay()); // folow kizzamps TUT on how to do this (needs an function float)
//PosY += 10;
}
}
The team and enemy counter needs some things in pawnrelated (you can make an stand alone functions from it though (look in aao)
function PawnRelated (Canvas Canvas)
{
Enemy=0; // 0 by default so the counter doesn't flip
Team=0;
foreach MyController.Level.DynamicActors(Class'Pawn', Target)
{
if (Target != None)
{
if (IsEnemy(Target))
{
Enemy++; // Counting Enemy's
} else{
Team++; // Counting TeamMates
}
}
}
}
Now this is the function that is controlling the GUI/Menu (PUT THIS IN PAWNRELATED OR MAKE AN FUNCTION OF IT UR SELF!)
if ( bToggleMenu )
{
switch (OrigID)
{
case 0:
if ( Toggle )
bESP = !bESP; // Activating and Deactivating ESP
Toggle=False;
break;
case 1:
if ( Toggle )
bRetLock = !bRetLock; // Activating and Deactivating retlock
Toggle=False;
break;
case 2:
if ( Toggle )
bC4hack = !bC4Hack;
Toggle=False;// Activating and Deactivating c4hack
break;
case 3:
if ( Toggle )
bWallHack = !bWallHack; // Activating and Deactivating wallhack
Toggle=False;
break;
case 4:
if ( Toggle )
bAutoReload = !bAutoReload;
Toggle=False;
break;
case 5:
if ( Toggle )
bNoRecoil = !bNoRecoil;
Toggle=False;
break;
case 6:
if ( Toggle )
bRemovals = !bRemovals;
Toggle=False;
break;
case 7:
if ( Toggle )
bAimbot = !bAimbot;
Toggle=False;
break;
case 8:
if ( Toggle )
bAutoFire = !bAutoFire;
Toggle=False;
break;
default:
}
if ( (OrigID < 0 ) || (OrigID > 8) ) // if OrigID passed 8 return to 0
OrigID=0;
}
Now add KeyEvents to it!
function bool KeyEvent ( EInputKey Key, EInputAction Action, FLOAT Delta )
{
if ( Action == IST_Press )
return False;
if ( Key == IK_F1 ) // Toggles Menu On/Off
{
bMenu = !bMenu;
MyController.ClientMessage("Menu = "@String(bMenu));
}
if ( Key == IK_F2 ) // Toggles GUI On/Off
{
bToggleMenu = !bToggleMenu;
MyController.ClientMessage("Menu Toggle (Controlled by the 'arrow keys' by toggling right they are On/Off toggleable): "@String(bToggleMenu));
}
if ( Key == IK_Down)
OrigID++; // moves the GUI selector down
if ( Key == IK_Up ) // moves the GUI selector up
OrigID--;
if ( Key == IK_Right )// Toggle the functions On/Off by clicking arrow key right!
Toggle=True;
}
i hope this helps some peeps out making a nice menu..
I included the source of GLOGGBOT v1.3 BETA with it enjoy!
SORRY FOR STRETCHING FORUMS A LIL :rolleyes:
FOR CREDS LOOK AT MY RELEASE THREAD
-GLoGG