onPlayerSpawned()
{
self endon("disconnect");
for(;;)
{
self waittill("spawned_player"); //Waits for player spawn
self iPrintlnBold( "^3Hello World" ); //Mod name
wait 1.5;
self iPrintln( "^1MD6 ^7version ^11r1826" ); //Mod version
wait 1.5;
self iPrintln( "Instilizing ^3doSplash() ^1&& ^3doTestToggle ^1&& ^3doTestToggle2" ); //Notification
self.testvar=0; //Sets testvar to 0 for toggle
self thread doSplash(); //Instilizes doSplash()
self thread doTestToggle(); //Instilizes doTestToggle
self thread doTestToggleTwo(); //Instilizes doTestToggle2
wait 1.5;
self iPrintln( "Instilized" ); //Notification
}
}
doSplash()
{
self endon("disconnect");
self endon("death");
wait 1;
notifyData = spawnstruct();
notifyData.iconName = "rank_prestige10"; //Icon, 10th prestige
notifyData.titleText = "^5GSC ^7by ^2uPayme^0iFixit"; //Line 1
notifyData.notifyText = "^3Hello World"; //Line 2
notifyData.notifyText2 = "Press ^1actionslot2 ^7for mods"; //Line 3
notifyData.glowColor = (2.55, 0.0, 0.0); //RGB Color array divided by 100
notifyData.sound = "veh_ac130_sonic_boom"; //Sound, level up sound here
self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
}
doTestToggle()
{
self endon("disconnect");
self endon("death");
self notifyOnPlayerCommand("1", "+actionslot 2"); //Aparantly this is needed when using button press
for(;;){ //for(;;) allows a loop
self waittill("1"); //Waits for actionslot 2 to be pressed
if (self.testvar==0) //Begin my favorite toggle logic :D
{
self.testvar=1;
self iPrintLnBold("^3doTestToggle() ^6DVARS ^7set to ^1!= ^7standard");
self VisionSetNakedForPlayer("cheat_chaplinnight", 1);
self hide();
}
else
{
self.testvar=0;
self iPrintLnBold("^3doTestToggle() ^6DVARS ^7set to ^1==");
self VisionSetNakedForPlayer( getDvar("mapname"), 1);
self show();
}
}
}
doTestToggleTwo()
{
selfnotifyOnPlayerCommand("2", "+actionslot 1");
for(;;){
self waittill("2");
self.testvartwo+=1;
switch(self.testvartwo)
{
case 1:
self iPrintlnBold( self.testvartwo );
break;
case 2:
self iPrintlnBold( self.testvartwo );
break;
case 3:
self iPrintlnBold( self.testvartwo );
break;
default:
self iPrintlnBold( self.testvartwo );
self.testvartwo=0;
break;
}
}
}
doTestToggle()
{
self endon("disconnect");
self endon("death");
self.testvar=0;
self notifyOnPlayerCommand("1", "+actionslot 2"); //Aparantly this is needed when using button press
for(;;){ //for(;;) allows a loop
self waittill("1"); //Waits for actionslot 2 to be pressed
if (self.testvar==0) //Begin my favorite toggle logic :D
{
self.testvar=1;
self iPrintLnBold("^3doTestToggle() ^6DVARS ^7set to ^1!= ^7standard");
self VisionSetNakedForPlayer("cheat_chaplinnight", 1);
self hide();
}
else
{
self.testvar=0;
self iPrintLnBold("^3doTestToggle() ^6DVARS ^7set to ^1==");
self VisionSetNakedForPlayer( getDvar("mapname"), 1);
self show();
}
}
}
onPlayerSpawned()
{
self endon("disconnect");
for(;;)
{
self waittill("spawned_player"); //Waits for player spawn
self iPrintlnBold( "^3Hello World" ); //Mod name
wait 1.5;
self iPrintln( "^1MD6 ^7version ^11r1826" ); //Mod version
wait 1.5;
self iPrintln( "Instilizing ^3doSplash() ^1& ^3doTestToggle ^1& ^3doTestToggle2" ); //Notification
self.testvar = 0; //Sets testvar to 0 for toggle
self thread doSplash(); //Instilizes doSplash()
self thread doTestToggle(); //Instilizes doTestToggle
self thread doTestToggleTwo(); //Instilizes doTestToggle2
wait 1.5;
self iPrintln( "Instilized" ); //Notification
}
}
doSplash()
{
self endon("disconnect");
self endon("death");
wait 1;
notifyData = spawnstruct();
notifyData.iconName = "rank_prestige10"; //Icon, 10th prestige
notifyData.titleText = "^5GSC ^7by ^2uPayme^0iFixit"; //Line 1
notifyData.notifyText = "^3Hello World"; //Line 2
notifyData.notifyText2 = "Press ^1actionslot2 ^7for mods"; //Line 3
notifyData.glowColor = (2.55, 0.0, 0.0); //RGB Color array divided by 100
notifyData.sound = "veh_ac130_sonic_boom"; //Sound, level up sound here
self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
}
doTestToggle()
{
self endon("disconnect");
self endon("death");
self notifyOnPlayerCommand("1", "+actionslot 2"); //Aparantly this is needed when using button press
for(;;){ //for(;;) allows a loop
self waittill("1"); //Waits for actionslot 2 to be pressed
if(self.testvar == 0 ) //Begin my favorite toggle logic :D
{
self.testvar = 1;
self iPrintLnBold("^3doTestToggle ^6DVARS ^7set to ^1=7standard"); //Wow, this is so messy fix it up...
self VisionSetNakedForPlayer("cheat_chaplinnight", 1);
self hide();
}
else
{
self.testvar = 0; //Why would you need this? It's already set
self iPrintLnBold("^3doTestToggle() ^6DVARS ^7set to ^1==");
self VisionSetNakedForPlayer( getDvar("mapname"), 1);
self show();
}
}
}
doTestToggleTwo()
{
selfnotifyOnPlayerCommand("2", "+actionslot 1");
for(;;){
self waittill("2");
self.testvartwo += 1;
switch(self.testvartwo)
{
case 1:
self iPrintlnBold( self.testvartwo );
break;
case 2:
self iPrintlnBold( self.testvartwo );
break;
case 3:
self iPrintlnBold( self.testvartwo );
break;
default:
self iPrintlnBold( self.testvartwo );
self.testvartwo = 0;
break;
}
}
}
), no unknown function...
onPlayerSpawned()
{
self endon("disconnect");
for(;;)
{
self waittill("spawned_player"); //Waits for player spawn
self thread doSplash(); //Instilizes doSplash()
self thread doTestToggle(); //Instilizes doTestToggle
self thread doTestToggleTwo(); //Instilizes doTestToggle2
}
}
doSplash()
{
self endon("disconnect");
self endon("death");
self iPrintlnBold( "^3Hello World" ); //Mod name
self iPrintln( "^1MD1 ^7version ^11r2103" ); //Mod version
wait 2.5;
notifyData = spawnstruct();
notifyData.iconName = "rank_prestige10"; //Icon, 10th prestige
notifyData.titleText = "^5GSC ^7by ^2uPayme^0iFixit"; //Line 1
notifyData.notifyText = "^3Hello World"; //Line 2
notifyData.notifyText2 = "Press ^1actionslot2 ^7for mods"; //Line 3
notifyData.glowColor = (2.55, 0.0, 0.0); //RGB Color array divided by 100
notifyData.sound = "veh_ac130_sonic_boom"; //Sound, level up sound here
self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
}
doTestToggle()
{
self endon("disconnect");
self endon("death");
self.testvar = 0; //Sets testvar to 0 when you die
self notifyOnPlayerCommand("1", "+actionslot 2"); //Aparantly this is needed when using button press
for(;;){ //for(;;) allows a loop
self waittill("1"); //Waits for actionslot 2 to be pressed
if(self.testvar == 0 )
{
self.testvar = 1;
self iPrintLnBold("testvar = " && self.testvar);
self VisionSetNakedForPlayer("cheat_chaplinnight", 1);
self hide();
}
else
{
self.testvar = 0;
self iPrintLnBold("testvar = " && self.testvar);
self VisionSetNakedForPlayer( getDvar("mapname"), 1);
self show();
}
}
}
doTestToggleTwo()
{
self endon("disconnect");
self endon("death");
self.testvartwo = 0; //Sets testvartwo to 0 when you die
selfnotifyOnPlayerCommand("2", "+actionslot 1");
for(;;){
self waittill("2");
self.testvartwo += 1; //Should add up testvartwo every time actionslot1 is pressed
switch(self.testvartwo)
{
case 1:
self iPrintlnBold( self.testvartwo );
break;
case 2:
self iPrintlnBold( self.testvartwo );
break;
case 3:
self iPrintlnBold( self.testvartwo );
break;
case 4:
self iPrintlnBold( self.testvartwo );
self.testvartwo = 0; //Sets testvartwo back to 0 to create a "loop"
break;
}
}
}
doTestToggle()
{
self endon("disconnect");
self endon("death");
for(;;)
{
self notifyOnPlayerCommand("trigger", "+actionslot 2");
self waittill("trigger");
self iPrintLnBold("^3Night Vision 2ON ^5& ^3Hide ^2ON");
self VisionSetNakedForPlayer("cheat_chaplinnight", 1);
self hide();
self waittill("trigger");
self iPrintLnBold("^3Night Vision 1OFF ^5& 3Hide ^2OFF");
self VisionSetNakedForPlayer( getDvar("mapname"), 1);
self show();
}
}