Skip to main content

Smoking

The only script you'll need for smoking

Info

Trailer
Showcase
BUY HERE

General benefits and script support

Dependencies & Installation

  • Put the script in the server and add ensure "script_name" to server.cfg
  • enjoy...

Config demo

Open Config
config.lua

Config = {}

Config.Debug = false -- Debug print

Config.Framework = '' -- RSG / VORP / REDEMRP_reboot / Custom /

Config.effectTimecycle = true
-- if the effect "flickers" or otherwise fragments, in combination with other effects, select "false"
-- or I recommend to redirect all effects in your other scripts to mine see open_server.lua

Config.Walkstyle = true -- if it has with the intensity of the effect even varied "Drunk" style of walking

Config.item = {
['indian_pipe'] = { -- the name of the item
type = 'cigar', -- type of animation see below
prop = 'p_peacepipe01x', -- prop
effect = 20, -- what percentage of the "stoned" effect it adds per swipe (if you want to turn it off, set to false or 0)
effectStyle = 'red', -- effect name (Settings below)
maxPuff = 20, -- maximum number of covers
refill = true, -- whether the item can be supplemented via tobacco or other
randomRag = 5, -- chance of "Rag Effect" in percentage (if you want to turn it off, set to false or 0)
male = {
startPropCoords = {-0.09,-0.29,0.09,-45.0,-200.0,-45.0}, -- placement of the release in the given phases
basePropCoords = {0.0,-0.19,0.26,-90.0,85.0,0.0},
mouthPropCoords = false, -- if you want the player to not be able to "put" the item in his mouth and only change his stance, set to "false"
},
female = {
startPropCoords = {-0.24, -0.17, 0.17, 170.0, -5.0, -155.0},
basePropCoords = {-0.01, -0.21, 0.27, -75.0, 95.0, 0.0},
mouthPropCoords = false,
}
},
['indian_pipe_2'] = {
type = 'pipe_long',
prop = 'p_peacepipe02x',
effect = 20,
effectStyle = 'red',
maxPuff = 20,
refill = true,
randomRag = 10,
male = {
startPropCoords = {-0.09,-0.29,0.09,-45.0,-200.0,-45.0},
basePropCoords = {0.0,-0.19,0.26,-90.0,85.0,0.0},
mouthPropCoords = false,
},
female = {
startPropCoords = {-0.24, -0.17, 0.17, 170.0, -5.0, -155.0},
basePropCoords = {-0.01, -0.21, 0.27, -75.0, 95.0, 0.0},
mouthPropCoords = false,
}
},
['cigar'] = {
type = 'cigar',
prop = 'p_cigar02x',
effect = false,
effectStyle = false,
maxPuff = 10,
refill = false,
randomRag = false,
male = {
startPropCoords = false,
basePropCoords = {0.115, -0.02, -0.05, 180.0, 0.0, 0.0},
mouthPropCoords = {-0.020,0.15,-0.04,-15.0,0.0,5.0},
},
female = {
startPropCoords = false,
basePropCoords = {0.115, -0.02, -0.05, 180.0, 0.0, 0.0},
mouthPropCoords = {-0.020,0.15,-0.04,-15.0,0.0,5.0},
},
},
['pipe'] = {
type = 'pipe',
prop = 'p_pipe01x',
effect = 20,
effectStyle = 'red',
maxPuff = 20,
refill = true,
randomRag = false,
male = {
startPropCoords = {0.105,0.05, -0.05, 120.0,-40.0, 130.0},
basePropCoords = {0.105,0.05, -0.05, 120.0,-40.0, 130.0},
mouthPropCoords = {-0.07,0.21,-0.02,-60.0,10.0,-80.0},
},
female = {
startPropCoords = {0.105,0.05, -0.05, 120.0,-40.0, 130.0},
basePropCoords = {0.105,0.05, -0.05, 120.0,-40.0, 130.0},
mouthPropCoords = {-0.07,0.21,-0.02,-60.0,10.0,-80.0},
},
},
['pipe_2'] = {
type = 'pipe',
prop = 'p_pipe03x',
effect = 20,
effectStyle = 'red',
maxPuff = 20,
refill = true,
randomRag = false,
male = {
startPropCoords = {0.09,0.05,-0.04,-35.0,30.0,-20.0},
basePropCoords = {0.09,0.05,-0.04,-35.0,30.0,-20.0},
mouthPropCoords = {-0.04,0.2,-0.03,-180.0,-85.0,10.0},
},
female = {
startPropCoords = {0.09,0.06,-0.01,-95.0,0.0,-60.0},
basePropCoords = {0.09,0.06,-0.01,-95.0,0.0,-60.0},
mouthPropCoords = {-0.04,0.2,-0.03,-180.0,-85.0,10.0},
},
},
['pipe_3'] = {
type = 'pipe_long',
prop = 'p_opiumpipe01x',
effect = 20,
effectStyle = 'red',
maxPuff = 20,
refill = true,
randomRag = false,
male = {
startPropCoords = {0.01,-0.03,0.08,-85.0,-5.0,10.0},
basePropCoords = {0.01,-0.03,0.08,-85.0,-5.0,10.0},
mouthPropCoords = false,
},
female = {
startPropCoords = {0.01,-0.01,0.05,-85.0,-5.0,10.0},
basePropCoords = {0.01,-0.01,0.05,-85.0,-5.0,10.0},
mouthPropCoords = false,
},
},
['cigarette'] = {
type = 'cigarette',
prop = 'p_cigarette_cs01x',
effect = 0,
effectStyle = false,
maxPuff = 20,
refill = false,
randomRag = false,
male = {
startPropCoords = false,
basePropCoords = {0.02, -0.01, 0.0, 5.0, -275.0, 10.0},
mouthPropCoords = {-0.011,0.13,-0.005,0.0,0.0,90.0},
},
female = {
startPropCoords = false,
basePropCoords = {0.01, 0.01, 0.01, -20.0, 55.0, -65.0},
mouthPropCoords = {-0.011, 0.13, -0.005, 0.0, 0.0, 90.0},
},
},
['cigarette_indigo'] = {
type = 'cigarette',
prop = 'p_cigarette_cs02x',
effect = 10,
effectStyle = 'blue',
maxPuff = 20,
refill = false,
randomRag = false,
male = {
startPropCoords = false,
basePropCoords = {0.02, -0.01, 0.0, 5.0, -275.0, 10.0},
mouthPropCoords = {-0.011,0.13,-0.005,0.0,0.0,90.0},
},
female = {
startPropCoords = false,
basePropCoords = {0.01, 0.01, 0.01, -20.0, 55.0, -65.0},
mouthPropCoords = {-0.011, 0.13, -0.005, 0.0, 0.0, 90.0},
},
},
['cigarette_holder'] = {
type = 'cigarette_holder',
prop = 'p_cigaretteholder01x',
effect = 0,
effectStyle = false,
maxPuff = 20,
refill = false,
randomRag = false,
male = {
startPropCoords = {-0.01,-0.01,0.08,0.0,85.0,0.0},
basePropCoords = {-0.01,-0.01,0.08,0.0,85.0,0.0},
mouthPropCoords = {-0.02,0.22,-0.03,-70.0,-75.0,-80.0},
},
female = {
startPropCoords = {-0.01,0.11,0.04,-10.0,40.0,-70.0},
basePropCoords = {-0.01,0.11,0.04,-10.0,40.0,-70.0},
mouthPropCoords = {-0.02,0.22,-0.03,-70.0,-75.0,-80.0},
}
},
}


