English Killing with weapon name

11 replies
Goto Page
To the start Previous 1 Next To the start
12.04.17 10:17:35 am
Up
Hidder
BANNED
Offline Off
hello guys, today i want to request/ask for script, if player got killed by another player using chainsaw then

player1 chainsaw player2

i don't want it show picture of chainsaw

i want it like that

https://lh3.googleusercontent.com/sGNGMLkq8_JXXikr3ohOigASATA1QK6_zHhVShoaf_stEs6baRpEXa91emdWJEk3PQZPIg=s170

i hope you understood my beacuse i am the best example for RIP english
12.04.17 11:13:22 am
Up
DC
Admin
Offline Off
You don't need scripts for that. It's a simple setting. cs2d cmd deathnoticeimg

In the options menu just disable "Use Images for Death Notices"
IMG:https://snag.gy/IchTPA.jpg



If you still want to do it with scripts however, so everybody on the server sees it with text, you could do some magic with cs2d lua hook hit (prevent normal death using return 1) and cs2d cmd customkill
www.UnrealSoftware.de | www.CS2D.com | www.CarnageContest.com | Use the forum & avoid PMs!
12.04.17 11:26:57 am
Up
Hidder
BANNED
Offline Off
@user DC:

ok thanks

but how to make it if he got killed from chainsaw ? i know how to do customkill but i don't know how to make it especially for chainsaw
12.04.17 11:40:35 am
Up
DC
Admin
Offline Off
As I said: Use the cs2d lua hook hit hook and...

• check if the weapon is the chainsaw
weapon == 85

• check if the player would be killed by that hit
player(id, "health")<=hpdmg

• if both is true:
customkill(source, item(weapon, "name"), id)
and
return 1
to cancel the normal killing

Not tested but this is how it should work.
The part
item(weapon, "name")
just retrieves the name of the chainsaw. You could replace it with
"Chainsaw"
directly or any other string you would like to see.
www.UnrealSoftware.de | www.CS2D.com | www.CarnageContest.com | Use the forum & avoid PMs!
12.04.17 08:20:38 pm
Up
Hidder
BANNED
Offline Off
@user DC:

DC plz understand me, my way to learn is NOT reading
My best way to learn is editing, i really hate reading so much
can you send for me the whole code plz ???
12.04.17 08:31:35 pm
Up
Starkkz
Moderator
Offline Off
@user Hidder: Don't be lazy, he already spent a good time trying to make you understand.

If you really wish to get free code you shall make it yourself. You can see youtube tutorials out there if you want to learn Lua by editing without having to read.
lol
12.04.17 08:34:52 pm
Up
Hidder
BANNED
Offline Off
@user Starkkz:
I learned all thing about scripting from editing ._.
Do you know i didn't even spent 5 min on reading to learn scripts ?
Its not lazy or something, i hate reading at all
12.04.17 09:14:36 pm
Up
Starkkz
Moderator
Offline Off
@user Hidder: then do what I say? Reading is the only possible way we could help you.
lol
12.04.17 09:26:01 pm
Up
Hidder
BANNED
Offline Off
@user Starkkz:
am... you just have to send for me the code, and i will edit it
12.04.17 09:49:44 pm
Up
DC
Admin
Offline Off
I basically gave you the whole code already.
All you still need to do is:
• write it in a function which has the same parameters as the cs2d lua hook hit hook
• make an if condition with an
and
as described in my previous post
• add that function to the cs2d lua hook hit hook via cs2d lua cmd addhook

A little bit trial and error and looking at other scripts (and/or a basic Lua tutorial) and you should be able to do it
It's less than 10 lines.

If you don't manage to do it you didn't understand how Lua / CS2D hooks work. This is not a bad thing but if you want to write scripts you should learn it

So please just try and if you run into problems just ask. We'll then try to help you.
www.UnrealSoftware.de | www.CS2D.com | www.CarnageContest.com | Use the forum & avoid PMs!
12.04.17 09:59:59 pm
Up
TrialAndError
User
Offline Off
user Hidder has written:
I learned all thing about scripting from editing ._.


This is said everywhere and that is the lazy mans saying. The only way to "learn" is actually trying it yourself and experimenting. Sure, editing will help you a bit along the way, but you can't just look at the Empire State Building and say "Hey, now I know how to build a house!".
12.04.17 11:55:34 pm
Up
Hidder
BANNED
Offline Off
ugh! don't worry now i know how 2 do it
i download burn molotov script and i edited it to know how ._.
i don't need help about this script any more :3
and i didn't read anything
To the start Previous 1 Next To the start