Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Thread: Weapons Script

  1. #1
    WHY Does this script not work on a server. Its for a MP mission.

    Quote Originally Posted by [b
    Quote[/b] ]; ************************************************** **************
    ; Custom unit script for Armed Assault
    ; Created with ArmA Edit - Version 1.1.3000
    ; HELP: Run this script from the INITIALIZATION box of the unit.
    ; CODE: [this] exec "Loadouts\LRDLO.sqs"
    ; ************************************************** **************

    ; Get the unit parameter given
    _unit = _this select 0

    ; Strip the units current gear
    removeAllWeapons _unit

    ; Add the new gear to the unit
    _unit addMagazine "30Rnd_556x45_Stanag"
    _unit addMagazine "30Rnd_556x45_Stanag"
    _unit addMagazine "30Rnd_556x45_Stanag"
    _unit addMagazine "30Rnd_556x45_Stanag"
    _unit addMagazine "30Rnd_556x45_Stanag"
    _unit addMagazine "30Rnd_556x45_Stanag"
    _unit addMagazine "30Rnd_556x45_Stanag"
    _unit addMagazine "30Rnd_556x45_Stanag"
    _unit addWeapon "M16A4"
    _unit selectWeapon "M16A4"
    _unit addMagazine "15Rnd_9x19_M9"
    _unit addMagazine "15Rnd_9x19_M9"
    _unit addMagazine "15Rnd_9x19_M9"
    _unit addMagazine "15Rnd_9x19_M9"
    _unit addMagazine "15Rnd_9x19_M9"
    _unit addMagazine "15Rnd_9x19_M9"
    _unit addMagazine "15Rnd_9x19_M9"
    _unit addMagazine "15Rnd_9x19_M9"
    _unit addWeapon "M9"
    _unit addMagazine "HandGrenadeTimed"
    _unit addMagazine "HandGrenadeTimed"
    _unit addMagazine "SmokeShellGreen"
    _unit addMagazine "SmokeShellRed"
    _unit addWeapon "Binocular"
    _unit addWeapon "NVGoggles"

    Exit
    Works Flawlessly in my MP Mission Editor but when i add it to the server the guy just starts with his usual weapons. and not the ones the script gives.

    MattXR ( MxR )

    Check out my Twitter BIS Fans and Sub!
    -- MRKCCO Twitter --


  2. #2
    Where and How exactly do you call the script?

  3. #3
    Quote Originally Posted by [b
    Quote[/b] ]; HELP: Run this script from the INITIALIZATION box of the unit.
    ; CODE: [this] exec "Loadouts\LRDLO.sqs"
    I dunno, but me thinks that the "remote player" isn't there when the init of the unit is run.

    I'd put that into the init.sqx file instead.
    like

    [player] exec "Loadouts\LRDLO.sqs"

  4. #4
    Quote Originally Posted by (The_Taurus @ July 27 2007,20:12)
    Quote Originally Posted by [b
    Quote[/b] ]; HELP: Run this script from the INITIALIZATION box of the unit.
    ; CODE: [this] exec "Loadouts\LRDLO.sqs"
    I dunno, but me thinks that the "remote player" isn't there when the init of the unit is run.
    No, I don't think so. Actually I'm pretty sure this works fine.

  5. #5
    Quote Originally Posted by (ManDay @ July 27 2007,20:14)
    No, I don't think so. Actually I'm pretty sure this works fine.
    K, I haven't got any player related stuff executed from the init of any unit when playing MP.

  6. #6
    I had in some of my missions and if I don't remember it totally wrong it always worked fine. That's why I was asking how he calls the script. If he really does the way which is described in the comments I can't explain this phenoma either.

  7. #7
    Captain MattXR's Avatar
    Join Date
    Jan 17 2005
    Location
    United Kingdom
    Posts
    6,027
    Author of the Thread
    i run this command in the players init.
    Quote Originally Posted by [b
    Quote[/b] ][this] exec "Loadouts\LRDLO.sqs"

  8. #8
    Just tried, it seems [this] doesn't work properly, as far as my experience go [player] works better.

  9. #9
    Captain MattXR's Avatar
    Join Date
    Jan 17 2005
    Location
    United Kingdom
    Posts
    6,027
    Author of the Thread
    Quote Originally Posted by (The_Taurus @ July 27 2007,22:26)
    Just tried, it seems [this] doesn't work properly, as far as my experience go [player] works better.
    Just tested it doesnt even work at all

  10. #10
    try this
    I have used some parts of this code in an other script of mine.
    Quote Originally Posted by [b
    Quote[/b] ]
    RemoveAllWeapons _this;
    RemoveMagazines _this;

    hint "rearming!"
    ~0.5

    _this addWeapon "M4SPR";
    {_this addMagazine "30Rnd_556x45_Stanag"} forEach [1,2,3,4];
    _this addMagazine "PipeBomb"

    hint "script ok !"

    exit;
    modify accordingly depending the weapons of your choice.


Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •