High Value Target Addon.

  • Offline Dylan
  • Fresh Spawn
  • *
  • Posts: 10
  • Founder of RumbleGaming.co.uk

High Value Target Addon.

« posted: Apr 09, 2016, 03:21 PM »
Hello,

I am looking for a working high value target script to add to my wasteland server to create a bit more competition between players. If any one could link/or add in the comments a script and tell me where to add the script that would be great.

Thank you

Re: High Value Target Addon.

« Reply #1 posted: Apr 09, 2016, 06:57 PM »
/addons/HvT/HvT.sqf
Code: [Select]
// @file Version: 1.0
// @file Name: HvT.sqf
// @file Author: Cael817, CRE4MPIE, rewrite by LouD.
// @file Info:

if (isDedicated) exitWith {};
waitUntil {!isNull player};
waitUntil {!isNil "playerSpawning" && {!playerSpawning}};

for "_i" from 0 to 1 step 0 do
{
if (isNil "createBountyMarker" && player getvariable "cmoney" > 50000) then // Edit the 50000 for how much a player needs to be carrying to become a HvT
{
_title  = "<t color='#ff0000' size='1.2' align='center'>High Value Target! </t><br />";
_name = format ["%1<br /> ",name player];     
_text = "<t color='#FFFFFF' shadow='1' shadowColor='#000000' align='center'>Someone has spotted you carrying a large sum of money and has marked your location on the map!</t><br />";     
hint parsetext (_title +  _name +  _text);
playsound "Topic_Done";

createBountyMarker =
{
_markerName = format ["%1_bountyMarker",name player]; 
_bountyMarker = createMarker [_markerName, getPos (vehicle player)];
_bountyMarker setMarkerShape "ICON";
_bounty = [player getVariable ["cmoney", 0]] call fn_numbersText;
_bountyMarker setMarkerText (format ["High Value Target: %1 (%2$)", name player, _bounty]);
_bountyMarker setMarkerColor "ColorRed";
_bountyMarker setMarkerType "mil_dot";
sleep 45;
deleteMarker _markerName;
createBountyMarker = nil;
};
[] spawn createBountyMarker;
};
}; //will run infinitely

/init.sqf (near the bottom, under "//init 3rd Party Scripts"
Code: [Select]
[] execVM "addons\HvT\HvT.sqf";
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2568

Re: High Value Target Addon.

« Reply #2 posted: Apr 10, 2016, 02:18 AM »
Code: [Select]
for "_i" from 0 to 1 step 0 do
what the fuck is this, that's probably the most terrible line of code I've seen in my entire life

that alone will eat away like 25% of your FPS
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2568

Re: High Value Target Addon.

« Reply #4 posted: Apr 10, 2016, 07:07 PM »
Code: [Select]
for "_i" from 0 to 1 step 0 do
what the fuck is this, that's probably the most terrible line of code I've seen in my entire life

that alone will eat away like 25% of your FPS

I did not make the script.

Re: High Value Target Addon.

« Reply #5 posted: Apr 10, 2016, 08:04 PM »
Nope, that part was my doing ;-) sorry you felt the blame.

Anyway, this shows how a mistake like that may make your mission suffer from lowered FPS, when you have players complaining about bad FPS and whatnot it's in many cases due to bad coding etc.(in most cases due to "addons" like this from ppl that are still learning or like in my case that will never learn, but do it anyway) Dslyecxi has an excellent video on things(phone gave me the word thongs here, much nicer ;-) ) like this,  can't find it now but his videos is very worthwhile anyway.

So if someone are using my "breakLock" script and are taking a performance hit you might want to remove said part from it.

I'm better on ideas than scripting, sorry to all that use my shit or dereviates of it.

Thanks again Rev. for making this, this is not a rewrite but a complete overhaul and I'm not worthy to be in the credits.

Sent from my Sony Xperia™-smartphone, which is superior to all iPhones...
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2568

Re: High Value Target Addon.

« Reply #6 posted: Apr 10, 2016, 09:35 PM »
when you have players complaining about bad FPS and whatnot it's in many cases due to bad coding etc

No, really the biggest factors affecting FPS are the number of players and vehicles on the map. Usually most addons will have a negligible effect on the FPS, unless it's running a lot of unscheduled code (like raw addAction's or Draw / Draw3D / onEachFrame stuff). For instance, having the GPS open will lower your FPS by 10-15%, because the map icon draw code is called by the GPS display on each frame.

Re: High Value Target Addon.

« Reply #7 posted: Apr 11, 2016, 08:33 PM »
I stand corrected but still, stuff like my shit mentioned before and what dslyecxi mentions here about a certain weapon pack.
https://youtu.be/Fh3webkCo4Y?list=PLQEd6zRLOafWjCdqAwYoSGJQ4X4Iec-ps&t=421

I see i need to stop using the GPS =)

Re: High Value Target Addon.

« Reply #8 posted: Jun 16, 2016, 08:44 AM »
Hello Gents, thank you all for contributing, in one way or another you are all contributors in my eye :)  Newish to Arma3 and learning to setup my own server, just hack the Vehicle Sell & Service and HvT into my PBO.  Won't have a chance to try it out till I get home tonight. Fingers crossed.

topper.
  • Offline LouD
  • Silent but deadly ;)
  • Moderator
  • Veteran
  • ******
  • Posts: 1415

Re: High Value Target Addon.

« Reply #9 posted: Jun 20, 2016, 04:01 PM »