Jump to content
!TS JORDAN

[Tutorial] Bounty Hunting Framework [Dialog, DB, Player Interaction] - Updated!

Recommended Posts

Hi there, I'm getting the error trying to view bounty lists. I'm pretty poor at scripting since I am still new at it, so I was hoping I could get some input here. The error is:

resource life_bounty_Addmenu not found

I'm assuming this is what should be the file missing from my altislife mission folder named as such, but it is in fact in the core\BountyHunter folder.

Any help is welcome, thanks!  

(Licenses show up, but I cant make a bounty listing or check the bounty list)

@!TS JORDAN

 

Edited by Prophayne

Share this post


Link to post
Share on other sites
6 hours ago, Prophayne said:

Hi there, I'm getting the error trying to view bounty lists. I'm pretty poor at scripting since I am still new at it, so I was hoping I could get some input here. The error is:

resource life_bounty_Addmenu not found

I'm assuming this is what should be the file missing from my altislife mission folder named as such, but it is in fact in the core\BountyHunter folder.

Any help is welcome, thanks!  

(Licenses show up, but I cant make a bounty listing or check the bounty list)

@!TS JORDAN

 

 

Some of the files where supposed to go inside the dialog folder in your root directory: bounty_menu and bounty_addmenu Then go to masterHandler inside the same folder and include them.

  • Like 1

Share this post


Link to post
Share on other sites

Hallo! Thank you !TS JORDAN for releasing your Bountyhunter. It works great! I have no problems i want to edit something:

My civilians can revive each other. Is there a way to prohibit Civ or Medic revive when a player is on the Bounty list?

I noticed that the killed player only get deleted from list when he is respawning. When the player is requesting medic and will be revived he is still on the list.  Or maybe i testet it too short.

Edited by Walkero0

Share this post


Link to post
Share on other sites
3 hours ago, Walkero0 said:

Hallo! Thank you !TS JORDAN for releasing your Bountyhunter. It works great! I have no problems i want to edit something:

My civilians can revive each other. Is there a way to prohibit Civ or Medic revive when a player is on the Bounty list?

I noticed that the killed player only get deleted from list when he is respawning. When the player is requesting medic and will be revived he is still on the list.  Or maybe i testet it too short.

 

You could do it with global vars, set a var on the addition of the bounty to the player then check it in the revivePlayer files...

Share this post


Link to post
Share on other sites
10 minutes ago, elstp said:

How to add this step? How to do it? I will not ah!

QQ截图20170119220351.png

2.png

 

Go into the map editor and create a npc and put in this enableSimulation false; this allowDamage false; this addAction ["Bounty Hunting ($1000,000)", life_fnc_bountyBuy,"",0,false,false,"",' !license_civ_bountyH && playerSide isEqualTo civilian']; this addAction["<t color = '#D660D6'>Bounty Add</t>",life_fnc_bountyAddMenu,"",0,false,false,"",'']; this addAction["<t color = '#E6F402'>Bounty List</t>",life_fnc_bountyMenu,"",0,false,false,"",'']; in the init

Share this post


Link to post
Share on other sites
3 minutes ago, [TWS] The Vaiil said:

on the git hub, also wrong place to ask about it.

I was the RPG4.4 version, there is no higher? Or integrated version, I am sorry I was the Chinese domestic resource blockade I have to find here, the language level is not how high, so look up a lot of trouble, do you have to integrate or configure a good server? My mistake made me a good headache !!!

Share this post


Link to post
Share on other sites
3 minutes ago, elstp said:

I was the RPG4.4 version, there is no higher? Or integrated version, I am sorry I was the Chinese domestic resource blockade I have to find here, the language level is not how high, so look up a lot of trouble, do you have to integrate or configure a good server? My mistake made me a good headache !!!

 

 

1 minute ago, elstp said:

When the task is opened: Error reading task! .

I do not know what you are trying to say, but go to https://www.altisliferpg.com/forum/18-server-scripting-help-desk/ and post what kind of problem you are running into.

Share this post


Link to post
Share on other sites
On 1/13/2017 at 2:22 PM, .Twitch.tv/TwinnieWTF said:

