Jump to content
Repentz

[Tutorial] Simple Morphine/Bandages

Recommended Posts

SIMPLE MORPHINE AND BANDAGES

[Complete] You may attempt to install this, let me know if it works.

PNGPIX-COM-Medical-Kit-Box-PNG-Image.thumb.png.619e92ba8ca359d05a1ab0777fee73ec.png

 

 

Basically, this adds two new items: morphine and bandages, they heal over time instead of instantly, I removed all other sources of healing from my server to make it more realistic.

 

___________________________________________________________________________________________________________________________________________________________________________________

TUTORIAL

___________________________________________________________________________________________________________________________________________________________________________________

 

1. Download the attached icons.rar file

 

2. place them in your icons folder (make sure the virtual items code listed below calls to right location)

 

3. open config_vitems.sqf and place these in the class VirtualShops array:

class morphine {
        variable = "morphine";
        displayName = "STR_Item_Morphine";
        weight = 2;
        buyPrice = 1500;
        sellPrice = 300;
        illegal = true;
        edible = -1;
        icon = "images\icons\Morphine.paa";
    };

    class bandages {
        variable = "bandages";
        displayName = "STR_Item_Bandages";
        weight = 2;
        buyPrice = 200;
        sellPrice = 50;
        illegal = false;
        edible = -1;
        icon = "images\icons\ico_bandages.paa";
    };

 

 

4. Add 'morphine' and 'bandages' to whatever shops you want near the top of the file

 

5. Open stringtable.xml and add these:

<Key ID="STR_Item_Morphine">
            <Original>Morphine Syrette</Original>
        </Key>
        <Key ID="STR_Item_Bandages">
            <Original>Bandages</Original>
        </Key>

 

6. Open the useitem.sqf file, add these:

case (_item isEqualTo "morphine"):
	{
		[] spawn life_fnc_morphine;
	};

	case (_item isEqualTo "bandages"):
	{
		[] spawn life_fnc_bandages;
	};

 

7. (optional) If you want these items to save over restart/relog add them to the save_vehicle_items[] array in your config_master.hpp file

 

8. Download the scripts.rar file at the bottom, place the files inside into your core/items folder

 

9. Go into functions.h folder, add these into the core\items array:

class bandages {};
class morphine {};

 

icons.rar

scripts.rar

  • Like 5

Share this post


Link to post
Share on other sites
On 19/09/2017 at 9:11 PM, Deadlesszombie said:

Interesting script!

i myself added bandages and gave the action for players to heal players when they have them to simply 100%

Hello can you tell me how to do that please ?

i'm on Altis 5.0

Thanks

Share this post


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

Hello can you tell me how to do that please ?

i'm on Altis 5.0

Thanks

unfortunately i do not want to publically release that, but simply make a new vItem, add it to the Fn_UseItem and make it spawn a function that sets the player health to 100 for a very basic version

  • Like 2

Share this post


Link to post
Share on other sites
On 24/11/2017 at 10:33 PM, Deadlesszombie said:

unfortunately i do not want to publically release that, but simply make a new vItem, add it to the Fn_UseItem and make it spawn a function that sets the player health to 100 for a very basic version

Ok thanks

Share this post


Link to post
Share on other sites
On 2/17/2019 at 12:18 AM, Powsa said:

So im getting the issue that where civs use the morphine it says you dont have any morphine? pls send help

Pastebin a client RPT from when you tried it as well as your morphine script and "fn_useItem.sqf".

Share this post


Link to post
Share on other sites
28 minutes ago, imthatguyhere said:

Pastebin a client RPT from when you tried it as well as your morphine script and "fn_useItem.sqf".

I have fixed this issue thanks anyway :D

Share this post


Link to post
Share on other sites
On 3/15/2019 at 8:49 PM, scanbugra said:

i used the script but when i use the bandage and morphine it is not efecthing anything.Im in V5 script

What happens when you use the item? Does nothing happen? Does the item get removed?

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