Welcome to Altis Life RPG

Register now to gain access to all of our features.
Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.


Note that you can now sign-in with your Steam account.


This message will be removed once you have signed in.

  • Announcements

    • AltisLifeRpg

      Opening Announcement   09/13/2016

      Opening Announcement We are happy to announce the official reopening of the community assistance forum Altis Life RPG (open source public property). Before going any further, let's go over the current situation. As you are already aware, the forum and the database of Altisliferpg.com had been hacked a few weeks ago. This unfortunate situation has touched many communities of Arma 3. The various databases were erased, and since they were under the responsibility of the previous administration, no backup was able to recover the lost data. This means that all the tedious work must be redone. This regrettable situation has led Tonic to transfer the responsibility of its administration to a new and neutral party. This party has as sole goal to reunite every community, as diverse as they are, together to perpetuate the development of our beloved mod AltisLifeRPG.  First of all, I think it is important to clarify our intentions. Foremost, we want to reassure you that we are not proclaiming being the owners of the previous versions of Altis Life (open source public property) in collaboration with BoGuu based on Tonic' codes. As you know, Boguu has been a major player in the most recent versions. Please note that this platform is and will always remain open to future developers such as Boguu that would like to elevate Altis Life RPG to the next level. By doing so, we take our role as an official reference platform very seriously in the eyes of the vast community of Altis Life RPG. We are ready to face this responsibility. We are aware that the content added by users could be provided by external sources or from the original website. If you see a tutorial that you've created on our platform where you are not credited as the author, please mention it immediately to the administration and we will promptly fix the situation. Please note that seeing the overwhelming amount of content added by the community, we will not proactively search other community assistance websites to validate if proper credits were given to the various authors. Instead, it will be the author's responsibility to be proactive in contacting the administration. Since the majority of the content found on other websites came originally from Altisliferpg.com, we encourage members joining us to share any content deemed pertinent coming from other platforms without forgetting to credit the authors.       Finally, to clarify the rumors circulating: - The forum was not scammed. It was transferred directly from Bryan 'Tonic' Boardwine to our administration. A domain cannot be scammed. - The forum was transferred as an independent entity which has as a sole mission to perpetuate the forum and not let it die out.       Altisliferpg.com Regards, the Administration.       Feel free to join us on Discord in the Altis Life RPG Community section of the forum.   And of course if you have any question, feel free to message us here.
    • Rozo

      Donations   09/18/2016

      Hello,
        We've added a donation block on the right side. All of those donation goes directly to the developer of Altis Life mod ( currently BoGuu ). None of that money is used to maintain the forum. In the future we might add a donation button to support the forum, but for now we want to encourage the developer because they went through a lot. To discuss this topic - Here
    • Shakir Darwish

      IS YOUR SERVER BROKEN SINCE 1.64 UPDATE?   09/22/2016

      If your server is broken since 1.64 go check this link thanks. https://github.com/AsYetUntitled/Framework/issues/104
    • Rozo

      Sad Day   01/04/2017

      Good evening community of Altis Life RPG, Today was a sad day. We learned the hard way that one of the helper was using his status and visibility on the forum to do things i wouldn't imagine.  We were warned about this user in the beginning, we talked about his behavior and he said that they were things of the past. We were fooled.
      Unfortunately, he fooled other community members by selling stolen content and impersonating his role as a developer in another community. Here's a remember of one of the rules on our forum, No selling scripts, snippets, or services.   So if anyone come across someone who's selling his services, scripts or whatever, Report them. Especially if it's coming from an Helper, Mod, Admin. No one in the staff should ask for money, we already mention this when we reopened the forum and that rule is here to stay.

      We can't be sorry enough for what happen here, for any harm it as caused among other communities, for money that shouldn't been spent and we truly hope this doesn't happen again.

      As for the user in question, he is now banned from our forum and discord and we wish to never cross his path again.
        If there's anything we can do hit us on Discord or send a message to an admin.
      Thanks, Rozo.
hypr

[Tutorial] Revoke Civilians Drivers License (Cop Interaction Menu)

34 posts in this topic

Allright so this is a tutorial on how to add a option to the cop interaction menu (windows-key on restrained civ) where they get a button to revoke said civilians drivers license!

Core script credit: @Repentz

Difficulty: Easy

Note: When I say root I mean your mission folder (AltisLife.Altis or TanoaLife.Tanoa).

______________________________________________________________________________________________________________________________________________________________________________________________

Step 1:

Create a file called fn_revokeDriverLicense.sqf in root -> Core -> Actions and paste this in:

/*
	File: fn_revokeDriverLicense.sqf
*/
private["_unit"];
params [
    ["_unit", ObjNull,[ObjNull]]
];
if(isNull _unit) exitWith {};
[0,format["%1 has revoked %2's Driver License.",name player, name _unit]] remoteExecCall ["life_fnc_broadcast",west];
[4] remoteExecCall ["life_fnc_removeLicenses",_unit];

 

Step 2:

Go to root -> core -> cop and open the file: fn_copInteractionMenu.sqf

Find the list of #define Btn1 37450 etc. and paste this in the middle of the last button and the Title:

#define Btn9 37458

It should look like this:

#define Btn1 37450
#define Btn2 37451
#define Btn3 37452
#define Btn4 37453
#define Btn5 37454
#define Btn6 37455
#define Btn7 37456
#define Btn8 37457
#define Btn9 37458
#define Title 37401

 

Scroll down a bit and find this:

_display = findDisplay 37400;
_Btn1 = _display displayCtrl Btn1;
_Btn2 = _display displayCtrl Btn2;
_Btn3 = _display displayCtrl Btn3;
_Btn4 = _display displayCtrl Btn4;
_Btn5 = _display displayCtrl Btn5;
_Btn6 = _display displayCtrl Btn6;
_Btn7 = _display displayCtrl Btn7;
_Btn8 = _display displayCtrl Btn8;
life_pInact_curTarget = _curTarget;

 