Config.box = {
['pack_cigarette_indigo'] = { -- the name of the item
giveItemName = 'cigarette_indigo', -- item that the box will give
amount = 10, -- number
prop = 'p_cigarettebox01x', -- prop
},
['pack_cigarette'] = {
giveItemName = 'cigarette',
amount = 20,
prop = 'p_cigarettecheapbox01x',
},
}

Config.refill = {
['pack_tobacco'] = { -- item for replenishment
prop = 's_inv_tabaccopotent01x', -- prop
interactions = true, -- whether you want to allow the possibility of putting tobacco in your mouth
effectAllow = false, -- whether this item will enable the effect you set for specific items
effectStyle = 'red',
propCoords = {0.12,0.03,0.035,200.0,140.0,60.0}, -- positioning in the hand
},
['tobacco'] = {
prop = 's_inv_indtobacco01cx',
interactions = false,
effectAllow = false,
effectStyle = 'red',
propCoords = {0.07, 0.01, 0.06, 85.0, -10.0, 130.0},
},
['indigo'] = {
prop = 's_inv_indtobacco01bx',
interactions = false,
effectAllow = true,
effectStyle = false,
propCoords = {0.11,0.09,0.03,15.0,-45.0,0.0},
},
-- ['indigo'] = {
-- prop = 's_inv_indtobacco01bx',
-- interactions = false,
-- effectAllow = true,
-- effectStyle = 'grey', -- if the effect is defined here, the effect of the refill item will be used, not the effect of the pipe item. (must be effectAllow = true)
-- propCoords = {0.11,0.09,0.03,15.0,-45.0,0.0},
-- },
}