Dude can you send fn_onPlayerKilled.sql ? I do not know where to go  

private _BountyPeeps = [];

{
	if (license_civ_bountyH) then {_BountyPeeps pushBack _x};
} forEach playableUnits;

 

 
 

@!TS JORDAN  I have the same question. Lol

Edited by tyler2351

Share this post


Link to post
Share on other sites
15 minutes ago, tyler2351 said:

I have the same question. Lol

 

On 14/01/2017 at 7:52 AM, .Twitch.tv/TwinnieWTF said:

Dude can you send fn_onPlayerKilled.sql ? I do not know where to go  

private _BountyPeeps = [];

{
	if (license_civ_bountyH) then {_BountyPeeps pushBack _x};
} forEach playableUnits;

 

 
 

It goes directly after this line:

Quote
player setVariable ["position_dead" , getPosATL player,true];

 

 

 

Share this post


Link to post
Share on other sites
29 minutes ago, tyler2351 said:

@!TS JORDAN I'm running Altis Life 4.4r3, I searched for that line in  fn_onPlayerKilled.sql and it's not there.

This is the file I have http://pastebin.com/QWTxRm1Y

 

Try this: 

#include "..\..\script_macros.hpp"
/*
    File: fn_onPlayerKilled.sqf
    Author: Bryan "Tonic" Boardwine
 
    Description:
    When the player dies collect various information about that player
    and pull up the death dialog / camera functionality.
*/
params [
    ["_unit",objNull,[objNull]],
    ["_killer",objNull,[objNull]]
];
disableSerialization;
 
if((vehicle _unit) != _unit) then {
    UnAssignVehicle _unit;
    _unit action ["getOut", vehicle _unit];
    _unit setPosATL [(getPosATL _unit select 0) + 3, (getPosATL _unit select 1) + 1, 0];
};
 
//Set some vars
_unit SVAR ["Revive",true,true];
_unit SVAR ["name",profileName,true]; //Set my name so they can say my name.
_unit SVAR ["restrained",false,true];
_unit SVAR ["Escorting",false,true];
_unit SVAR ["transporting",false,true]; //Why the fuck do I have this? Is it used?
_unit SVAR ["playerSurrender",false,true];
_unit SVAR ["steam64id",(getPlayerUID player),true]; //Set the UID.

private _BountyPeeps = [];

{
	if (license_civ_bountyH) then {_BountyPeeps pushBack _x};
} forEach playableUnits;
 
//Setup our camera view
life_deathCamera  = "CAMERA" camCreate (getPosATL _unit);
showCinemaBorder TRUE;
life_deathCamera cameraEffect ["Internal","Back"];
createDialog "DeathScreen";
life_deathCamera camSetTarget _unit;
life_deathCamera camSetRelPos [0,3.5,4.5];
life_deathCamera camSetFOV .5;
life_deathCamera camSetFocus [50,0];
life_deathCamera camCommit 0;
 
(findDisplay 7300) displaySetEventHandler ["KeyDown","if((_this select 1) == 1) then {true}"]; //Block the ESC menu
 
//Create a thread for something?
_unit spawn {
    private["_maxTime","_RespawnBtn","_Timer"];
    disableSerialization;
    _RespawnBtn = ((findDisplay 7300) displayCtrl 7302);
    _Timer = ((findDisplay 7300) displayCtrl 7301);
 
    _maxTime = time + (life_respawn_timer * 60);
    _RespawnBtn ctrlEnable false;
    waitUntil {_Timer ctrlSetText format[localize "STR_Medic_Respawn",[(_maxTime - time),"MM:SS.MS"] call BIS_fnc_secondsToString];
    round(_maxTime - time) <= 0 OR isNull _this};
    _RespawnBtn ctrlEnable true;
    _Timer ctrlSetText localize "STR_Medic_Respawn_2";
};
 
[] spawn life_fnc_deathScreen;
[] spawn life_fnc_nlrSetup;
 
