Jump to content
Sign in to follow this  
AgentJonathan

2 scripts 2 major problems

Recommended Posts

You can put my suggestion also to a single script file...

The two methods you described both require that you execute a script or scripts many times for one unit if you want to give more equipment to that unit (not just one weapon+mags). Makes it quite messy in my opinion.

Also, why would you separate the removeAllWeapons command from the script? Not organized... it is required but you put it somewhere else than into the script.

Share this post


Link to post
Share on other sites

Well Umm... My first script HAD to be that way. BUT! Here's my new one:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_unit = _this Select 0

_type = _this Select 1

?(_type == "Soldier"): Goto "AK47CZLoadout"

?(_type == "Soldier AK47"): Goto "AK47Loadout"

?(_type == "Soldier AKS74U"): Goto "AKS74ULoadout"

?(_type == "Soldier AUG"): Goto "SteyrLoadout"

?(_type == "Machine Gunner"): Goto "PKLoadout"

?(_type == "Grenedier"): Goto "AKGLLoadout"

?(_type == "RPG Soldier"): Goto "RPGLoadout"

?(_type == "AT Soldier"): Goto "AT4Loadout"

?(_type == "Officer"): Goto "OfficerLoadout"

Exit

#AK47CZLoadout

RemoveAllWeapons _unit

_unit AddMagazine "AK47"

_unit AddMagazine "AK47"

_unit AddMagazine "AK47"

_unit AddMagazine "AK47"

_unit AddWeapon "AK47CZ"

_unit AddMagazine "HandGrenade"

_unit AddMagazine "HandGrenade"

_unit AddMagazine "HandGrenade"

_unit AddMagazine "HandGrenade"

_unit AddMagazine "HandGrenade"

_unit AddMagazine "HandGrenade"

Exit

#AK47Loadout

RemoveAllWeapons _unit

_unit AddMagazine "AK47"

_unit AddMagazine "AK47"

_unit AddMagazine "AK47"

_unit AddMagazine "AK47"

_unit AddWeapon "AK47"

_unit AddMagazine "HandGrenade"

_unit AddMagazine "HandGrenade"

_unit AddMagazine "HandGrenade"

_unit AddMagazine "HandGrenade"

_unit AddMagazine "HandGrenade"

_unit AddMagazine "HandGrenade"

Exit

#AKS74ULoadout

RemoveAllWeapons _unit

_unit AddMagazine "AK74"

_unit AddMagazine "AK74"

_unit AddMagazine "AK74"

_unit AddMagazine "AK74"

_unit AddWeapon "AK74SU"

_unit AddMagazine "Mine"

_unit AddMagazine "Mine"

_unit AddMagazine "PipeBomb"

Exit

#SteyrLoadout

RemoveAllWeapons _unit

_unit AddMagazine "SteyrMag"

_unit AddMagazine "SteyrMag"

_unit AddMagazine "SteyrMag"

_unit AddMagazine "SteyrMag"

_unit AddMagazine "SteyrMag"

_unit AddMagazine "SteyrMag"

_unit AddWeapon "Steyr"

_unit AddMagazine "HandGrenade"

_unit AddMagazine "HandGrenade"

_unit AddMagazine "HandGrenade"

_unit AddMagazine "HandGrenade"

Exit

#PKLoadout

RemoveAllWeapons _unit

_unit AddMagazine "PK"

_unit AddMagazine "PK"

_unit AddMagazine "PK"

_unit AddMagazine "PK"

_unit AddMagazine "PK"

_unit AddWeapon "PK"

Exit

#AKGLLoadout

RemoveAllWeapons _unit

_unit AddMagazine "AK47"

_unit AddMagazine "AK47"

_unit AddMagazine "AK47"

_unit AddMagazine "AK47"

_unit AddMagazine "GrenadeLauncher"

_unit AddMagazine "GrenadeLauncher"

_unit AddMagazine "GrenadeLauncher"

_unit AddWeapon "AK47GrenadeLauncher"

Exit

#RPGLoadout

RemoveAllWeapons _unit

_unit AddMagazine "AK47"

_unit AddMagazine "AK47"

_unit AddMagazine "AK47"

_unit AddMagazine "AK47"

_unit AddWeapon "AK47"

_unit AddMagazine "RPGLauncher"

_unit AddMagazine "RPGLauncher"

_unit AddMagazine "RPGLauncher"

_unit AddWeapon "RPGLauncher"

Exit

#AT4Loadout

RemoveAllWeapons _unit

_unit AddMagazine "AK47"

_unit AddMagazine "AK47"

_unit AddMagazine "AK47"

_unit AddMagazine "AK47"

_unit AddWeapon "AK47"

_unit AddMagazine "AT4Launcher"

_unit AddWeapon "AT4Launcher"

Exit

#OfficerLoadout

RemoveAllWeapons _unit

_unit AddMagazine "AK74"

_unit AddMagazine "AK74"

_unit AddMagazine "AK74"

_unit AddMagazine "AK74"

_unit AddMagazine "AK74"

_unit AddMagazine "AK74"

_unit AddWeapon "AK74"

_unit AddMagazine "SmokeShell"

_unit AddMagazine "SmokeShell"

_unit AddMagazine "SmokeShellRed"

_unit AddMagazine "SmokeShellGreen"

Exit

Good? (Not being smart-anus. wink_o.gif )

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×