Config.Prompts = { -- controlling
puff = 0xE30CD707,
quit = 0xF3830D8E,
interactions = 0x760A9C6F,
refill = 0xE30CD707,
left = 0xA65EBAB4,
right = 0xDEB34313,
mouth = 0x07CE1E61,
back = 0x760A9C6F,
}

Config.Texts = {
error = 'error',
quit = 'Quit',
start = 'Start smoking',
puff = 'puff',
puffCount = 'puff count: ',
water = "You're wet",
interactions = 'attitude change',
mouth = 'take out of mouth',
inMouth = 'put in mouth',
refill = 'Fill',
left = 'previous',
right = 'next',
back = 'Back',
no = 'none',
active = 'Already doing',
drop = 'It fell out of your mouth',
notifNoPuff = 'Nothing to smoke',
notifReffillDone = "You've fulfilled",
notifReffillFailed = "you have nothing to fill ",
metaPuff = 'Puff: ',
}

Config.effectStyle = { -- effects that then work for the whole script
['red'] = 'PhotoMode_FilterModern01',
['yellow'] = 'PhotoMode_FilterModern02',
['blue'] = 'PhotoMode_FilterModern03',
['green'] = 'PhotoMode_FilterModern04',
['white'] = 'PhotoMode_FilterModern05',
['grey'] = 'PhotoMode_FilterModern06',
}

-- more effects here // https://github.com/femga/rdr3_discoveries/blob/22fa3103a803fb1a70feb61137ae08db3b09c192/graphics/animpostfx/animpostfx.lua

