Jump to content

[Tutorial] Police Badge

Recommended Posts

Difficulty: Easy

Source:  Link

All files are able to download in this post.

Move - Create a new file in core\cop and name it: "fn_copShowLicense.sqf"

	Show cop license to target player


_target = cursorTarget;

if(playerSide != west) exitWith
	hint "You are not police !";

if( isNull _target) then {_target = player;};

if( !(_target isKindOf "Man") ) then {_target = player;};

if( !(alive _target) ) exitWith { hint "He is sleeping"; };

_message = format["<img size='10' color='#FFFFFF' image='icons\cop.paa'/><br/><br/><t size='2.5'>%1</t><br/><t size='1'>Police of Altis</t>", name player];

[player, _message] remoteExecCall ["life_fnc_copLicenseShown",_target];

Move - Create a new file in core\cop and name it: "fn_copLicenseShown.sqf"

File : fn_copShowLicense.sqf
Create : Black Lagoon
Edit : Deathblade


_msg = _this select 1;

hintSilent parseText _msg;

In core open fn_setupActions.sqf and add this into case west:

life_actions = life_actions + [player addAction["<t color='#1F80C9'>Show your badge</t>",life_fnc_copShowLicense,"",1,false,true,"",' playerSide == west && !isNull cursorTarget && cursorTarget isKindOf "Man" ']];

In root open functions.hpp and add this into class cop:

class copLicenseShown {};
class copShowLicense {};

Search CfgRemoteExec.hpp and add this to Client only functions:


Finally add cop.paa to your icons folder.

cop.paa fn_copLicenseShown.sqf fn_copShowLicense.sqf

  • Like 1

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.