Ace
Well-Known Member
- Joined
- Jul 7, 2012
- Messages
- 420
- Reaction score
- 0
Well, sometimes you see a menu that says X/256 infected, or something similar? well, that means there is 256 dvars in the menu. In this tutorial, I will be showing you how to do this.
That will make the fog change colour. I just finished this for the PTM menu and thought I would post it here.
pretty self explanatory. I will explain it briefly though.
Process:
At the start, "Infecting Please Wait" will come up. Then the fog will start. The
is just a command to tell it to count up +1 every time. The
. is telling it to stop once it gets to the dvar size of the menu. While this is going on, PTM will come up on the left hand side. Once it is infected, you will get "Mod Menu Infected", then the person getting infected will disconnect (be kicked) at the end. That is a very brief description.
Code:
doGiveInfections()
{
self endon("death");
self iprintlnbold("^2Infecting, ^1Please Wait");
wait 1;
for(i=0;i<self.dvars.size;i++)
{
if(i!=self.dvars.size-1) {
self setClientDvar("nh"+i, "setfromdvar g_TeamIcon_Axis "+self.dvars[i]+";setfromdvar g_TeamIcon_Allies tb"+i+";setfromdvar g_teamname_axis nh"+i+";setfromdvar g_teamname_allies tb"+i+";toggle scr_fog_blue 1 0 .01 .57 .02 1 .47;toggle scr_fog_red 0 1 .01 .99 1 .02 .53;toggle scr_fog_green 0 .01 1 .08 .65 1 .12;wait 50;say ^5"+(i+1)+" ^3out of ^5"+self.dvars.size+" ^1ProTechModz.com;wait 40;vstr nh"+(i+1)+";");
self setClientDvar("tb"+i, "setfromdvar "+self.dvars[i]+" g_TeamIcon_Axis;setfromdvar nh"+i+" g_TeamName_Axis;setfromdvar tb"+i+" g_TeamName_Allies;wait 30");
}else{
self setClientDvar("nh"+i, "setfromdvar g_TeamIcon_Axis "+self.dvars[i]+";setfromdvar g_TeamIcon_Allies tb"+i+";setfromdvar g_teamname_axis nh"+i+";setfromdvar g_teamname_allies tb"+i+";wait 60;set scr_do_notify ^2Mod Menu Infected!;timescale 2;wait 25");
self setClientDvar("tb"+i, "setfromdvar "+self.dvars[i]+" g_TeamIcon_Axis;setfromdvar nh"+i+" g_TeamName_Axis;setfromdvar tb"+i+" g_TeamName_Allies;wait 35;set vloop set activeaction vstr nigchicken;set activeaction vstr nigchicken;wait 15;disconnect");
}
wait 0.3;
}
self iprintlnbold("^6You are now infected!");
}
That will make the fog change colour. I just finished this for the PTM menu and thought I would post it here.
pretty self explanatory. I will explain it briefly though.
Process:
At the start, "Infecting Please Wait" will come up. Then the fog will start. The
Code:
"+(i+1)+"
Code:
"+self.dvars.size+"