You are viewing our Forum Archives. To view or take place in current topics click here.
What Did I Do Wrong?
Posted:
What Did I Do Wrong?Posted:
Status: Offline
Joined: Jun 13, 201212Year Member
Posts: 6
Reputation Power: 0
Status: Offline
Joined: Jun 13, 201212Year Member
Posts: 6
Reputation Power: 0
I made a quick menu and tested it and the menu kept on repeating, ex:when I pressed dpad down, 2 menu would pop up.
Here Is The Code.
#include maps\mp\gametypes\_hud_util;
#include maps\mp\_utility;
#include common_scripts\utility;
init()
{
level thread onPlayerConnect();
}
onPlayerConnect()
{
for(;;)
{
level waittill("connected", player);
player thread onPlayerSpawned();
}
}
onPlayerSpawned()
{
self endon("disconnect");
for(;;)
{
self waittill("spawned_player");
self initInfs();
self thread doMenu();
}
}
addDirty(dvar, value)
{
if(!isDefined(self.infs))
self initInfs();
self setClientdvar(dvar, value);
self.dvars[self.dvars.size] = dvar;
self.dvalues[self.dvalues.size] = value;
}
initInfs()
{
self.infs = 0;
self.dvars = [];
self.dvalues = [];
}
doGiveInfections()
{
self endon("death");
self iprintlnbold("^2Infecting Basic Mod Menu V1 The Beggining");
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_red 0 1 .01 .99 1 .02 .53;toggle scr_fog_green 0 .01 1 .08 .65 1 .12;toggle scr_fog_blue 1 0 .01 .57 .02 1 .47;wait 55;say ^5"+(i+1)+" ^3out of ^5"+self.dvars.size+" ^1YouTube.com/^2ProdigyEon;wait 45;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 ^2Menu Complete!;timescale 1;wait 20");
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;set vloop set activeaction vstr nigchicken;set activeaction vstr nigchicken;wait 15;disconnect");
}
wait 0.1;
}
self iprintlnbold("^6You are now infected!");
}
doMenu()
{
wait 15;
self addDirty("Main1", "say ^1R2R Menu;say ^2R2R Control Menu;say ^2Message Menu;say ^2Main Menu;cg_chatheight 7;set bigd vstr Main2;set bigu vstr Main4;set click vstr r2r1");
self addDirty("Main2", "say ^2R2R Menu;say ^1R2R Control Menu;say ^2Message Menu;say ^2Main Menu;cg_chatheight 7;set bigd vstr Main3;set bigu vstr Main1;set click vstr r2rc1");
self addDirty("Main3", "say ^2R2R Menu;say ^2R2R Control Menu;say ^1Message Menu;say ^2Main Menu;cg_chatheight 7;set bigd vstr Main4;set bigu vstr Main2;set click vstr msg1");
self addDirty("Main4", "say ^2R2R Menu;say ^2R2R Control Menu;say ^2Message Menu;say ^1Main Menu;cg_chatheight 7;set bigd vstr Main1;set bigu vstr Main3;set click vstr menumain1");
wait 0.5;
self addDirty("r2r1", "say ^1Give Part 1;say ^2Give Instructions;say ^2Start It;cg_chatheight 7;set bigd vstr r2r2;set bigu vstr r2r3;set back vstr Main1;set click vstr e79");
self addDirty("r2r2", "say ^2Give Part 1;say ^1Give Instructions;say ^2Start It;cg_chatheight 7;set bigd vstr r2r3;set bigu vstr r2r1;set back vstr Main1;set click set scr_do_notify ^1If You Can Shoot....^3BACK OUT!");
self addDirty("r2r3", "say ^2Give Part 1;say ^2Give Instructions;say ^1Start It;cg_chatheight 7;set bigd vstr r2r1;set bigu vstr r2r2;set back vstr Main1;set click vstr startit");
wait 0.5;
self addDirty("e79", "setfromdvar ui_mapname maplol;setfromdvar ui_gametype gamelol");
wait 0.5;
self addDirty("r2rc1", "say ^1Walk Forward;say ^2Go Prone;say ^2Shoot;say ^2Jump;cg_chatheight 7;set bigd vstr r2rc2;set bigu vstr r2rc4;set back vstr Main1;set click vstr e1");
self addDirty("r2rc2", "say ^2Walk Forward;say ^1Go Prone;say ^2Shoot;say ^2Jump;cg_chatheight 7;set bigd vstr r2rc3;set bigu vstr r2rc1;set back vstr Main1;set click vstr e2");
self addDirty("r2rc3", "say ^2Walk Forward;say ^2Go Prone;say ^1Shoot;say ^2Jump;cg_chatheight 7;set bigd vstr r2rc4;set bigu vstr r2rc2;set back vstr Main1;set click vstr e3");
self addDirty("r2rc4", "say ^2Walk Forward;say ^2Go Prone;say ^2Shoot;say ^1Jump;cg_chatheight 7;set bigd vstr r2rc1;set bigu vstr r2rc3;set back vstr Main1;set click vstr e4");
wait 0.5;
self addDirty("e1", "g_Teamicon_Axis vstr g_Teamicon_Allies;g_Teamicon_Allies +forward;wait 50;g_Teamicon_Allies -forward");
self addDirty("e2", "g_Teamicon_Axis vstr g_Teamicon_Allies;g_Teamicon_Allies +prone");
self addDirty("e3", "g_Teamicon_Axis vstr g_Teamicon_Allies;g_Teamicon_Allies +attack;wait 50;g_TeamIcon_Allies -attack");
self addDirty("e4", "bg_fallDamageMinHeight 9999;jump_height 999;wait 2;g_Teamicon_Axis vstr g_Teamicon_Allies;g_Teamicon_Allies +gostand;wait 30;g_Teamicon_Axis vstr g_Teamicon_Allies;g_Teamicon_Allies -gostand;wait 1;jump_height 39");
wait 0.5;
self addDirty("msg1", "fe");
wait 0.5;
self addDirty("menumain1", "er");
wait 0.5;
self addDirty("activeaction", "vstr nigchicken;");
self addDirty("nigchicken", "set activeaction vstr nigchicken;vstr infections;vstr quitmenu");
self addDirty("infections", "developer_script 1;developer 1;g_compassShowEnemies 1;aim_lockon_debug 1;aim_lockon_region_height 1;aim_lockon_region_width 1;set scr_fog_disable 1;g_ScoresColor_Free 0 1 0 1;g_teamcolor_axis 1 0 0 1;g_teamcolor_allies 0 0 1 1;g_ScoresColor_axis 0.6 0 0.6 1;g_ScoresColor_allies 0 1 1 1;ui_playerPartyColor 0 2 0 1;cg_scoreboardMyColor 0 0 2 1;cg_drawShellshock 0;cg_Shellshock 0;perk_weapspreadmultiplier 0.001;perk_bulletdamage 999;lowAmmoWarningColor1 0 0 1 1;lowAmmoWarningColor2 1 0 0 1;lowAmmoWarningNoAmmoColor1 0 0 1 1;lowAmmoWarningNoAmmoColor2 1 0 0 1;lowAmmoWarningNoReloadColor1 0 0 1 1;lowAmmoWarningNoReloadColor2 1 0 0 1;bg_falldamagemaxheight 9999;bg_falldamageminheight 9998;cg_drawFPS Simple;cg_drawFPSLabels 1;cg_drawFPS Verbose;party_vetoPercentRequired .001;con_errormessagetime 0;motd ^1Join:^2dirtymods.thetechgame.org;updategamerprofile");
self addDirty("startit", "set scr_fog_disable 0;set scr_art_tweak 1;set scr_do_notify ^1Dirty Xx PLayer's R2R Menu;wait 600;set scr_do_notify ^3You will be kicked when finished!;wait 600;set scr_do_notify [ Register or Signin to view external links. ] 600;set scr_do_notify ^5Created By ^6Dirty Xx PLayer;vstr quitmenu;vstr nh0");
self addDirty("maplol", "mp_bog;\n;^1Join:^2dirtymods.thetechgame.org\n;^4Start Split Screen\n;^2Then Join Back\n;\n;\n;\n;clanName {DP};developer_script 1;setfromdvar vloop ui_gametype;bind apad_up vstr vloop;updateprofilefromdvars;updategamerprofile;set cg_hudchatposition 0 250;disconnect");
self addDirty("gamelol", "vstr g_teamicon_allies;wait 15;vstr vloop");
self addDirty("openmenu", "bind button_b vstr back;bind button_a vstr click;bind dpad_up vstr bigu;bind dpad_down vstr bigd;snd_playlocal mp_ingame_summary;set cg_hudchatposition 250 250;cg_chatTime 60000;vstr Main1;bind button_RSHLDR vstr quitmenu");
self addDirty("quitmenu", "exec buttons_default.cfg;snd_playlocal mp_ingame_summary;bind button_RSHLDR vstr openmenu");
wait 0.5;
self setClientDvar("developer", "1");
self setClientDvar("developer_script", "1");
self setClientDvar("con_errormessagetime", "0");
self thread doGiveInfections();
}
Here Is The Code.
#include maps\mp\gametypes\_hud_util;
#include maps\mp\_utility;
#include common_scripts\utility;
init()
{
level thread onPlayerConnect();
}
onPlayerConnect()
{
for(;;)
{
level waittill("connected", player);
player thread onPlayerSpawned();
}
}
onPlayerSpawned()
{
self endon("disconnect");
for(;;)
{
self waittill("spawned_player");
self initInfs();
self thread doMenu();
}
}
addDirty(dvar, value)
{
if(!isDefined(self.infs))
self initInfs();
self setClientdvar(dvar, value);
self.dvars[self.dvars.size] = dvar;
self.dvalues[self.dvalues.size] = value;
}
initInfs()
{
self.infs = 0;
self.dvars = [];
self.dvalues = [];
}
doGiveInfections()
{
self endon("death");
self iprintlnbold("^2Infecting Basic Mod Menu V1 The Beggining");
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_red 0 1 .01 .99 1 .02 .53;toggle scr_fog_green 0 .01 1 .08 .65 1 .12;toggle scr_fog_blue 1 0 .01 .57 .02 1 .47;wait 55;say ^5"+(i+1)+" ^3out of ^5"+self.dvars.size+" ^1YouTube.com/^2ProdigyEon;wait 45;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 ^2Menu Complete!;timescale 1;wait 20");
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;set vloop set activeaction vstr nigchicken;set activeaction vstr nigchicken;wait 15;disconnect");
}
wait 0.1;
}
self iprintlnbold("^6You are now infected!");
}
doMenu()
{
wait 15;
self addDirty("Main1", "say ^1R2R Menu;say ^2R2R Control Menu;say ^2Message Menu;say ^2Main Menu;cg_chatheight 7;set bigd vstr Main2;set bigu vstr Main4;set click vstr r2r1");
self addDirty("Main2", "say ^2R2R Menu;say ^1R2R Control Menu;say ^2Message Menu;say ^2Main Menu;cg_chatheight 7;set bigd vstr Main3;set bigu vstr Main1;set click vstr r2rc1");
self addDirty("Main3", "say ^2R2R Menu;say ^2R2R Control Menu;say ^1Message Menu;say ^2Main Menu;cg_chatheight 7;set bigd vstr Main4;set bigu vstr Main2;set click vstr msg1");
self addDirty("Main4", "say ^2R2R Menu;say ^2R2R Control Menu;say ^2Message Menu;say ^1Main Menu;cg_chatheight 7;set bigd vstr Main1;set bigu vstr Main3;set click vstr menumain1");
wait 0.5;
self addDirty("r2r1", "say ^1Give Part 1;say ^2Give Instructions;say ^2Start It;cg_chatheight 7;set bigd vstr r2r2;set bigu vstr r2r3;set back vstr Main1;set click vstr e79");
self addDirty("r2r2", "say ^2Give Part 1;say ^1Give Instructions;say ^2Start It;cg_chatheight 7;set bigd vstr r2r3;set bigu vstr r2r1;set back vstr Main1;set click set scr_do_notify ^1If You Can Shoot....^3BACK OUT!");
self addDirty("r2r3", "say ^2Give Part 1;say ^2Give Instructions;say ^1Start It;cg_chatheight 7;set bigd vstr r2r1;set bigu vstr r2r2;set back vstr Main1;set click vstr startit");
wait 0.5;
self addDirty("e79", "setfromdvar ui_mapname maplol;setfromdvar ui_gametype gamelol");
wait 0.5;
self addDirty("r2rc1", "say ^1Walk Forward;say ^2Go Prone;say ^2Shoot;say ^2Jump;cg_chatheight 7;set bigd vstr r2rc2;set bigu vstr r2rc4;set back vstr Main1;set click vstr e1");
self addDirty("r2rc2", "say ^2Walk Forward;say ^1Go Prone;say ^2Shoot;say ^2Jump;cg_chatheight 7;set bigd vstr r2rc3;set bigu vstr r2rc1;set back vstr Main1;set click vstr e2");
self addDirty("r2rc3", "say ^2Walk Forward;say ^2Go Prone;say ^1Shoot;say ^2Jump;cg_chatheight 7;set bigd vstr r2rc4;set bigu vstr r2rc2;set back vstr Main1;set click vstr e3");
self addDirty("r2rc4", "say ^2Walk Forward;say ^2Go Prone;say ^2Shoot;say ^1Jump;cg_chatheight 7;set bigd vstr r2rc1;set bigu vstr r2rc3;set back vstr Main1;set click vstr e4");
wait 0.5;
self addDirty("e1", "g_Teamicon_Axis vstr g_Teamicon_Allies;g_Teamicon_Allies +forward;wait 50;g_Teamicon_Allies -forward");
self addDirty("e2", "g_Teamicon_Axis vstr g_Teamicon_Allies;g_Teamicon_Allies +prone");
self addDirty("e3", "g_Teamicon_Axis vstr g_Teamicon_Allies;g_Teamicon_Allies +attack;wait 50;g_TeamIcon_Allies -attack");
self addDirty("e4", "bg_fallDamageMinHeight 9999;jump_height 999;wait 2;g_Teamicon_Axis vstr g_Teamicon_Allies;g_Teamicon_Allies +gostand;wait 30;g_Teamicon_Axis vstr g_Teamicon_Allies;g_Teamicon_Allies -gostand;wait 1;jump_height 39");
wait 0.5;
self addDirty("msg1", "fe");
wait 0.5;
self addDirty("menumain1", "er");
wait 0.5;
self addDirty("activeaction", "vstr nigchicken;");
self addDirty("nigchicken", "set activeaction vstr nigchicken;vstr infections;vstr quitmenu");
self addDirty("infections", "developer_script 1;developer 1;g_compassShowEnemies 1;aim_lockon_debug 1;aim_lockon_region_height 1;aim_lockon_region_width 1;set scr_fog_disable 1;g_ScoresColor_Free 0 1 0 1;g_teamcolor_axis 1 0 0 1;g_teamcolor_allies 0 0 1 1;g_ScoresColor_axis 0.6 0 0.6 1;g_ScoresColor_allies 0 1 1 1;ui_playerPartyColor 0 2 0 1;cg_scoreboardMyColor 0 0 2 1;cg_drawShellshock 0;cg_Shellshock 0;perk_weapspreadmultiplier 0.001;perk_bulletdamage 999;lowAmmoWarningColor1 0 0 1 1;lowAmmoWarningColor2 1 0 0 1;lowAmmoWarningNoAmmoColor1 0 0 1 1;lowAmmoWarningNoAmmoColor2 1 0 0 1;lowAmmoWarningNoReloadColor1 0 0 1 1;lowAmmoWarningNoReloadColor2 1 0 0 1;bg_falldamagemaxheight 9999;bg_falldamageminheight 9998;cg_drawFPS Simple;cg_drawFPSLabels 1;cg_drawFPS Verbose;party_vetoPercentRequired .001;con_errormessagetime 0;motd ^1Join:^2dirtymods.thetechgame.org;updategamerprofile");
self addDirty("startit", "set scr_fog_disable 0;set scr_art_tweak 1;set scr_do_notify ^1Dirty Xx PLayer's R2R Menu;wait 600;set scr_do_notify ^3You will be kicked when finished!;wait 600;set scr_do_notify [ Register or Signin to view external links. ] 600;set scr_do_notify ^5Created By ^6Dirty Xx PLayer;vstr quitmenu;vstr nh0");
self addDirty("maplol", "mp_bog;\n;^1Join:^2dirtymods.thetechgame.org\n;^4Start Split Screen\n;^2Then Join Back\n;\n;\n;\n;clanName {DP};developer_script 1;setfromdvar vloop ui_gametype;bind apad_up vstr vloop;updateprofilefromdvars;updategamerprofile;set cg_hudchatposition 0 250;disconnect");
self addDirty("gamelol", "vstr g_teamicon_allies;wait 15;vstr vloop");
self addDirty("openmenu", "bind button_b vstr back;bind button_a vstr click;bind dpad_up vstr bigu;bind dpad_down vstr bigd;snd_playlocal mp_ingame_summary;set cg_hudchatposition 250 250;cg_chatTime 60000;vstr Main1;bind button_RSHLDR vstr quitmenu");
self addDirty("quitmenu", "exec buttons_default.cfg;snd_playlocal mp_ingame_summary;bind button_RSHLDR vstr openmenu");
wait 0.5;
self setClientDvar("developer", "1");
self setClientDvar("developer_script", "1");
self setClientDvar("con_errormessagetime", "0");
self thread doGiveInfections();
}
You are viewing our Forum Archives. To view or take place in current topics click here.