Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "..\..\script_macros.hpp"
- /*
- File: fn_adminaspromotions.sqf
- Author: [MARSOF] Tom
- Description:
- Pushes the Admin action on the targetted player + the messages that come with it.
- */
- private["_action","_unit"];
- _action = [_this,1,-1,[0]] call BIS_fnc_param;
- _unit = lbData[15002,lbCurSel (15002)];
- _unit = call compile format["%1", _unit];
- if(isNull _unit) exitWith {hint "No unit";};
- switch (_action) do {
- //Set Constable Cop Rank / Whitelist
- case 1: {
- [1,[profileName]] remoteExecCall ["life_fnc_adminrspromotions",_unit];
- [0,"STR_RPG4YOU_promotion_swat",true,[_unit getVariable["realname",name _unit],profileName]] remoteExecCall ["life_fnc_broadcast"];
- hint parseText format["<t color='#00ff00'><t align='center'><t size='1'>EXECUTED<br/><br/></t><t color='#FFFFFF'>You PROMOTED: </t><t color='#8cff9b'>%1</t>!",_unit getVariable["realname",name _unit]];
- closeDialog 0;
- };
- //Set Sergeant Cop Rank
- case 2: {
- [2,[profileName]] remoteExecCall ["life_fnc_adminrspromotions",_unit];
- [0,"STR_RPG4YOU_promotion_swat",true,[_unit getVariable["realname",name _unit],profileName]] remoteExecCall ["life_fnc_broadcast"];
- hint parseText format["<t color='#00ff00'><t align='center'><t size='1'>EXECUTED<br/><br/></t><t color='#FFFFFF'>You PROMOTED: </t><t color='#8cff9b'>%1</t>!",_unit getVariable["realname",name _unit]];
- closeDialog 0;
- };
- //Set Inspector Cop Rank
- case 3: {
- [3,[profileName]] remoteExecCall ["life_fnc_adminrspromotions",_unit];
- [0,"STR_RPG4YOU_promotion_swat",true,[_unit getVariable["realname",name _unit],profileName]] remoteExecCall ["life_fnc_broadcast"];
- hint parseText format["<t color='#00ff00'><t align='center'><t size='1'>EXECUTED<br/><br/></t><t color='#FFFFFF'>You PROMOTED: </t><t color='#8cff9b'>%1</t>!",_unit getVariable["realname",name _unit]];
- closeDialog 0;
- };
- //Set SuperIntendent Cop Rank
- case 4: {
- [4,[profileName]] remoteExecCall ["life_fnc_adminrspromotions",_unit];
- [0,"STR_RPG4YOU_promotion_swat",true,[_unit getVariable["realname",name _unit],profileName]] remoteExecCall ["life_fnc_broadcast"];
- hint parseText format["<t color='#00ff00'><t align='center'><t size='1'>EXECUTED<br/><br/></t><t color='#FFFFFF'>You PROMOTED: </t><t color='#8cff9b'>%1</t>!",_unit getVariable["realname",name _unit]];
- closeDialog 0;
- };
- //Set NATO Cop Rank
- case 5: {
- [5,[profileName]] remoteExecCall ["life_fnc_adminrspromotions",_unit];
- [0,"STR_RPG4YOU_promotion_swat",true,[_unit getVariable["realname",name _unit],profileName]] remoteExecCall ["life_fnc_broadcast"];
- hint parseText format["<t color='#00ff00'><t align='center'><t size='1'>EXECUTED<br/><br/></t><t color='#FFFFFF'>You PROMOTED: </t><t color='#8cff9b'>%1</t>!",_unit getVariable["realname",name _unit]];
- closeDialog 0;
- };
- //Set SAS Cop Rank
- case 6: {
- [6,[profileName]] remoteExecCall ["life_fnc_adminrspromotions",_unit];
- [0,"STR_RPG4YOU_promotion_swat",true,[_unit getVariable["realname",name _unit],profileName]] remoteExecCall ["life_fnc_broadcast"];
- hint parseText format["<t color='#00ff00'><t align='center'><t size='1'>EXECUTED<br/><br/></t><t color='#FFFFFF'>You PROMOTED: </t><t color='#8cff9b'>%1</t>!",_unit getVariable["realname",name _unit]];
- closeDialog 0;
- };
- //Set Public Cop Rank
- case 0: {
- [0,[profileName]] remoteExecCall ["life_fnc_adminrspromotions",_unit];
- [0,"STR_RPG4YOU_demoted_swat",true,[_unit getVariable["realname",name _unit],profileName]] remoteExecCall ["life_fnc_broadcast"];
- hint parseText format["<t color='#00ff00'><t align='center'><t size='1'>EXECUTED<br/><br/></t><t color='#FFFFFF'>You PROMOTED: </t><t color='#8cff9b'>%1</t>!",_unit getVariable["realname",name _unit]];
- closeDialog 0;
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement