"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."
Posts
264
Respect
52Add +1
Forum Rank
Mr. Elemental
Primary Group
Member
Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!onPlayerSpawn()
{
self endon("disconnect");
self waittill( "spawned_player" );
self SetClientDvars( "cg_deadChatWithDead", "1",
"cg_deadChatWithTeam", "1",
"cg_deadHearTeamLiving", "1",
"cg_deadHearAllLiving", "1",
"compass", "0",
"hud_showStance", "1",
"cg_thirdPerson", "0",
"cg_fov", "65",
"friendlyfire_enabled", "0",
"scr_player_healthregentime" ,"99999",
"g_friendlyfireDist", "0",
"g_friendlyNameDist" , "0");
self set_weapons();
self thread onPlayerRespawn();
}
set_weapons()
{
if(!isDefined(self.spawnedOnTeam) || !self.spawnedOnTeam)
{
self openMenuNoMouse("test_menu");//open the weapon choice menu
weapon = undefined;
startWeapon = undefined;
self takeAllWeapons();
if(!isDefined(self.team))
{
self.team = "allies";
self giveWeapon( "m1garand" );
self giveWeapon( "fraggrenade" );
startWeapon = "m1garand";
rand = randomInt(2);
if(rand == 0)
{
weapon = "bar";
}
else
{
weapon = "thompson";
}
}
else
{
if(self.team == "allies")
{
self giveWeapon( "m1garand" );
self giveWeapon( "fraggrenade" );
startWeapon = "m1garand";
rand = randomInt(2);
if(rand == 0)
{
weapon = "bar";
}
else
{
weapon = "thompson";
}
}
else
{
self giveWeapon( "kar98k" );
self giveWeapon( "stielhandgranate" );
startWeapon = "kar98k";
rand = randomInt(3);
if(rand == 0)
{
weapon = "mp40";
}
else if( rand == 1)
{
weapon = "stg44";
}
else
{
weapon = "fg42_scoped";
}
}
}
//sets the secondary weapon for the current player
self giveWeapon( weapon );
// Switches the player's weapon once he spawns in
self switchToWeapon( startWeapon );
}
self giveWeapon("m8_white_smoke");
self giveweapon("rocket_barrage");
self setactionslot(4,"weapon","rocket_barrage");
self giveMaxAmmo( "rocket_barrage" );
}
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() UGX V.I.P. | |
![]() | Has shown excellence and experience in the area of custom mapping in the UGX-Mods community. |
![]() | Has shown excellence and experience in the area of custom scripting in the UGX-Mods community. |
![]() BO3 Modtools Alpha | This user has access to the Black Ops 3 Modtools Alpha |
menufile,ui\scriptmenus\test_menu.menuprecachemenu("test_menu");Do you have a menu file in raw\ui\scriptmenus called test_menu.menu ?
Also do you have a csv file that contains the line:And finally do you have the file precached before _zombiemode.gsc is called using the line: Code SnippetPlaintextmenufile,ui\scriptmenus\test_menu.menu Code SnippetPlaintextprecachemenu("test_menu");
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() UGX V.I.P. | |
![]() | Has shown excellence and experience in the area of custom mapping in the UGX-Mods community. |
![]() | Has shown excellence and experience in the area of custom scripting in the UGX-Mods community. |
![]() BO3 Modtools Alpha | This user has access to the Black Ops 3 Modtools Alpha |
main()
{
createAiBias();
maps\squad_control::squad_control_init();
level thread onPlayerConnect();
level.alliesLives = 10;
level.axisLives = 10;
}
onPlayerConnect()
{
setDvar("cheats" , "1");
while(1)
{
level waittill( "connecting", player );
player SetClientDvars( "cg_deadChatWithDead", "1",
"cg_deadChatWithTeam", "1",
"cg_deadHearTeamLiving", "1",
"cg_deadHearAllLiving", "1",
"compass", "0",
"hud_showStance", "0",
"cg_thirdPerson", "0",
"cg_fov", "65",
"friendlyfire_enabled", "0",
"scr_player_healthregentime" ,"99999",
"g_friendlyfireDist", "0",
"g_friendlyNameDist" , "0",
"monkeytoy" , "0");//final version will be 1
player thread onPlayerSpawn();
}
}