[IMG]http://i.imgur.com/c0VRh2i.png[/IMG]
Hello there, fellow Facepunchers and GMOD users, as we share a passion for Garry's Mod: I will name you 'friend'.
I would like to remind you that I'm releasing these for the simple reason my community has been disbanded. My server is offline, and I no longer have any affiliation with a DarkRP set-up. Therefore I'd like to share these with you, so others may have some fun with it. Who doesn't like some free unique content on their gamemode?!
There is a [B]catch[/B] in this story, because I am no longer actively developing these entities. I cannot offer you any support. If you reply describing a issue in a well-constructed and clear way, with the error messages included: I will try and find a solution. It may take time or I may not reply at all.
Naturally, positive or negative feedback even is appreciated.
[IMG]http://i.imgur.com/XDqNQ49.png[/align][/IMG]
[B]Information
[/B]
This is James Thornwood. James has a problem. I won't say it out loud.. but.. *whispers*he is a crack addict*whispers*. He sleeps on the curfew. Gets batted away from people their lawn various times a day. Whenever someone attempts to talk to him, he desperately begs them for a bit of crack.
[B]Technical functions[/B]
? Unique NPC dialog.
[URL="http://i.imgur.com/g0poNrA.jpg"]View the startscreen here.[/URL]
[U]Obtains playername, playermodel and job for a sense of realism.[/U]
? Dynamic & job dependent.
[U]For RP reasons I've coded all dynamics to be dependent on the player his job. For example, a police officer, will not be able to interact with him. The only dialog choice for him is saying "Don't make me arrest you!" and make you leave. Drug dealers however get a chance to sell drugs for a higher price (if you have this job in your DarkRP). This goes for every single job in standard DarkRP and has it's own dialog/conversations/options.[/U]
? Game of chance.
[U]Based on chance, the player approaching the crackhead NPC with the intent of selling him fake drugs, either earns an above average amount of money [B]OR[/B] gets stabbed. For the precise chances you want to scope into the code. In general you have a 25% of selling fake drugs with a 20% of a critical sale giving you a lot of money. If gone wrong, 50% chance you get stabbed and 50% chance the stab misses. If the stab hits the player, it is subdivided in 4 classes. 0-25 damage, 25-50 damage, 50-75 damage and 75-100 damage. Each classed with their own dialogs.
[/U]? 5 minute rule.
[U]You may only use this NPC once in 5 minutes. If done within, it will show a button 'Crackhead is still high (5:00)' instead of the ordinary dialog.[/U]
[B]Role-play functions[/B]
? Attempt to sell fake drugs.
[U]A player of which his job is in a criminal class is attempting to sell the crackhead some fake cocaine and such. Might go well, might go wrong. Read above for details.[/U]
? Sell drugs.
[U]Drug dealer only - Sells drugs to the crackhead without the risk of getting stabbed. Also earns slightly more per dose than the fake drugs.[/U]
[URL="http://steamcommunity.com/sharedfiles/filedetails/?id=177361664"][IMG]http://i.imgur.com/S73y98Y.png[/IMG][/URL]
WORKSHOP URL
This NPC has brought great fun to the server. Players regularly visit the NPC and sell some dope just for thrills. Not to mention the 'wtf'-moments after getting stabbed. Please do not remove my name from the code; however I do state allowance for you to edit, upgrade or downgrade the code where needed. Please do not sell it. Ent:KINGS is releasing this on a non-commercial license.
[B]WARNING[/B] - Recent testing has shown that sometimes the timer gets stuck at -300 and stops returning to normal dialog. I seem to have fixed this. But it might play up again. If so, please request your own coders or yourself to look into this. As the main introduction reads.
Read the documentation but don't know how to spawn this entity? Read my full guide on spawning and adding it to the F4 menu:
[URL="http://facepunch.com/showthread.php?t=1271260"]Click to read guide![/URL]
>> FIXED N WORKSHOPPED <<
[B]Are you fucking serious?[/B]
[QUOTE=TheSourceSpy;40677144][B]Are you fucking serious?[/B][/QUOTE]
What's wrong? Haha.
Do not use any of this he is a scammer who took $300 from the main owner
[url]www.sdgaming.org[/url]
[QUOTE='[CC]Curtis;40677372']Do not use any of this, He is a scammer who stole $300 from the main owner
Look here [url]www.sdgaming.org[/url][/QUOTE]
I have never scammed anyone. I am not going to go back into a big community history to settle my name. As it's as simple as all the legals of the community being on my name, giving me full right to all its dependencies.
On a second note: these were all programmed to me and I have the right to re-claim these for my own use. The second owner whom I ran this community with has had no input in the codes released on this board, by this account.
I don't see the relevance. But I will be reporting you to Facepunch.
[QUOTE=St3fz0rtj3;40677422]I am not going to go back into a big community history to settle my name. [/QUOTE]
As soon as you mention it, you probably will end up getting involved in some massive shit storm requiring you to actually explain all anyway... That is the Facepunch way.
They are all very nice releases so I don't see what is wrong with it. Although a megathread would be cool.
I get an error,
After talking and selling him drugs, i get the 5 minutes timer.
and if i click on this timer, i get this :
[CODE][ERROR] gamemodes/darkrp/entities/entities/crackhead/cl_init.lua:66: Tried to use invalid object (type Panel) (Object was NULL or not of the right type)
1. SetText - [C]:-1
2. unknown - gamemodes/darkrp/entities/entities/crackhead/cl_init.lua:66
Timer Failed! [await][@gamemodes/darkrp/entities/entities/crackhead/cl_init.lua (line 61)][/CODE]
The lines :
[CODE]if gebruiken == 1 then
timer.Create("await", 1, 300, function() timen = timen -1 if timen == 0 or timen < 0 then
timer.Stop("await")
gebruiken = 0
DFrame2:Close() DFrame2:Remove()
timen = 10
end DButtonwo2:SetText("Too high, try again in: "..sec2Min(timen)) end) ------ THE LINE 66 [/CODE]
The code is a mess.
Also, when we are supposed to lose(life) or win(money) it does nothing.
here is the command which is supposed to modify life or monney ; RunConsoleCommand("darkrp_c_h_g_p", amount)
What is "darkrp_c_h_g_p" ?
[QUOTE=dr.dray_7;40681070][IMG]http://i41.tinypic.com/2ut6e8k.png[/IMG]
Got enough threads yet?[/QUOTE]
Just because I posted them within the same amount of time? They will obviously scatted over time based on popularity. You would know this if you actually contributed something to the FP community yourself. Use your common sense.
[editline]18th May 2013[/editline]
[QUOTE=koz;40681381]The code is a mess.[/QUOTE]
Get a paid coder to sort it out for you then. It's a freebie, what did you expect? It works. Nothing else.
[editline]18th May 2013[/editline]
[QUOTE=AlwaysBanned;40681203]I get an error,
After talking and selling him drugs, i get the 5 minutes timer.
[/QUOTE]
[CODE]if gebruiken == 1 then
timer.Create("await", 1, 300, function() timen = timen -1 if timen == 0 or timen < 0 then
timer.Stop("await")
gebruiken = 0
DFrame2:Close() DFrame2:Remove()
timen = 10
end DButtonwo2:SetText("Too high, try again in: "..sec2Min(timen)) end) ------ THE LINE 66[/CODE]
[CODE]if gebruiken == 1 then
timer.Create("await", 1, 300, function() timen = timen -1 if timen == 0 or timen < 0 then
timer.Stop("await")
gebruiken = 0
DFrame2:Close() DFrame2:Remove()
timen = 10
end DButtonwo2:SetText("Too high, try again in: "..sec2Min(timen)) end) ------ THE LINE 66[/CODE]
Replace it with this:
[CODE]if gebruiken == 1 then
timer.Create("await", 1, 300, function() timen = timen -1 if timen == 0 or timen < 0 then
timer.Stop("await")
gebruiken = 0
DFrame2:Close() DFrame2:Remove()
timen = 10
end)
DButtonwo2:SetText("Crackhead is high. Try again in: "..sec2Min(timen)) end[/CODE]
And move it bellow this part:
[CODE]local reso
DFrame2 = vgui.Create('DFrame')
DFrame2:SetSize(280, 314)
DFrame2:Center()
DFrame2:SetTitle('Encounter: Desperate Crackhead')
DFrame2:SetSizable(true)
DFrame2:SetDeleteOnClose(false)
DFrame2:MakePopup()
DFrame2:SetSkin("DarkRP")[/CODE]
[QUOTE=St3fz0rtj3;40689932]You would know this if you actually contributed something to the FP community yourself[editline]18th May 2013[/editline][/QUOTE]
You're right. I'm no where near the caliber of coder you are. Hell, you've been part of facepunch for a month and have released more poorly coded addons than I ever could. I'll be sure to learn my place next time.
[QUOTE=dr.dray_7;40690355]You're right. I'm no where near the caliber of coder you are. Hell, you've been part of facepunch for a month and have released more poorly coded addons than I ever could. I'll be sure to learn my place next time.[/QUOTE]
Something is always better than nothing in my books. I've never acclaimed myself to be a great caliber coder neither have I said my addons are great. There is a reason my descriptions say no support and released purely for those whom know how to use them.
It's in one of the first paragraphs of my posts, unless you don't know how to read English, you should have closed it there.
Why not make 1 thread called ent:KINGS DarkRP Specials with all the stuff instead of packing it into like 4 different bloody threads? Wanting some post count are we?
[QUOTE=UniqueGuy;40691276]Why not make 1 thread called ent:KINGS DarkRP Specials with all the stuff instead of packing it into like 4 different bloody threads? Wanting some post count are we?[/QUOTE]
First of all, didn't really intend to release this many. I was planning to stick by the originals and not code any others. Second of all, Facepunch has set-up such a brilliant and feature incompetent board that I cannot merge threads in a later stage. Third of all, don't you have more useful things to do than to browse the board in hunt for new forum members whom have commited a (harmless, extremely mild) mistake. Last time I checked, you weren't part of the moderation team. And despite your hunks and dunks for the status of a staff-member which is obviously not granted nor received; please take proper use of the report function as it's meant. PM the moderators as a last resort. You can find them on the bottom of the screen.
Apart from that, your message has already been posted few times, once in this particular thread. Which in my book still goes as free posting. Not so perfect yourself, are you?
I'd appreciate you tuning in your ears to this reply and using some common sense. If-not immediately stop posting messages that were already made up by other users.
Thanks.
[QUOTE=UniqueGuy;40691276]Why not make 1 thread called ent:KINGS DarkRP Specials with all the stuff instead of packing it into like 4 different bloody threads? Wanting some post count are we?[/QUOTE]
By replying to him asking wanting some post count your asking for him to take more post count.
[QUOTE=St3fz0rtj3;40689932]Just because I posted them within the same amount of time? They will obviously scatted over time based on popularity. You would know this if you actually contributed something to the FP community yourself. Use your common sense.
[editline]18th May 2013[/editline]
Get a paid coder to sort it out for you then. It's a freebie, what did you expect? It works. Nothing else.
[editline]18th May 2013[/editline]
[CODE]if gebruiken == 1 then
timer.Create("await", 1, 300, function() timen = timen -1 if timen == 0 or timen < 0 then
timer.Stop("await")
gebruiken = 0
DFrame2:Close() DFrame2:Remove()
timen = 10
end DButtonwo2:SetText("Too high, try again in: "..sec2Min(timen)) end) ------ THE LINE 66[/CODE]
[CODE]if gebruiken == 1 then
timer.Create("await", 1, 300, function() timen = timen -1 if timen == 0 or timen < 0 then
timer.Stop("await")
gebruiken = 0
DFrame2:Close() DFrame2:Remove()
timen = 10
end DButtonwo2:SetText("Too high, try again in: "..sec2Min(timen)) end) ------ THE LINE 66[/CODE]
Replace it with this:
[CODE]if gebruiken == 1 then
timer.Create("await", 1, 300, function() timen = timen -1 if timen == 0 or timen < 0 then
timer.Stop("await")
gebruiken = 0
DFrame2:Close() DFrame2:Remove()
timen = 10
end)
DButtonwo2:SetText("Crackhead is high. Try again in: "..sec2Min(timen)) end[/CODE]
And move it bellow this part:
[CODE]local reso
DFrame2 = vgui.Create('DFrame')
DFrame2:SetSize(280, 314)
DFrame2:Center()
DFrame2:SetTitle('Encounter: Desperate Crackhead')
DFrame2:SetSizable(true)
DFrame2:SetDeleteOnClose(false)
DFrame2:MakePopup()
DFrame2:SetSkin("DarkRP")[/CODE][/QUOTE]
I did what you said here.
It Didn't work, i get this error :
[CODE]
[ERROR] gamemodes/darkrp/entities/entities/crackhead/cl_init.lua:80: unexpected symbol near ')'
1. unknown - gamemodes/darkrp/entities/entities/crackhead/cl_init.lua:0
[/CODE]
the lines are :
[CODE]if gebruiken == 1 then
timer.Create("await", 1, 300, function() timen = timen -1 if timen == 0 or timen < 0 then
timer.Stop("await")
gebruiken = 0
DFrame2:Close() DFrame2:Remove()
timen = 10
end) ---- Line 80
DButtonwo2:SetText("Crackhead is high. Try again in: "..sec2Min(timen)) end[/CODE]
I don't know why you people ar tearing this guy a new one for posting some free content that actually does work.
When it doesn't work, it's usually because you did someone wrong. PEBCAC (Problem Exists Between Chair And Computer).
You'll learn more from making it work too so I really have no idea why you all are complaining.
Yea, the content is in different threads. He's also providing support even though he said he wouldn't. Honestly, this is a godsend for all beginner coders out there that are interesting in DarkRP.
@OP - Thanks for the releases and time spent making them.
[QUOTE=multch;40753752]I don't know why you people ar tearing this guy a new one for posting some free content that actually does work.
When it doesn't work, it's usually because you did someone wrong. PEBCAC (Problem Exists Between Char and Computer).
You'll learn more from making it work too so I really have no idea why you all are complaining.
Yea, the content is in different threads. He's also providing support even though he said he wouldn't. Honestly, this is a godsend for all beginner coders out there that are interesting in DarkRP.
@OP - Thanks for the releases and time spent making them.[/QUOTE]I couldn't have said it better myself.
[lua]
local function CHTakeMoney(player, commandName, args)
player:AddMoney(table.GetFirstValue(args))
end
concommand.Add("darkrp_c_h_g_p", CHTakeMoney)
[/lua]
Are you [b]fucking[/b] serious?!
[QUOTE=AlwaysBanned;40753335]I did what you said here.
It Didn't work, i get this error :
[CODE]
[ERROR] gamemodes/darkrp/entities/entities/crackhead/cl_init.lua:80: unexpected symbol near ')'
1. unknown - gamemodes/darkrp/entities/entities/crackhead/cl_init.lua:0
[/CODE]
the lines are :
[CODE]if gebruiken == 1 then
timer.Create("await", 1, 300, function() timen = timen -1 if timen == 0 or timen < 0 then
timer.Stop("await")
gebruiken = 0
DFrame2:Close() DFrame2:Remove()
timen = 10
end) ---- Line 80
DButtonwo2:SetText("Crackhead is high. Try again in: "..sec2Min(timen)) end[/CODE][/QUOTE]
That bracket after 'end' on line 80 probably isn't needed - I could be wrong, but try it out. If not, undo and keep trouble shooting.
[QUOTE=multch;40757800]That bracket after 'end' on line 80 probably isn't needed - I could be wrong, but try it out. If not, undo and keep trouble shooting.[/QUOTE]
it is needed,
[code]
timer.Create("openbracket", 1(times ran), 300(timer to start), function() stuff if stuff == more then timer.Stop("openbracket")
end) < closebracket
[/code]
need that to close the entire timer.
but try this nontheless.
[code]
if gebruiken == 1 then
timer.Create("await", 1, 300, function() timen = timen -1 if timen == 0 or timen < 0 then
timer.Stop("await")
gebruiken = 0
DFrame2:Close()
DFrame2:Remove()
timen = 10
end
end) ---- Line 80
DButtonwo2:SetText("Crackhead is high. Try again in: "..sec2Min(timen)) end
[/code]
(you must END all if statements, if this still doesnt work, add ANOTHER END(above 'end)' ) to end the function(), let me know.)
[QUOTE=Shinycow;40757633][lua]
local function CHTakeMoney(player, commandName, args)
player:AddMoney(table.GetFirstValue(args))
end
concommand.Add("darkrp_c_h_g_p", CHTakeMoney)
[/lua]
Are you [b]fucking[/b] serious?![/QUOTE]
Reminds me of PERP code XDD
The non-mirror download link includes a file in autorun/server called crackhead_functions.lua, which is required for the addon to function. (kinda bad)
[lua]local function CHTakeMoney(player, commandName, args)
player:AddMoney(table.GetFirstValue(args))
end
concommand.Add("darkrp_c_h_g_p", CHTakeMoney)
local function CHTakeH(player, commandName, args)
local health = player:Health() - table.GetFirstValue(args)
if health == 0 or health < 0 then
timer.Create("die", 3, 1, function() player:Kill() end)
end
player:SetHealth(player:Health() - table.GetFirstValue(args))
end
concommand.Add("darkrp_c_h_g_h", CHTakeH)[/lua]
All of this guy's releases have similar functions within :v:
He actually uses them legitimately to be able to take money away clientside in his scripts.. wow.
Appreciated the advice. However was already given by various others. One post is enough. As for the sarcasm: it's a free add-on I used to practice my LUA. If you don't like it or wish to have security leaks fixed, do it yourselves. This is not 'GMODs next lua models'.
I won't stand for this. You made an addon that causes a serious darkrp exploit. When server owners find that players suddenly have loads of money, you will not be the one to get the blame,I'll be.
I told you how to fix it in the other addon, it's not that hard.
Please fix this, it will make everyone happy.
Don't tell people to fix it for you. you're the one responsible for this addon after all. You shouldn't expect other people to solve the problems that you are responsible for.
[QUOTE=St3fz0rtj3;40852268]Appreciated the advice. However was already given by various others. One post is enough. As for the sarcasm: it's a free add-on I used to practice my LUA. If you don't like it or wish to have security leaks fixed, do it yourselves. This is not 'GMODs next lua models'.[/QUOTE]
But this is your addon and your work [apparently] - So do it [b]your[/b]self.
When you make an addon it is your job to maintain it. If you're going to leave the exploits you're better off just removing it from this topic.
[QUOTE=FPtje;40852966]I won't stand for this. You made an addon that causes a serious darkrp exploit. When server owners find that players suddenly have loads of money, you will not be the one to get the blame,I'll be.
I told you how to fix it in the other addon, it's not that hard.
Please fix this, it will make everyone happy.
Don't tell people to fix it for you. you're the one responsible for this addon after all. You shouldn't expect other people to solve the problems that you are responsible for.[/QUOTE]
Not to mention all the people who'll use this code to learn from
Sorry, you need to Log In to post a reply to this thread.