Jump to content
Sign in to follow this  
Norbak

Only Admin tool

Recommended Posts

AdminList = ["xxxxxxxxxx","xxxxxxxxx2"];

if ((getPlayerUID player) in AdminList) then {

_pl = _this select 0;

action1 = _pl addaction [("<t color="#ccac00"">" + ("Punish Player") +"</t>"),"admin\pPlayer.sqf","",1,false,true,"","_this == vehicle player];

};

Is this correct?. Should this work fine and only the admin could use this option?. Or isn't it resctricted?.

Or maybe the mistake is in this>>>

"_this == vehicle player"
?

Share this post


Link to post
Share on other sites
Is this correct?. Should this work fine and only the admin could use this option?. Or isn't it resctricted?.

Or maybe the mistake is in this>>> ?

AdminList = ["xxxxxxxxxx","xxxxxxxxx2"];

if ((getPlayerUID player) in AdminList) then {

action1 = player addaction [("<t color=""#ccac00"">" + ("Punish Player") +"</t>"),"admin\pPlayer.sqf","",1,false,true,"","(vehicle player)==_target"];

};

Share this post


Link to post
Share on other sites

why "(vehicle player)==_target"?. What does it do?

I do not pretend to be a Cursortarget script. it's only a example for this.

I need the action is used by the admin, only the admin, not using target.

Edited by kyopower

Share this post


Link to post
Share on other sites
why "(vehicle player)==_target"?. What does it do?

I do not pretend to be a Cursortarget script. it's only a example for this.

addaction

condition

(optional): String - script code that must return true for the action to be shown. Special variables passed to the script code are _target (unit to which action is attached to) and _this (caller/executing unit). Default value: "true"

NOTE: condition is evaluated on each frame in non-scheduled environment. If action is added to some object and not to player, condition will only get evaluated IF player is closer than 15m to the object AND is looking at the object. If action is added to player, the condition is evaluated all the time.

so, too, will work

AdminList = ["xxxxxxxxxx","xxxxxxxxx2"];

if ((getPlayerUID player) in AdminList) then {

action1 = player addaction [("<t color=""#ccac00"">" + ("Punish Player") +"</t>"),"admin\pPlayer.sqf","",1,false,true,"","(vehicle player)==player"];

};

it was all complete crap...

AdminList = ["xxxxxxxxxx","xxxxxxxxx2"];

if ((getPlayerUID player) in AdminList) then {

action1 = player addaction [("<t color=""#ccac00"">" + ("Punish Player") +"</t>"),"admin\pPlayer.sqf","",1,false,true,"","(alive player) && (local player)"];

};

so to do badly:

player addaction

use BIS_MENU_GroupCommunication.

Edited by Dimon

Share this post


Link to post
Share on other sites

Ok, communication menua could be nicer. Thanks!

Share this post


Link to post
Share on other sites

It's not that it's nicer, but the fact that there is no loss of fps!

Share this post


Link to post
Share on other sites

It sounds very nice. I had that FPS problem when mission started. It could help me a lot. Thanks.

Share this post


Link to post
Share on other sites
waituntil {!isnil "bis_fnc_init"};
BIS_MENU_GroupCommunication = [
   ["menu-1", false],["KILL THEM ALL!!!",[2],"",-5,[["expression","[] execVM 'MSC\ADMACT_clear.sqf'"]],"1","1"],
   ["menu-1", false],[localize "STR_ADM_Schet",[3],"",-5,[["expression","[] execVM 'MSC\Schet.sqf'"]],"1","1"],
   ["menu-1", false],["Spectator",[4],"",-5,[["expression","[] execVM 'MSC\Spectator.sqf'"]],"1","1"],
   ["menu-1", false],["KILL THEM ONE BOT!!!",[5],"",-5,[["expression","[] execVM 'MSC\ADMACT_clear_c.sqf'"]],"1","1"],
   ["menu-1", false],["KILL THEM ALL AIR!!!",[6],"",-5,[["expression","[] execVM 'MSC\ADMACT_clear_a.sqf'"]],"1","1"],
   ["menu-1", false],["Proving Ground",[7],"",-5,[["expression","[] call compile preprocessFileLineNumbers 'proving_Ground\init.sqf'"]],"1","1"],
   ["menu-1", false],["deftown",[8],"",-5,[["expression","[] execVM 'ACT\ACT_deftown.sqf'"]],"1","1"],
   ["menu-1", false],["reinforcements",[9],"",-5,[["expression","[] execVM 'ACT\ACT_reinforcements.sqf'"]],"1","1"],
   ["menu-1", false],["Schet2",[10],"",-5,[["expression","[] execVM 'MSC\Schet2.sqf'"]],"1","1"],
   ["menu-2 >>>",[11],"#USER:Time_1",-5,[["expression",""]],"1","1"]
];
Time_1 = [
   ["menu-2", false],["Morning",[2],"",-5,[["expression","hint 'Morning';setDate [2014, 8, 11, 8, 0];FFA_SKIPTIME=true;publicVariable 'FFA_SKIPTIME';"]],"1","1"],
   ["menu-2", false],["Day",[3],"",-5,[["expression","hint 'Day';setDate [2014, 8, 11, 12, 0];FFA_SKIPTIME1=true;publicVariable 'FFA_SKIPTIME1';"]],"1","1"],
   ["menu-2", false],["Evening",[4],"",-5,[["expression","hint 'Evening';setDate [2014, 8, 11, 20, 58];FFA_SKIPTIME2=true;publicVariable 'FFA_SKIPTIME2';"]],"1","1"],
   ["menu-2", false],["Night",[5],"",-5,[["expression","hint 'Night';setDate [2014, 8, 11, 1, 0];FFA_SKIPTIME3=true;publicVariable 'FFA_SKIPTIME3';"]],"1","1"],
   ["menu-1 <<<",[10],"#USER:BIS_MENU_GroupCommunication",-5,[["expression",""]],"1","1"]
];
menu_3 = [
   ["menu-3", false],["code1",[2],"",-5,[["expression","hint 'menu-3 - code-1'"]],"1","1"],
   ["menu-3", false],["code2",[3],"",-5,[["expression","hint 'menu-3 - code-2'"]],"1","1"],
   ["menu-3", false],["code3",[4],"",-5,[["expression","hint 'menu-3 - code-3'"]],"1","1"],
   ["menu-3", false],["code4",[5],"",-5,[["expression","hint 'menu-3 - code-4'"]],"1","1"],
   ["menu-3", false],["code5",[6],"",-5,[["expression","hint 'menu-3 - code-5'"]],"1","1"],
   ["menu-3", false],["code6",[7],"",-5,[["expression","hint 'menu-3 - code-6'"]],"1","1"],
   ["menu-3", false],["code7",[8],"",-5,[["expression","hint 'menu-3 - code-7'"]],"1","1"],
["Time-1 <<<",[10],"#USER:BIS_MENU_GroupCommunication",-5,[["expression",""]],"1","1"]
];

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
Sign in to follow this  

×