How to set a PILL as a DarkRP JOB?

Hello wonderful people of Facepunch, today I am wondering about how to use Parakeet’s Pill Pack, to create jobs!
Example:

Giraffe Job, and when you choose it, you will act as if u have aten the Giraffe pill. Do you know what I am talking about?

Eh, if you do, please help me out.

I don’t know much about this shitty looking little kids’ addon after having skimmed over it’s page for like 20 seconds, but did you seriously just call the HL2 strider a giraffe?

(Oh and btw, don’t come to facepunch for help with this kind of stuff)


(User was banned for this post ("don't be rude/unhelpful" - NiandraLades))

Just stop… If you know nothing about what someone is talking about, just leave it alone. The “Giraffe” is a pill you can take in the addon and it makes your neck really long.

And that’s why there’s a damned Developer Discussion.

well then lol

Since, no one is helping I’ll give you a tip, I haven’t tested this so

The pills entity works by


ply:EmitSound("weapons/bugbait/bugbait_squeeze1.wav")
pk_pills.apply(ply,self:GetPillForm())
self:Remove()

So we should be able to add a pill to a job by adding


PlayerSpawn = pk_pills.apply(ply,self:GetPillForm()) 

That’ll lead you in the direction to get the pills working

The Giraffe Pill


pk_pills.register("giraffe",{
	printName="Giraffe",
	side="harmless",
	type="ply",
	model="models/mossman.mdl",
	default_rp_cost=800,
	camera={
		offset=Vector(0,0,220),
		dist=400
	},
	hull=Vector(50,50,230),
	duckBy=150,
	modelScale=2,
	anims={
	default={
		idle="man_gun",
		walk="walk_holding_package_all",
		run="run_aiming_p_all",
		crouch="coverlow_l",
		crouch_walk="crouchrunall1",
		glide="sit_chair",
		jump="cower"
	}
},
boneMorphs = {
	["ValveBiped.Bip01_Head1"]={pos=Vector(50,25,0),scale=Vector(2,2,2)}
},
moveSpeed={
	walk=300,
	run=900
},
movePoseMode="yaw",
jumpPower=400,
health=600,
})

To remove a pill from a player, run


pk_pills.restore(ply,true)

On PlayerDeath

so you would have


 PlayerDeath = pk_pills.restore(ply,true)

So we are making a giraffe pill job we would have


 self:GetPillForm() == giraffe 

Now we can add to the job


PlayerSpawn = function(ply) pk_pills.apply(ply,giraffe) end,
PlayerDeath = function(ply) pk_pills.restore(ply,true) end,

Creating the final output


TEAM_GIRAFFE = DarkRP.createJob("Giraffe", {
   color = Color(102, 97, 97, 255), -- RGBA
   model = "models/mossman.mdl", -- can select anything (leaving blank will pick last model used)
   description = [[You are a giraffe, you silly little werido.]],
   weapons = {  }, -- Weapons arent really used by pills anyway
   command = "Giraffe",
   max = 5,
   salary = GAMEMODE.Config.normalsalary,
   admin = 0,
   vote = false,
   hasLicense = false,
   PlayerSpawn = function(ply) pk_pills.apply(ply,giraffe,1) end, -- adding  1 makes the pill last until death
   PlayerDeath = function(ply) pk_pills.restore(ply,true) end, -- just making sure the pill is removed.
   candemote = false,
   category = "Weridos",
	})

:godzing:

This is mostly correct, but you’re going to want to put “giraffe” in quotes (Like it is in this sentence).

wow ill try thanks

Don’t forget @MadParakeet’s comment afterwards. Just to reduce chances of error. :ohno:
EDIT: I think he already did, I didn’t notice my bad.