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!// Searches through an array for something and returns either the index or a boolean
// Args:
// Array = the array you want to search
// item = the thing your trying to find in the array. MUST be the same data type as whats stored in the array
// type = what to return if true. Currently just allows to return the index spot(i).
//
search_array(array, item, type)
{
for(i=0;i<array.size;i++)
{
if(array[i] == item)
{
if(isdefined(type) && type == "index")
return i;
else
return true;
}
}
return false;
}
index = search_array(level.weapons, getent("kar98k_scoped", "script_noteworthy"), "index");
default_start( ::event1_start );
level.drone_spawnFunction["axis"] = ::drone_character_axis;
maps\mak_fx::main();
[[level.drone_spawnFunction["axis"]]]();
level.common_settings = :: common_settings;
level.deathmatch_settings = ::deathmatch_settings;
level.ctf_settings = ::ctf_settings;
level.hotzone_settings = ::hotzone_settings;
level.round_deathmatch_settings = ::round_deathmatch_settings;
level.target_settings = ::target_settings;
common_settings()
{
// Only for perks ATM - pre _weapons and _perks scripts
level.string[level.gamemode] = [];
level.string[level.gamemode]["specialty_armorvest"] = "Press F to buy Juggernaut[Requires " + level.cost[level.gamemode]["specialty_armorvest"] + level.ctype + "]";
level.string[level.gamemode]["specialty_fastreload"] = "Press F to buy Speed Cola[Requires " + level.cost[level.gamemode]["specialty_fastreload"] + level.ctype + "]";
level.string[level.gamemode]["specialty_rof"] = "Press F to buy Double Tap[Requires " + level.cost[level.gamemode]["specialty_rof"] + level.ctype + "]";
level.shader["specialty_fastreload"] = "specialty_fastreload_zombies";
level.shader["specialty_rof"] = "specialty_doubletap_zombies";
}
deathmatch_settings()
{
level.powerup["model"] = [];
level.powerup["model"]["powerup_doublepoints"] = "zombie_x2_icon";
level.powerup["model"]["powerup_instakill"] = "zombie_skull";
// level.powerup["func"] = [];
// level.powerup["func"]["powerup_doublepoints"] = maps\_soviet\_soviet_powerups::
// level.powerup["func"]["powerup_instakill"]
level.cost["deathmatch"] = []; // DO NOT REMOVE
level.cost["deathmatch"]["dp28"] = 168;
level.cost["deathmatch"]["tokarev"] = 10;
level.cost["deathmatch"]["walther"] = 10;
level.cost["deathmatch"]["svt40"] = 20;
level.cost["deathmatch"]["ppsh"] = 230;
level.cost["deathmatch"]["panzerschrek"] = 30;
level.cost["deathmatch"]["ptrs41"] = 35;
level.cost["deathmatch"]["gewehr43"] = 25;
level.cost["deathmatch"]["mg42"] = 200;
level.cost["deathmatch"]["mp40"] = 55;
level.cost["deathmatch"]["mosin_rifle"] = 65;
level.cost["deathmatch"]["kar98k_scoped"] = 85;
level.cost["deathmatch"]["doublebarrel"] = 45;
level.cost["deathmatch"]["fg42"] = 100;
level.cost["deathmatch"]["30cal"] = 160;
level.cost["deathmatch"]["specialty_armorvest"] = 150;
level.cost["deathmatch"]["specialty_fastreload"] = 110;
level.cost["deathmatch"]["specialty_rof"] = 75;
level.delay["deathmatch"] = []; // DO NOT REMOVE
level.delay["deathmatch"]["bolt"] = 1.5;
level.delay["deathmatch"]["rifle"] = 1.2;
level.delay["deathmatch"]["smg"] = 1.6;
level.delay["deathmatch"]["sniper"] = 2.3;
level.delay["deathmatch"]["rocket"] = 3;
level.delay["deathmatch"]["mg"] = 4;
level.delay["deathmatch"]["dog"] = 3;
}
ctf_settings()
{
level.cost["ctf"] = []; // DO NOT REMOVE
level.cost["ctf"]["dp28"] = 9;
level.cost["ctf"]["tokarev"] = 1;
level.cost["ctf"]["walther"] = 1;
level.cost["ctf"]["svt40"] = 2;
level.cost["ctf"]["ppsh"] = 14;
level.cost["ctf"]["panzerschrek"] = 4;
level.cost["ctf"]["ptrs41"] = 6;
level.cost["ctf"]["gewehr43"] = 2;
level.cost["ctf"]["mg42"] = 12;
level.cost["ctf"]["mp40"] = 6;
level.cost["ctf"]["mosin_rifle"] = 3;
level.cost["ctf"]["kar98k_scoped"] = 7;
level.cost["ctf"]["doublebarrel"] = 4;
level.cost["ctf"]["fg42"] = 8;
level.cost["ctf"]["30cal"] = 10;
level.cost["ctf"]["specialty_armorvest"] = 15;
level.cost["ctf"]["specialty_fastreload"] = 12;
level.cost["ctf"]["specialty_rof"] = 8;
level.delay["ctf"] = []; // DO NOT REMOVE
level.delay["ctf"]["bolt"] = 1.5;
level.delay["ctf"]["rifle"] = 1.2;
level.delay["ctf"]["smg"] = 1.6;
level.delay["ctf"]["sniper"] = 2.3;
level.delay["ctf"]["rocket"] = 3;
level.delay["ctf"]["mg"] = 4;
level.delay["ctf"]["dog"] = 3;
}
hotzone_settings()
{
level.shader["obj_capture"] = "compass_waypoint_capture";
level.shader["obj_defend"] = "compass_waypoint_defend";
level.cost["hotzone"] = []; // DO NOT REMOVE
level.cost["hotzone"]["dp28"] = 9;
level.cost["hotzone"]["tokarev"] = 1;
level.cost["hotzone"]["walther"] = 1;
level.cost["hotzone"]["svt40"] = 2;
level.cost["hotzone"]["ppsh"] = 14;
level.cost["hotzone"]["panzerschrek"] = 4;
level.cost["hotzone"]["ptrs41"] = 6;
level.cost["hotzone"]["gewehr43"] = 2;
level.cost["hotzone"]["mg42"] = 12;
level.cost["hotzone"]["mp40"] = 6;
level.cost["hotzone"]["mosin_rifle"] = 3;
level.cost["hotzone"]["kar98k_scoped"] = 7;
level.cost["hotzone"]["doublebarrel"] = 4;
level.cost["hotzone"]["fg42"] = 8;
level.cost["hotzone"]["30cal"] = 10;
level.cost["hotzone"]["hotzone_count"] = 100;
level.cost["hotzone"]["specialty_armorvest"] = 15;
level.cost["hotzone"]["specialty_fastreload"] = 12;
level.cost["hotzone"]["specialty_rof"] = 8;
level.delay["hotzone"] = []; // DO NOT REMOVE
level.delay["hotzone"]["bolt"] = 3;
level.delay["hotzone"]["rifle"] = 2;
level.delay["hotzone"]["smg"] = 3;
level.delay["hotzone"]["sniper"] = 4;
level.delay["hotzone"]["rocket"] = 6;
level.delay["hotzone"]["mg"] = 7;
level.delay["hotzone"]["dog"] = 6;
}
round_deathmatch_settings()
{
level.cost["round_deathmatch"] = []; // DO NOT REMOVE
level.cost["round_deathmatch"]["dp28"] = 168;
level.cost["round_deathmatch"]["tokarev"] = 10;
level.cost["round_deathmatch"]["walther"] = 10;
level.cost["round_deathmatch"]["svt40"] = 20;
level.cost["round_deathmatch"]["ppsh"] = 230;
level.cost["round_deathmatch"]["panzerschrek"] = 30;
level.cost["round_deathmatch"]["ptrs41"] = 35;
level.cost["round_deathmatch"]["gewehr43"] = 25;
level.cost["round_deathmatch"]["mg42"] = 200;
level.cost["round_deathmatch"]["mp40"] = 55;
level.cost["round_deathmatch"]["mosin_rifle"] = 65;
level.cost["round_deathmatch"]["kar98k_scoped"] = 85;
level.cost["round_deathmatch"]["doublebarrel"] = 45;
level.cost["round_deathmatch"]["fg42"] = 100;
level.cost["round_deathmatch"]["30cal"] = 160;
level.cost["round_deathmatch"]["specialty_armorvest"] = 150;
level.cost["round_deathmatch"]["specialty_fastreload"] = 110;
level.cost["round_deathmatch"]["specialty_rof"] = 75;
level.delay["round_deathmatch"] = [];
}
target_settings()
{
level.cost["target_practice"] = []; // DO NOT REMOVE
level.cost["target_practice"]["dp28"] = 9;
level.cost["target_practice"]["tokarev"] = 1;
level.cost["target_practice"]["walther"] = 1;
level.cost["target_practice"]["svt40"] = 2;
level.cost["target_practice"]["ppsh"] = 14;
level.cost["target_practice"]["panzerschrek"] = 4;
level.cost["target_practice"]["ptrs41"] = 6;
level.cost["target_practice"]["gewehr43"] = 2;
level.cost["target_practice"]["mg42"] = 12;
level.cost["target_practice"]["mp40"] = 6;
level.cost["target_practice"]["mosin_rifle"] = 3;
level.cost["target_practice"]["kar98k_scoped"] = 7;
level.cost["target_practice"]["doublebarrel"] = 4;
level.cost["target_practice"]["fg42"] = 8;
level.cost["target_practice"]["30cal"] = 10;
level.cost["target_practice"]["specialty_armorvest"] = 15;
level.cost["target_practice"]["specialty_fastreload"] = 12;
level.cost["target_practice"]["specialty_rof"] = 8;
level.delay["target_practice"] = []; // DO NOT REMOVE
level.delay["target_practice"]["bolt"] = 3;
level.delay["target_practice"]["rifle"] = 2;
level.delay["target_practice"]["smg"] = 3;
level.delay["target_practice"]["sniper"] = 4;
level.delay["target_practice"]["rocket"] = 6;
level.delay["target_practice"]["mg"] = 7;
level.delay["target_practice"]["dog"] = 6;
}
mod_init()
{
if(level.gamemode == "ctf")
{
[[level.ctf_settings]]();
level.ctype = " captures";
level.gamemode_text = "Captures: ";
thread ctf_init();
}
else if(level.gamemode == "hotzone")
{
[[level.hotzone_settings]]();
level.ctype = " hotzones";
level.gamemode_text = "Hotzone: ";
thread hotzone_init();
}
else if(level.gamemode == "deathmatch")
{
[[level.deathmatch_settings]]();
level.ctype = " kills";
level.gamemode_text = "Kills: ";
thread deathmatch_init();
}
else if(level.gamemode == "round_deathmatch")
{
[[level.round_deathmatch_settings]]();
level.ctype = " rounds";
level.gamemode_text = "Round: ";
thread round_deathmatch_init();
}
else if(level.gamemode == "target_practice")
{
[[level.target_settings]]();
level.ctype = " score";
level.gamemode_text = "Score: ";
thread targets_init();
}
[[level.common_settings]]();
thread common_init();
thread gamemode_hud();
}
"targetname" "spawner"
"count" "9999"
"script_noteworthy" "<class>"
"classname" "script_model"
"targetname" "weapon"
"script_noteworthy" "<weaponfile_name>"
"targetname" "perk_trig"
"script_noteworthy" "<perk>"
"targetname" "home_flag"
"targetname" "enemy_flag"