OFPEC Forum

Addons & Mods Depot => OFP - Addons & Mods Beta Testing => Topic started by: Mikeyfish90210 on 20 Nov 2003, 14:33:58

Title: Weapons
Post 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:
Title: Re:Weapons
Post by: m21man on 20 Nov 2003, 15:40:19
Code: [Select]
removeallweapons unit
unit addmagazine "m82mag"
unit addmagazine "m82mag"
unit addmagazine "m82mag"
unit addmagazine "m82mag"
unit addweapon "m82"
Title: Re:Weapons
Post by: m21man on 20 Nov 2003, 15:41:23
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.
Title: Re:Weapons
Post by: Mikeyfish90210 on 20 Nov 2003, 17:09:38
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:
Title: Re:Weapons
Post by: Mikeyfish90210 on 20 Nov 2003, 17:57:18
Also aswell as not having any ammo he cannt get his errr sight up to look at things :help:
Title: Re:Weapons
Post by: m21man on 20 Nov 2003, 18:49:33
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.
Title: Re:Weapons
Post by: KyleSarnik on 21 Nov 2003, 04:51:34
If your script says:

Code: [Select]
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:

Code: [Select]
_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.