and paste this below the next to last row:

_Btn9 = _display displayCtrl Btn9;

 

Scroll down a bit more to this:

//SeizeWeapons Button
_Btn8 ctrlSetText localize "STR_pInAct_Seize";
_Btn8 buttonSetAction "[life_pInact_curTarget] spawn life_fnc_seizePlayerAction; closeDialog 0;";

Below it you want to paste this:

//Revoke License Button
_Btn9 ctrlSetText localize "STR_pInAct_RevokeLicense";
_Btn9 buttonSetAction "[life_pInact_curTarget] spawn life_fnc_revokeDriverLicense; closeDialog 0;";

 

Step 3:

Go to root -> Core -> Civilian and open fn_removeLicenses.sqf

Under the section called Case 3 paste this in:

// Revoking drivers license
case 4: {
		missionNamespace setVariable [LICENSE_VARNAME("driver", "civ"), false];
		hint localize "STR_Civ_LicenseRevoked";
};

 

Step 4:

Go to root -> dialog and open pInteraction.hpp

Find this:

class ButtonEight: Life_RscButtonMenu {
            idc = 37457;
            colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
            text = "";
            sizeEx = 0.025;
            x = BGX + 0.03;
            y = BGY + 0.42;
            w = 0.4;
            h = 0.038;
        };

 

And paste this below it:

class ButtonNine: Life_RscButtonMenu {
            idc = 37458;
            colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
            text = "";
            sizeEx = 0.025;
            x = BGX + 0.03;
            y = BGY + 0.47;
            w = 0.4;
            h = 0.038;
        };

 

Step 5:

Go to your mission root and open Functions.hpp and paste this in the Actions section:

class revokeDriverLicense{};

 

Step 6:

Go to your mission root and open CfgRemoteExec.hpp and paste this at the bottom of Client Only Functions:

F(life_fnc_revokeDriverLicense,CLIENT)

 

Step 7 (Last step!):

Go to your mission root and open your stringtable and add this:

<Key ID="STR_Civ_LicenseRevoked">
      <Original>You have lost your drivers license.</Original>
    </Key>

 


And we're done!

Now if you restrain a civilian with as a cop, you'll have another button in the interaction menu that removes the restrained civilian's drivers license! :) 

Edited by hypr
  • Like 4

Share this post


Link to post
Share on other sites
39 minutes ago, Repentz said:

I might just replace something like this with one where you can remove any license on a list

You mean like first pressing a revoke licenses-button and getting redirected to a list with several buttons for licenses? That'd be really cool!

Share this post


Link to post
Share on other sites
Just now, Repentz said:

It would open a new dialog menu with like 'remove drivers' 'remove rebel' etc

 

Yeah that'd be really neat! If you want I could update the OP when you're done with the code? If you're gonna make it, that is

Share this post


Link to post
Share on other sites
7 hours ago, Rez said:

@hypr Oooooh, I can see that you have a seize weapons script, you wanna share? ;)

It's just the default one from Altis Life 4.4r3

Share this post


Link to post
Share on other sites

Then I must be on 4.0 I think

6 hours ago, hypr said:

It's just the default one from Altis Life 4.4r3

 

Share this post


Link to post
Share on other sites
5 hours ago, Rez said:

Then I must be on 4.0 I think

 

Just check the github code on the framework to get the seize script, should be pretty basic! :)

Share this post


Link to post
Share on other sites

How about a pat down script?

Just now, hypr said:

Just check the github code on the framework to get the seize script, should be pretty basic! :)

 

Share this post


Link to post
Share on other sites
Just now, Rez said:

How about a pat down script?

 

I've been looking for one aswell, found one on this forum but it didn't actually work, sadly

Share this post


Link to post
Share on other sites
1 hour ago, hypr said:

I've been looking for one aswell, found one on this forum but it didn't actually work, sadly

The button goes off the screen, and doesn't sau revoke license 

Share this post


Link to post
Share on other sites
2 minutes ago, Repentz said:

I have a pat down script ill probably put up a tutorial later sometime.

What kind of pat down script do you have?

Share this post


Link to post
Share on other sites
1 minute ago, admin said:

What kind of pat down script do you have?

will place all items on ground except what you define as safe

 

Share this post


Link to post
Share on other sites
Just now, Repentz said:

will place all items on ground except what you define as safe

 

Oh I have a script where it displays a dialog of everything they have and if it's illegal it's highlighted in red. Then I you use another button to remove all illegal items.

Share this post


Link to post
Share on other sites
8 hours ago, Repentz said:

will place all items on ground except what you define as safe

 

Oh my, that script would be lovely!

Share this post


Link to post
Share on other sites
On 27/11/2016 at 7:57 AM, Rez said:

How about a pat down script?

 

 

If you wanna PM i can give you one, i provided @hypr with his. He can confirm it works.

Share this post


Link to post
Share on other sites
10 hours ago, !TS JORDAN said:

If you wanna PM i can give you one, i provided @hypr with his. He can confirm it works.

That'd be cool, feel free to send me some things for it

Share this post


Link to post
Share on other sites
22 hours ago, !TS JORDAN said:

If you wanna PM i can give you one, i provided @hypr with his. He can confirm it works.

 

11 hours ago, Rez said:

That'd be cool, feel free to send me some things for it

It does indeed work!

Share this post


Link to post
Share on other sites

Good day, an interesting guide put all works, but one thing but there is an additional button when buying a house just ninth with no description ... how to make it in this menu, there was no, or maybe I'm wrong somewhere ...

Share this post


Link to post
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