set g_player_template_example_start_weapons "default" "Which weapons does player get during spawn"
// These weapons will be given randomly. The player will get the exact amount of
// random weapons. The code will make sure that they are not duplicate.
-set g_player_template_example_num_random_start_weapons 0 "Number of weapons that can be randomly given to player during spawn"
-set g_player_template_example_random_start_weapons "" "Weapons that can be randomly given to player during spawn"
+set g_player_template_example_random_start_weapons_count "default" "Number of weapons that can be randomly given to player during spawn"
+set g_player_template_example_random_start_weapons "default" "Weapons that can be randomly given to player during spawn"
set g_player_template_example_random_start_shells "default" "How much shells does the player get with random start shell-based weapon"
set g_player_template_example_random_start_bullets "default" "How much bullets does the player get with random start bullet-based weapon"
set g_player_template_example_random_start_rockets "default" "How much rockets does the player get with random start rocket-based weapon"
{
return "g_start_ammo_fuel";
}
+ case "random_start_weapons_count":
+ {
+ return "g_random_start_weapons_count";
+ }
+ case "random_start_weapons":
+ {
+ return "g_random_start_weapons";
+ }
case "random_start_shells":
{
return "g_random_start_shells";
case "start_ammo_cells":
case "start_ammo_plasma":
case "start_ammo_fuel":
+ case "random_start_weapons_count":
case "random_start_shells":
case "random_start_bullets":
case "random_start_rockets":
{
return 1;
}
- case "num_random_start_weapons":
- {
- return 0;
- }
case "attack_scale":
case "defense_scale":
{
{
switch (variable)
{
- case "start_weapons":
case "random_start_weapons":
+ {
+ cvar_string(PlayerTemplate_GetDefaultCvarName(variable));
+ }
+ case "start_weapons":
{
return "";
}
if (!warmup_stage)
{
GivePlayerRandomWeapons(player,
- PlayerTemplate_GetFloatValue(template, "num_random_start_weapons"),
+ PlayerTemplate_GetFloatValue(template,
+ "random_start_weapons_count"),
PlayerTemplate_GetStringValue(template, "random_start_weapons"),
PlayerTemplate_GetFloatValue(template, "random_start_shells"),
PlayerTemplate_GetFloatValue(template, "random_start_bullets"),