OFPEC Forum
Addons & Mods Depot => OFP - Addons & Mods Beta Testing => Topic started by: Mikeyfish90210 on 20 Nov 2003, 14:33:58
-
Okie dookie just got this cool sniper rifle download;
THe file is named M82A1.pbo and what i want to know is you can equip certain units, im going to use a Black op, with different weapons??? Would be much apprecited! :tomato:
-
removeallweapons unit
unit addmagazine "m82mag"
unit addmagazine "m82mag"
unit addmagazine "m82mag"
unit addmagazine "m82mag"
unit addweapon "m82"
-
I suggest you look at the readme and see what the actual names are for the weapon and the ammunition, I just made up "m82" and "m82mag" as examples.
-
Well i read the read me and my script reads;
removeallweapons Mike
Mike addmagazine "cmo_M82a1mag"
Mike addmagazine "cmo_M82a1mag"
Mike addmagazine "cmo_M82a1mag"
Mike addmagazine "cmo_M82a1mag"
Mike addweapon "cmo_M82A1"
Mike is the name of my unit, i wrote in mikes init feild, this exec "coolwep.sqs" (Coolwep.sqs is name of script file) and he gets the weapon but doesn't have any ammo?!?!?
:help::help::help::help::help::help::help::help::help::help::help:
-
Also aswell as not having any ammo he cannt get his errr sight up to look at things :help:
-
Are you sure the magazine name is "cmo_m82a1mag"? It could be just "cmo_m82a1". As for the sight, that sounds more like a problem with the rifle's cpp coding.
-
If your script says:
removeallweapons Mike
Mike addmagazine "cmo_M82a1mag"
Mike addmagazine "cmo_M82a1mag"
Mike addmagazine "cmo_M82a1mag"
Mike addmagazine "cmo_M82a1mag"
Mike addweapon "cmo_M82A1"
then you don't need "this" to execute it. Simply:
[] exec "coolwep.sqs"
but if you want to save the script and use it on other units (not named Mike), you could do this:
_mike = _this
removeallweapons _mike
_mike addmagazine "cmo_M82a1mag"
_mike addmagazine "cmo_M82a1mag"
_mike addmagazine "cmo_M82a1mag"
_mike addmagazine "cmo_M82a1mag"
_mike addweapon "cmo_M82A1"
and then use this exec "coolwep.sqs" to execute it. Totaly irrelevent but, what the hell.