Config.type = {
['pipe_long'] = {
male = {
bone = 'SKEL_R_Finger13', -- the bone from which the coords derive
kitAnim = false, -- whether kid animation or normal animation is used at startup
animStartDict = 'amb_wander@code_human_smoking_wander@male_b@trans',
animStartName = 'nopipe_trans_pipe',
startWait = 4000,
animStandardDict = 'script_mp@emotes@smoke_cigarette@male@unarmed@upper',
animStandardName = 'loop',
animEndDict = 'amb_wander@code_human_smoking_wander@male_b@trans',
animEndName = 'pipe_trans_nopipe',
animPuffDict = 'script_mp@emotes@smoke_cigarette@male@unarmed@upper',
animPuffName = 'action_alt2',
PuffWait = 3000,
switch = {
[1] = {
animSwitchDict = 'amb_rest@world_human_smoking@pipe@proper@male_d@wip_base',
animSwitchName = 'wip_base',
},
[2] = {
animSwitchDict = 'amb_rest@world_human_smoking@nervous_stressed@male_b@idle_b',
animSwitchName = 'idle_f',
},
}
},
female = {
bone = 'SKEL_R_Finger13',
kitAnim = false,
animStartDict = 'amb_wander@code_human_smoking_wander@male_b@trans',
animStartName = 'nopipe_trans_pipe',
startWait = 4000,
animStandardDict = 'script_mp@emotes@smoke_cigarette@male@unarmed@upper',
animStandardName = 'loop',
animEndDict = 'amb_wander@code_human_smoking_wander@male_b@trans',
animEndName = 'pipe_trans_nopipe',
animPuffDict = 'script_mp@emotes@smoke_cigarette@male@unarmed@upper',
animPuffName = 'action_alt2',
PuffWait = 3000,
switch = {
[1] = {
animSwitchDict = 'amb_rest@world_human_smoking@pipe@proper@male_d@wip_base',
animSwitchName = 'wip_base',
},
[2] = {
animSwitchDict = 'amb_rest@world_human_smoking@nervous_stressed@male_b@idle_b',
animSwitchName = 'idle_f',
},
}
}
},
['pipe'] = {
male = {
bone = 'skel_r_hand',
kitAnim = false,
animStartDict = 'amb_wander@code_human_smoking_wander@male_b@trans',
animStartName = 'nopipe_trans_pipe',
startWait = 4000,
animStandardDict = 'amb_rest@world_human_smoking@pipe@proper@male_c@wip_base',
animStandardName = 'wip_base',
animEndDict = 'amb_wander@code_human_smoking_wander@male_b@trans',
animEndName = 'pipe_trans_nopipe',
animPuffDict = 'amb_rest@world_human_smoking@male_b@idle_a',
animPuffName = 'idle_a',
PuffWait = 3000,
switch = {
[1] = {
animSwitchDict = 'amb_rest@world_human_smoking@pipe@proper@male_d@wip_base',
animSwitchName = 'wip_base',
},
[2] = {
animSwitchDict = 'amb_rest@world_human_smoking@nervous_stressed@male_b@idle_b',
animSwitchName = 'idle_f',
},
[3] = {
animSwitchDict = false,
animSwitchName = false,
}
}
},
female = {
bone = 'skel_r_hand',
kitAnim = false,
animStartDict = 'amb_wander@code_human_smoking_wander@male_b@trans',
animStartName = 'nopipe_trans_pipe',
startWait = 4000,
animStandardDict = 'amb_rest@world_human_smoking@pipe@proper@male_c@wip_base',
animStandardName = 'wip_base',
animEndDict = 'amb_wander@code_human_smoking_wander@male_b@trans',
animEndName = 'pipe_trans_nopipe',
animPuffDict = 'amb_rest@world_human_smoking@male_b@idle_a',
animPuffName = 'idle_a',
PuffWait = 3000,
switch = {
[1] = {
animSwitchDict = 'amb_rest@world_human_smoking@pipe@proper@male_d@wip_base',
animSwitchName = 'wip_base',
},
[2] = {
animSwitchDict = 'amb_rest@world_human_smoking@nervous_stressed@male_b@idle_b',
animSwitchName = 'idle_f',
},
[3] = {
animSwitchDict = false,
animSwitchName = false,
}
}
}
},
['cigar'] = {
male = {
bone = 'skel_r_hand',
kitAnim = 'KIT_EMOTE_ACTION_SMOKE_CIGAR_1',
animStartDict = '',
animStartName = '',
startWait = 6500,
animStandardDict = 'script_mp@emotes@smoke_cigar@male@unarmed@upper',
animStandardName = 'loop',
animEndDict = 'script_mp@emotes@smoke_cigarette@male@unarmed@upper',
animEndName = 'outro',
animPuffDict = 'script_mp@emotes@smoke_cigar@male@unarmed@upper',
animPuffName = 'action_alt2',
PuffWait = 3000,
switch = {
[1] = {
animSwitchDict = 'amb_rest@world_human_smoking@pipe@proper@male_d@wip_base',
animSwitchName = 'wip_base',

},
[2] = {
animSwitchDict = 'amb_rest@world_human_smoking@nervous_stressed@male_b@idle_b',
animSwitchName = 'idle_f',
},
[3] = {
animSwitchDict = false,
animSwitchName = false,
}
}
},
female = {
bone = 'skel_r_hand',
kitAnim = 'KIT_EMOTE_ACTION_SMOKE_CIGAR_1',
animStartDict = '',
animStartName = '',
startWait = 6500,
animStandardDict = 'script_mp@emotes@smoke_cigar@female@unarmed@upper',
animStandardName = 'loop',
animEndDict = 'script_mp@emotes@smoke_cigarette@male@unarmed@upper',
animEndName = 'outro',
animPuffDict = 'script_mp@emotes@smoke_cigar@female@unarmed@upper',
animPuffName = 'action_alt2',
PuffWait = 3000,
switch = {
[1] = {
animSwitchDict = 'amb_rest@world_human_smoking@pipe@proper@male_d@wip_base',
animSwitchName = 'wip_base',

},
[2] = {
animSwitchDict = 'amb_rest@world_human_smoking@nervous_stressed@male_b@idle_b',
animSwitchName = 'idle_f',
},
[3] = {
animSwitchDict = false,
animSwitchName = false,
}
}
}
},
['cigarette'] = {
male = {
bone = 'SKEL_R_Finger13',
kitAnim = 'KIT_EMOTE_ACTION_SMOKE_CIGARETTE_1',
animStartDict = '',
animStartName = '',
startWait = 4000,
animStandardDict = 'script_mp@emotes@smoke_cigarette@male@unarmed@upper',
animStandardName = 'loop',
animEndDict = 'script_mp@emotes@smoke_cigarette@male@unarmed@upper',
animEndName = 'outro',
animPuffDict = 'script_mp@emotes@smoke_cigarette@male@unarmed@upper',
animPuffName = 'action_alt2',
PuffWait = 3000,
switch = {
[1] = {
animSwitchDict = 'amb_rest@world_human_smoking@pipe@proper@male_d@wip_base',
animSwitchName = 'wip_base',
},
[2] = {
animSwitchDict = 'amb_rest@world_human_smoking@nervous_stressed@male_b@idle_b',
animSwitchName = 'idle_f',
},
[3] = {
animSwitchDict = false,
animSwitchName = false,
}
}
},
female = {
bone = 'SKEL_R_Finger13',
kitAnim = 'KIT_EMOTE_ACTION_SMOKE_CIGARETTE_1',
animStartDict = '',
animStartName = '',
startWait = 4000,
animStandardDict = 'amb_rest@world_human_smoking@female_b@idle_a',
animStandardName = 'idle_a',
animEndDict = 'amb_rest@world_human_smoking@female_b@trans',
animEndName = 'b_trans_fire_standing_b',
animPuffDict = 'amb_rest@world_human_smoking@female_b@idle_a',
animPuffName = 'idle_b',
PuffWait = 3000,
switch = {
[1] = {
animSwitchDict = 'amb_rest@world_human_smoking@pipe@proper@male_d@wip_base',
animSwitchName = 'wip_base',
},
[2] = {
animSwitchDict = 'amb_rest@world_human_smoking@nervous_stressed@male_b@idle_b',
animSwitchName = 'idle_f',
},
[3] = {
animSwitchDict = false,
animSwitchName = false,
}
}
}
},

['cigarette_holder'] = {
male = {
bone = 'SKEL_R_Finger13',
kitAnim = false,
animStartDict = 'script_mp@emotes@smoke_cigarette@male@unarmed@upper',
animStartName = 'intro',
startWait = 4000,
animStandardDict = 'script_mp@emotes@smoke_cigarette@male@unarmed@upper',
animStandardName = 'loop',
animEndDict = 'script_mp@emotes@smoke_cigarette@male@unarmed@upper',
animEndName = 'outro',
animPuffDict = 'script_mp@emotes@smoke_cigarette@male@unarmed@upper',
animPuffName = 'action_alt2',
PuffWait = 3000,
switch = {
[1] = {
animSwitchDict = 'amb_rest@world_human_smoking@pipe@proper@male_d@wip_base',
animSwitchName = 'wip_base',
},
[2] = {
animSwitchDict = 'amb_rest@world_human_smoking@nervous_stressed@male_b@idle_b',
animSwitchName = 'idle_f',
},
[3] = {
animSwitchDict = false,
animSwitchName = false,
}
}
},
female = {
bone = 'SKEL_R_Finger13',
kitAnim = false,
animStartDict = 'amb_wander@code_human_smoking_wander@male_b@trans',
animStartName = 'nopipe_trans_pipe',
startWait = 4000,
animStandardDict = 'amb_rest@world_human_smoking@female_b@idle_a',
animStandardName = 'idle_a',
animEndDict = 'amb_rest@world_human_smoking@female_b@trans',
animEndName = 'b_trans_fire_standing_b',
animPuffDict = 'amb_rest@world_human_smoking@female_b@idle_a',
animPuffName = 'idle_b',
PuffWait = 3000,
switch = {
[1] = {
animSwitchDict = 'amb_rest@world_human_smoking@pipe@proper@male_d@wip_base',
animSwitchName = 'wip_base',
},
[2] = {
animSwitchDict = 'amb_rest@world_human_smoking@nervous_stressed@male_b@idle_b',
animSwitchName = 'idle_f',
},
[3] = {
animSwitchDict = false,
animSwitchName = false,
}
}
}
}
}





Effect system

our script supports combining the effect from your other scripts by adding the effect to our script. it's a simpler and better solution for you, it's not all required.

Solving the compatibility problem

If you decide not to use our effects in your scripts, we recommend to turn this setting in config to false for better compatibility and to eliminate the problem.

config.lua
Config.effectTimecycle = true

Add effect

From Server

TriggerClientEvent('d-labs:client:addEffect', src, 10, 'blue', false)

From Client

TriggerEvent('d-labs:client:addEffect', 10, 'blue', false)

Parameters

  1. src
    You send the source of fines from the server.

  2. number
    Number indicating how much effect you want to add (in percentage / 1 to 100).

  3. name
    The name of the effect specified in the smoke script config file.

  4. ragOption

    • false - If you want to disable the "rag" option with the effect.
    • Number from 1 to 100 - Determines the chance of "rag".

Add Metabolism/Stress system

script allows connection to other stress or metabolic systems.

open_client.lua
function metabolismAdd(effect,itemName,leftPuff)  
if leftPuff < 1 then -- if you want the effect to be applied after the last puff of the cigarette
-- this is yours metabolis system
end
end

Changelog

No information to display.