//Create a thread to follow with some what precision view of the corpse.
[_unit] spawn {
    private["_unit"];
    _unit = _this select 0;
    waitUntil {if(speed _unit == 0) exitWith {true}; life_deathCamera camSetTarget _unit; life_deathCamera camSetRelPos [0,3.5,4.5]; life_deathCamera camCommit 0;};
};
 
//Make the killer wanted
if(!isNull _killer && {_killer != _unit} && {side _killer != west} && {alive _killer}) then {
    if(vehicle _killer isKindOf "LandVehicle") then {
        [getPlayerUID _killer,_killer GVAR ["realname",name _killer],"187V"] remoteExecCall ["life_fnc_wantedAdd",RSERV];
        //Get rid of this if you don't want automatic vehicle license removal.
        if(!local _killer) then {
            [2] remoteExecCall ["life_fnc_removeLicenses",_killer];
        };
    } else {
        [getPlayerUID _killer,_killer GVAR ["realname",name _killer],"187"] remoteExecCall ["life_fnc_wantedAdd",RSERV];
 
        if(!local _killer) then {
            [3] remoteExecCall ["life_fnc_removeLicenses",_killer];
        };
    };
};
 
private _BountyPeeps = [];
 
{
    if (license_civ_bountyH) then {_BountyPeeps pushBack _x};
} forEach playableUnits;
 
life_save_gear = [player] call life_fnc_fetchDeadGear;
 
//Killed by cop stuff...
if(side _killer == west && playerSide != west) then {
    life_copRecieve = _killer;
    //Did I rob the federal reserve?
    if(!life_use_atm && {CASH > 0}) then {
        [format[localize "STR_Cop_RobberDead",[CASH] call life_fnc_numberText]] remoteExecCall ["life_fnc_broadcast",RCLIENT];
        CASH = 0;
    };
}; 
 
if (side _killer isEqualTo civilian && {_killer != _unit}) then {
if (_killer in _BountyPeeps) then {
    life_bountyHunter = _killer;
};
 
if (!isNull _killer) then {
    life_removeBounty = true;
};
};
 
if(!isNull _killer && {_killer != _unit}) then {
    life_removeWanted = true;
};
 
_handle = [_unit] spawn life_fnc_dropItems;
waitUntil {scriptDone _handle};
 
life_hunger = 100;
life_thirst = 100;
life_carryWeight = 0;
CASH = 0;
 
[] call life_fnc_hudUpdate; //Get our HUD updated.
[player,life_sidechat,playerSide] remoteExecCall ["TON_fnc_managesc",RSERV];
 
[0] call SOCK_fnc_updatePartial;
[3] call SOCK_fnc_updatePartial;

 

Share this post


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

Try this: 

@!TS JORDAN I think there's another issue I'm not aware of. The game was working well until I tried to put this script in, but I know it was me that messed up somewhere haha. When loading into the server, my game will crash with a memory error, same for other players that try to connect. I had this issue before and found out that the mission file was messed up somewhere and used an older MF which made it work normal again. Sorry for taking your time! I'll try again. 

Share this post


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

@!TS JORDAN I think there's another issue I'm not aware of. The game was working well until I tried to put this script in, but I know it was me that messed up somewhere haha. When loading into the server, my game will crash with a memory error, same for other players that try to connect. I had this issue before and found out that the mission file was messed up somewhere and used an older MF which made it work normal again. Sorry for taking your time! I'll try again. 

 

Can you post your client RPT logs pleasE?

 

Share this post


Link to post
Share on other sites

@!TS JORDAN I did notice though while installing the scripts that some of your folders are different than mine. I'm assuming you're running another version of Altis Life? For instance in Step 5. you said to go to  missionname >> config >> config_license , however in my mission folder there isn't a "Config" folder anywhere, just the file "Config_Licenses" in the main folder of the mission file. 

Share this post


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

@!TS JORDAN I did notice though while installing the scripts that some of your folders are different than mine. I'm assuming you're running another version of Altis Life? For instance in Step 5. you said to go to  missionname >> config >> config_license , however in my mission folder there isn't a "Config" folder anywhere, just the file "Config_Licenses" in the main folder of the mission file. 

 

Yeah i am not using 4.4r4 or above i am on default 4.4

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.

Guest
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.