Jump to content

[Idea] Hunt the admin script


BetterDeadThanZed

Recommended Posts

 

add ";" after last "}" , it should be better ;)

if(!isDedicated){
	"GlobalAdminHint" addPublicVariableEventHandler { 
		hint parseText format["%1", (_this select 1) select 0]
	};

	[] spawn {	
		waitUntil{vehicle player == player && time > 5};
		[] execVM "scripts\add_action_menu.sqf";
	};	
};

 

I have added the above to the end of my init.sqf file but I keep getting the following error in my rpt file.

 

File mpmissions\__cur_mp.altis\init.sqf, line 37

     Error in expression <, _this select 1]; }; if(!isDedicated){"GlobalAdminHint" addPublicVariableEve>

     Error position: <{"GlobalAdminHint" addPublicVariableEve>

     Error Missing ;

 

any idea how to fix this?

 

Link to comment
Share on other sites

I have added the above to the end of my init.sqf file but I keep getting the following error in my rpt file.

 

File mpmissions\__cur_mp.altis\init.sqf, line 37

     Error in expression <, _this select 1]; }; if(!isDedicated){"GlobalAdminHint" addPublicVariableEve>

     Error position: <{"GlobalAdminHint" addPublicVariableEve>

     Error Missing ;

 

any idea how to fix this?

 

Missing ; end of line 3 lol.

 

hint parseText format["%1", (_this select 1) select 0]; <-

 

Need help error publicvariable #0

- #0 "GlobalAdminHint" = ["Hunting the Admin

Silent Hog

Has gone crazy!

Go find him and kill him.

Look at his position on the map.

For a nice prize!

"]

 

whot wrong

 

Check this post out 

 

Or go back in this thread and read rems_be's reply

Link to comment
Share on other sites

i got the menu to load with the below script change

 

if(!isDedicated) then {
 "GlobalAdminHint" addPublicVariableEventHandler {
  hint parseText format ["%1", ((_this select 1) select 0)];  // brackets were missing around the (_this select 1) select 0
 };

 

but now I get a Battleye restriction kick #42 with the following log

 

#42 "AdminHint";

systemChat "Let's hunt admin...";

_Marker = createMarker [_pname, position player];
_Marker setMarkerColor "ColorG"

Link to comment
Share on other sites

i got the menu to load with the below script change

 

if(!isDedicated) then {

 "GlobalAdminHint" addPublicVariableEventHandler {

  hint parseText format ["%1", ((_this select 1) select 0)];  // brackets were missing around the (_this select 1) select 0

 };

 

but now I get a Battleye restriction kick #42 with the following log

 

#42 "AdminHint";

systemChat "Let's hunt admin...";

_Marker = createMarker [_pname, position player];

_Marker setMarkerColor "ColorG"

scripts.txt in line 43 add !"_Marker = createMarker [_pname, position player];"

Link to comment
Share on other sites

This works and players love it thank you so much, the only problem is that its on top of my menu, which makes it hard as i miss click that every now and then. Would it be possible to add kindof a confirmation to it as well as putting it at the bottom?

Link to comment
Share on other sites

Can anyone see what might be wrong here?

 

RPT:

if(!isDedicated){
"GlobalAdminHint" addPublicVariableEve>
15:36:16   Error position: <{
"GlobalAdminHint" addPublicVariableEve>
15:36:16   Error Missing ;
15:36:16 File mpmissions\__cur_mp.Altis\init.sqf, line 24

Init.sqf:

if(!isDedicated){
	"GlobalAdminHint" addPublicVariableEventHandler { 
		hint parseText format["%1", ((_this select 1) select 0)];
	};

	[] spawn {	
		waitUntil{vehicle player == player && time > 5};
		[] execVM "Scripts\HuntAdmin\add_action_menu.sqf";
		[] execVM "ScrollMenu.sqf"; //ignore this
	};	
};
Link to comment
Share on other sites

How would I go about adding a menu to this so the actual Admin Hunt option is one step down? I am just trying to make it so my admins don't accidently trigger it.

 

"scripts\add_action_menu.sqf"

waitUntil{!isNull (findDisplay 46)};

//Add action menu for admin (replace xxxxxxxxxxxxxx with your ID)
if ((getPlayerUID player) in ["xxxxxxxxxxxxxx","xxxxxxxxxxxxxx","xxxxxxxxxxxxxx","xxxxxxxxxxxxxx"]) then {
	systemChat "Adding action menu...";
	removeAllActions player;
   
	waitUntil {!isNull player};
	while {true} do {
	   waitUntil {sleep 1.5; alive player};
		player addaction ["Admin Hunt", "scripts\adminhunt.sqf","",5,false,true,"",""];
	   waitUntil {sleep 1.5; !alive player};
	};
};
 

 

Link to comment
Share on other sites

How would I go about adding a menu to this so the actual Admin Hunt option is one step down? I am just trying to make it so my admins don't accidently trigger it.

 

edit this line:

player addaction ["Admin Hunt", "scripts\adminhunt.sqf","",5,false,true,"",""];

 

to:

 

player addaction ["Admin Hunt", "scripts\adminhunt.sqf","",-99,false,true,"",""];

Link to comment
Share on other sites

 

Can anyone see what might be wrong here?

 

RPT:

if(!isDedicated){
"GlobalAdminHint" addPublicVariableEve>
15:36:16   Error position: <{
"GlobalAdminHint" addPublicVariableEve>
15:36:16   Error Missing ;
15:36:16 File mpmissions\__cur_mp.Altis\init.sqf, line 24

Init.sqf:

if(!isDedicated){
	"GlobalAdminHint" addPublicVariableEventHandler { 
		hint parseText format["%1", ((_this select 1) select 0)];
	};

	[] spawn {	
		waitUntil{vehicle player == player && time > 5};
		[] execVM "Scripts\HuntAdmin\add_action_menu.sqf";
		[] execVM "ScrollMenu.sqf"; //ignore this
	};	
};

 

if(!isDedicated) then {

 

Here's the full code that's working if anyone needs a copy/paste

 

//Admin Hunt
if(!isDedicated) then {
 "GlobalAdminHint" addPublicVariableEventHandler {
  hint parseText format ["%1", ((_this select 1) select 0)];
	};

	[] spawn {	
		waitUntil{vehicle player == player && time > 5};
		[] execVM "scripts\add_action_menu.sqf";
	};	
};
Link to comment
Share on other sites

edit this line:

player addaction ["Admin Hunt", "scripts\adminhunt.sqf","",5,false,true,"",""];

 

to:

 

player addaction ["Admin Hunt", "scripts\adminhunt.sqf","",-99,false,true,"",""];

 

This might be an insanely dumb question but what does that that value do?

Link to comment
Share on other sites

I created a script based on this idea from betterdeadthanzed a while back and decided I should release it now, since my server is basically empty all the time..  Keep a look out in the AI mission thread, if my post gets approved. 

Link to comment
Share on other sites

  • 1 month later...
Hello there,
 
I can see that you guys, code Gurus are doing great progress on this script !!! Congratz !!! and Thanks !!!
 
By the way, being hunt with just the objective to survive, protected in a base is may be not so fun for the hunted and the hunters.
 
I propose you:
 
1/ The trigger for the mission is ON when there is at least 15 players on the map an not the last 30 minutes before the restart of the server.
2/ It choose a random player and pop a message to propose to be hunted. (yes / no buttons)
3/ If the player click yes, another window pop up asking for an Easy, Fair, Hard or Insane challenge (1 minute to make a choice)
 
4a/ The player click Easy:
 
The player must reach a zone of 400 metres that IS NOT MARKED on the map to the players on the server at 8km from his position by foot (cannot use vehicules)
Position of the hunted player marked on the map to the players on the server every 120 seconds.
 
Loot => Random 5.56 weapon with 7 clips for him in a box or 1000 cryptos
 
4b/ The player click Fair:
 
The player must reach a zone of 400 metres that IS MARKED to the players on the server at 8km from his position by foot (cannot use vehicules)
Position of the hunted player maked on the map to the players on the server every 120 seconds.
 
Loot => Random 7.62 weapon with 6 clips + 2 medkits for him in a box or 1500 cryptos
 
4c/ The player click Hard:
 
The player must reach a zone of 400 metres that IS MARKED to the players on the server at 8km from his position by foot (cannot use vehicules) and STAY in this zone for 5 minutes.
Position of the hunted player maked on the map to the players on the server every 120 seconds.
 
Loot => Random 12.7 weapon with 8 clips + 2 grenade RGO + 2 medkits for him in a box or 2000 cryptos
 
4d/ The player click Insane:
 
The player must reach a zone of 400 metres that IS MARKED to the players on the server at 8km to 10 km from his position by foot (cannot use vehicules) and STAY in this zone for 10 minutes.
Position of the hunted player maked on the map to the players on the server every 120 seconds.
 
Loot => 3 random explosives + 2 grenade RGO + 2 medkits for him in a box or 3000 cryptos
 
 
 
The result must be pushed somewhere in the server database as:
 
Name of the player *** Easy succeed/failed *** Fair succeed/failed *** Hard succeed/failed *** Insane succeed/failed *** Insane+ succeed/failed *** Hunter Point (for the guy who killed the hunted)
 
This is to allow to make a scoreboard (on a website) as players love to be on a scoreboard to show their skill each other.
 
 
An Insane+ will be unlock by a player who succeed 10 times the insane mission, it will be the insane mission button with a "+" on it it is the same rules as the insane mission except that he is only able to walk (running not allowed) and the zone to reach is at 5 km only.
 
The loot of the Insane+ mission will be two times the insane loot.
 
 
For server admins who want people to be active on the map you may use the ingame scoreboard as a modifier to allow players to increase their chances to be choosed as hunted !
 
These are just a bunch of ideas, sorry for my bad english... as it is not my native language.
 
If this is put to the test, we need to evaluate the fair time needed to accomplish those missions and make a countdown on the hunted.
Link to comment
Share on other sites

  • 2 weeks later...

Hello,

 

i took a break on this, i don't know if people got my SP script working in MP atm...

 

i looked into it i got most of the stuff server side except the messages can do that soon.

the add-action works and all

 

@shuriken

it should be possible do make it like that but might take longer.

atm its just kept  basic, and my first script-test wasn't even server side so that's why most of you got errors or it didn't even work he he

 

regards FlyX

 

and @

rems_be  he sorted out my script to run on mp ( since i scripted it sp) so props to that ^^
Link to comment
Share on other sites

If you want the marker to be random and not directly on the admin you can change line 28 of adminhunt.sqf to this:

_Marker setMarkerPos [(getPosATL player select 0) + (200 * sin floor(random 360)), (getPosATL player select 1) + (200 * cos floor(random 360)), 0];

That will put a marker that rotates around a 200m radius of where the admin is, but does not give away his exact position.  Gotta make it at least a little challenging.  ;)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...