Post: [RELEASE] IVI40A3Fusionz Class Selector
06-19-2012, 06:16 PM #1
IVI40A3Fusionz
Former Gaming Squad Member
(adsbygoogle = window.adsbygoogle || []).push({});
Was off school today due to being ill, and i saw 247Yamato's MW2 Class Selector on his YouTube channel, had nothing to do so i thought i would code my own quickly and it turned out pretty good imo didn't take long to code and the coding is huge for what it does but oh well you don't have to use it.

Anyway so what i've done it recreated 247Yamato's MW2 Class Selector for COD4 but changed a few things.


Want to see what it looks like?
It looks kinda like this one except a few changes + it's not cursor controlled like 247Yamato's



Script:

    
ClassSelector()
{
self TakeAllWeapons();
self.Open = true;
self.Scroll = 0;
self.BG = CreateShader("","",0,0,230,360,(0,0,0),"gradient_center",0,1);
self.Scroller = CreateShader("","",0,-70,230,40,(0,0,0),"progress_bar_bg",1,1);
addClass(0, " Assault", ::getClass, "Assualt");
addClass(1, " Sub-Machine", ::getClass, "Sub-Machine");
addClass(2, "Light-Machine", ::getClass, "Light Machine");
addClass(3, " Shotgun", ::getClass, "Shotgun");
addClass(4, " Sniper", ::getClass, "Sniper");
String = "";
for(i=0;i<self.ClassSelector.size;i++) String += self.ClassSelector[i]+"\n\n";
self.Text = createFontString("default",1.Cool Man (aka Tustin);
self.Text setPoint("","",0,-70);
self.Text.sort = 2;
self.Text.alpha = 1;
self.Text setText(String);
self.Title = createFontString("default",1.6);
self.Title setPoint("","",0,-140);
self.Title.sort = 2;
self.Title.alpha = 1;
self.Title setText(" Class Selector\n By IVI40A3Fusionz\n\n\n\n\n\n\n\n\n\n\n\n\n\n[{+attack}] / [{+speed_throw}] - Navigate\n[{+activate}] - Select Class");
for(;Winky Winky
{
if(self AttackButtonPressed() || self AdsButtonPressed() && self.Open == true)
{
self.Scroll += self AttackButtonPressed();
self.Scroll -= self AdsButtonPressed();
if(self.Scroll > self.ClassSelector.size-1)self.Scroll=0;
else if(self.Scroll < 0)self.Scroll=self.ClassSelector.size-1;
self.Scroller.y = self.Scroll*43-70;
wait .2;
}
if(self UseButtonPressed() && self.Open == true)
{
self thread [[self.Function[self.Scroll]]](self.Input[self.Scroll]);
self.Open = false;
self.Title destroy();
self.Text destroy();
self.BG destroy();
self.Scroller destroy();
wait .2;
}
wait .001;
}
}
addClass(Scroll, Text, Function, Input)
{
self.ClassSelector[Scroll] = Text;
self.Function[Scroll] = Function;
self.Input[Scroll] = Input;
}
getClass(Class)
{
switch(Class)
{
case "Assault":
self doLoadouts("mp44_mp","deserteaglegold_mp","c4_mp","specialty_extraammo|specialty_rof|specialty_bullet accuracy");
break;
case "Sub-Machine":
self doLoadouts("ak74u_mp","deserteaglegold_mp","c4_mp","specialty_extraammo|specialty_rof|specialty_bullet accuracy");
break;
case "Light Machine":
self doLoadouts("rpd_mp","deserteaglegold_mp","rpg_mp","specialty_extraammo|specialty_rof|specialty_bullet accuracy");
break;
case "Shotgun":
self doLoadouts("m1014_mp","deserteaglegold_mp","rpg_mp","specialty_extraammo|specialty_fastreload|specialty _bulletaccuracy");
break;
case "Sniper":
self doLoadouts("m40a3_mp","deserteaglegold_mp","c4_mp","specialty_extraammo|specialty_fastreload|specialty _bulletaccuracy");
break;
}
}
doLoadouts(Weapon,Weapon2,Equipment,Perks)
{
self GiveWeapon(Weapon);
self GiveWeapon(Weapon2);
self GiveWeapon(Equipment);
wait .01;
self SwitchToWeapon(Weapon);
doPerks = strTok(Perks, "|");
for(i=0;i<doPerks.size;i++)
{
Perk = doPerks[i];
self setPerk(Perk[i]);
}
}
CreateShader(Align,Relative,X,Y,Width,Height,Colou r,Shader,Sort,Alpha)
{
CShader=newClientHudElem(self);
CShader.children=[];
CShader.elemType="bar";
CShader.sort=Sort;
CShader.color=Colour;
CShader.alpha=Alpha;
CShader setParent(level.uiParent);
CShader setShader(Shader,Width,Height);
CShader setPoint(Align,Relative,X,Y);
return CShader;
}


Credits:
- 247Yamato - For the original idea.
- IVI40A3Fusionz (Me) - For making it myself :p.
(adsbygoogle = window.adsbygoogle || []).push({});

The following 6 users say thank you to IVI40A3Fusionz for this useful post:

247Yamato, Harry, KingcreekS, Cmd-X, Razorcut2015, zxz0O0
06-19-2012, 07:20 PM #2
KingcreekS
NOTHING IS IMPOSSIBL
this is a remastered script
06-19-2012, 07:22 PM #3
Harry
Former Staff
haha, this is awesome! :yuno: release more!
06-19-2012, 07:23 PM #4
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by TheHellboy View Post
this is a remastered script


247Yamato's Idea but my coding, if you want you can take a look at Yamato's coding for this mod on itsmods and you'll see mine is very different to his, the only similar thing is the layout and the switch, case and breaks that we have both used, i used them mainly because it's smaller than using an if statement.

:p thought i'd put that out there for everyone Happy.

The following user thanked IVI40A3Fusionz for this useful post:

247Yamato
06-19-2012, 07:25 PM #5
KingcreekS
NOTHING IS IMPOSSIBL
Originally posted by IVI40A3Fusionz View Post
247Yamato's Idea but my coding, if you want you can take a look at Yamato's coding for this mod on itsmods and you'll see mine is very different to is, the only similar thing is the layout and the switch, case and breaks that we have both used, i used them mainly because it's smaller than using an if statement.

thought i'd put that out there for everyone .


Yea i already seen it , and its too different , so good work bro!
06-20-2012, 07:57 AM #6
247Yamato
< ^ > < ^ >
Good job and no, this isnt remastered thing HellBoy. Outie
06-20-2012, 08:08 AM #7
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by 247Yamato View Post
Good job and no, this isnt remastered thing HellBoy. Outie


I like how i made it use 1 string for the classes and still make them look in like they're in the middle of the screen like yours are :p.
06-25-2012, 03:23 PM #8
LYFN
Banned
i like it, simple clean and easy to use :carling:
06-28-2012, 12:39 PM #9
Originally posted by IVI40A3Fusionz View Post
Was off school today due to being ill, and i saw 247Yamato's MW2 Class Selector on his YouTube channel, had nothing to do so i thought i would code my own quickly and it turned out pretty good imo didn't take long to code and the coding is huge for what it does but oh well you don't have to use it.

Anyway so what i've done it recreated 247Yamato's MW2 Class Selector for COD4 but changed a few things.


Want to see what it looks like?
It looks kinda like this one except a few changes + it's not cursor controlled like 247Yamato's



Script:

    
ClassSelector()
{
self TakeAllWeapons();
self.Open = true;
self.Scroll = 0;
self.BG = CreateShader("","",0,0,230,360,(0,0,0),"gradient_center",0,1);
self.Scroller = CreateShader("","",0,-70,230,40,(0,0,0),"progress_bar_bg",1,1);
addClass(0, " Assault", ::getClass, "Assualt");
addClass(1, " Sub-Machine", ::getClass, "Sub-Machine");
addClass(2, "Light-Machine", ::getClass, "Light Machine");
addClass(3, " Shotgun", ::getClass, "Shotgun");
addClass(4, " Sniper", ::getClass, "Sniper");
String = "";
for(i=0;i<self.ClassSelector.size;i++) String += self.ClassSelector[i]+"\n\n";
self.Text = createFontString("default",1.Cool Man (aka Tustin);
self.Text setPoint("","",0,-70);
self.Text.sort = 2;
self.Text.alpha = 1;
self.Text setText(String);
self.Title = createFontString("default",1.6);
self.Title setPoint("","",0,-140);
self.Title.sort = 2;
self.Title.alpha = 1;
self.Title setText(" Class Selector\n By IVI40A3Fusionz\n\n\n\n\n\n\n\n\n\n\n\n\n\n[{+attack}] / [{+speed_throw}] - Navigate\n[{+activate}] - Select Class");
for(;Winky Winky
{
if(self AttackButtonPressed() || self AdsButtonPressed() && self.Open == true)
{
self.Scroll += self AttackButtonPressed();
self.Scroll -= self AdsButtonPressed();
if(self.Scroll > self.ClassSelector.size-1)self.Scroll=0;
else if(self.Scroll < 0)self.Scroll=self.ClassSelector.size-1;
self.Scroller.y = self.Scroll*43-70;
wait .2;
}
if(self UseButtonPressed() && self.Open == true)
{
self thread [[self.Function[self.Scroll]]](self.Input[self.Scroll]);
self.Open = false;
self.Title destroy();
self.Text destroy();
self.BG destroy();
self.Scroller destroy();
wait .2;
}
wait .001;
}
}
addClass(Scroll, Text, Function, Input)
{
self.ClassSelector[Scroll] = Text;
self.Function[Scroll] = Function;
self.Input[Scroll] = Input;
}
getClass(Class)
{
switch(Class)
{
case "Assault":
self doLoadouts("mp44_mp","deserteaglegold_mp","c4_mp","specialty_extraammo|specialty_rof|specialty_bullet accuracy");
break;
case "Sub-Machine":
self doLoadouts("ak74u_mp","deserteaglegold_mp","c4_mp","specialty_extraammo|specialty_rof|specialty_bullet accuracy");
break;
case "Light Machine":
self doLoadouts("rpd_mp","deserteaglegold_mp","rpg_mp","specialty_extraammo|specialty_rof|specialty_bullet accuracy");
break;
case "Shotgun":
self doLoadouts("m1014_mp","deserteaglegold_mp","rpg_mp","specialty_extraammo|specialty_fastreload|specialty _bulletaccuracy");
break;
case "Sniper":
self doLoadouts("m40a3_mp","deserteaglegold_mp","c4_mp","specialty_extraammo|specialty_fastreload|specialty _bulletaccuracy");
break;
}
}
doLoadouts(Weapon,Weapon2,Equipment,Perks)
{
self GiveWeapon(Weapon);
self GiveWeapon(Weapon2);
self GiveWeapon(Equipment);
wait .01;
self SwitchToWeapon(Weapon);
doPerks = strTok(Perks, "|");
for(i=0;i<doPerks.size;i++)
{
Perk = doPerks[i];
self setPerk(Perk[i]);
}
}
CreateShader(Align,Relative,X,Y,Width,Height,Colou r,Shader,Sort,Alpha)
{
CShader=newClientHudElem(self);
CShader.children=[];
CShader.elemType="bar";
CShader.sort=Sort;
CShader.color=Colour;
CShader.alpha=Alpha;
CShader setParent(level.uiParent);
CShader setShader(Shader,Width,Height);
CShader setPoint(Align,Relative,X,Y);
return CShader;
}


Credits:
- 247Yamato - For the original idea.
- IVI40A3Fusionz (Me) - For making it myself :p.

nice One Ryan :y:
06-29-2012, 04:13 AM #10
oG-Modder
Do a barrel roll!
Love it keep it up Ryan

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo