Jump to content

Recommended Posts

i would like this, if you can see a way of implementing this with a script, i would love to run it

Share this post


Link to post
Share on other sites
params["_rank","_type","_score"];

use params instead of select.

why are you using exitWith {} ?

also, you may need to spawn this while inside the event handler code block,

as I don't think it's in a scheduled environment and you're  using suspension

Share this post


Link to post
Share on other sites
On 5/2/2018 at 6:56 PM, Casio91Fin said:

failed

 

Is this the right way?

Share this post


Link to post
Share on other sites

special thanks to NeoArmageddon and Grumpy Old Man

Share this post


Link to post
Share on other sites

You can't simply take a script from a mission and use it.

 

First you don't know the context of the script. In your example the script does not exactly what you think it does. The snippet you took is for not spamming connecting players with multiple simultaneous sounds and is not about controlling whether a player levels up or not.

 

Secondly you are not allowed to simply cut code out of other missions without explicit written permission by the author (of that script, not of the mission you took it from, albeit these two are often the same person). Code, even in Arma, falls under copyright law in most countries.

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, NeoArmageddon said:

You can't simply take a script from a mission and use it.

 

First you don't know the context of the script. In your example the script does not exactly what you think it does. The snippet you took is for not spamming connecting players with multiple simultaneous sounds and is not about controlling whether a player levels up or not.

 

Secondly you are not allowed to simply cut code out of other missions without explicit written permission by the author (of that script, not of the mission you took it from, albeit these two are often the same person). Code, even in Arma, falls under copyright law in most countries.

 

This.

Either get permission from the author/authors, ask someone to make a similar function for you in the appropriate forum or start learning how to do this yourself, since it's a rather basic script.

 

Cheers

Share this post


Link to post
Share on other sites

if anyone is still looking for this type of thing heres one i made with the help of someone here. Cant remember who but she was nice. Made me make most of it she just got it working for me.

 

PromoteUnit = {
    private _rks = ["PRIVATE", "CORPORAL", "SERGEANT", "LIEUTENANT", "CAPTAIN", "MAJOR", "COLONEL"];
    private _old = rankId _this;
    if (count _rks - _old > 1) then {
        _this setRank (_rks select _old + 1);
        systemChat format ["Unit %1 promoted to %2", _this, rank _this];
    }
};
 

I was calling it with an addaction. Was gonna implement it into my mission but my mission files got corrupted, 12 months gone in seconds. 

 

heres the one to demote

 

DemoteUnit = {
    private _rks = ["PRIVATE", "CORPORAL", "SERGEANT", "LIEUTENANT", "CAPTAIN", "MAJOR", "COLONEL"];
    private _old = rankId _this;
    if (count _rks - _old > 1) then {
        _this setRank (_rks select _old - 1);
        systemChat format ["Unit %2 demoted to %1", _this, rank _this];
    }
};

 

there were errors but i cant remember them. Pretty sure you coudnt be demoted from Colonel or something like that

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

yeah i thought that was abit odd so i thought id add in the one i made awhile ago for the people searching

  • Like 3

Share this post


Link to post
Share on other sites
8 hours ago, Chuc said:

yeah i thought that was abit odd so i thought id add in the one i made awhile ago for the people searching

 

Solid effort. There's no need for that kind of selfish attitude. 

  • Like 1

Share this post


Link to post
Share on other sites
On 2/5/2018 at 2:35 PM, Casio91Fin said:

failed

 

Casio ,

a forum is for sharing information and since you are writing something and you create also a topic to discuss about , then you can't just delete and keep the info for yourself.

There will be also other Guys , who will try to find an answer , share info and get benefit from.

  • Like 1

Share this post


Link to post
Share on other sites

Sighhhh. Another one of these...

"deleted"

"failed"

"stupid question"

"was easy"

"figured it out"

"me no share"

"me no care"

  • Like 2

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

×