OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Multiplayer => Topic started by: 9thInfSandman on 23 Jun 2007, 04:39:30

Title: Help with a score script
Post by: 9thInfSandman on 23 Jun 2007, 04:39:30
Hey, I'm trying to make my own ranking system and I want ArmA to automatically give anyone who is a West Pilot points so they can fly immediately.  I am using ArmA Edit.

This is what I have:

{
   _unit = player;
   if (player isKindOf "SoldierWPilot") then
   {
      if (score _unit < rank1)  exitWith
      {
         player addscore 1000;
         hint "Pilot points awarded";
      };
   };
};


I get no errors when I start the match, it just doesn't work.  Please help.


Sandman
Title: Re: Help with a score script
Post by: Cheetah on 23 Jun 2007, 11:01:02
The following might work:
Code: [Select]
   _unit = player;
   if (player isKindOf "SoldierWPilot") then
   {
      if (score _unit < rank1)  exitWith
      {
         player addscore 1000;
         hint "Pilot points awarded";
      };
   };
Title: Re: Help with a score script
Post by: 9thInfSandman on 24 Jun 2007, 00:18:51
Thanks man, it worked like a charm.  :D

Sandman