Raised This Month: $51 Target: $400
 12% 

[REQ] Very Simple Plugin (I think) - Human Knife Zombie


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
WhightKnight
Senior Member
Join Date: Jun 2008
Old 03-13-2009 , 23:20   [REQ] Very Simple Plugin (I think) - Human Knife Zombie
Reply With Quote #1

If human knifes a zombie, the zombie dies.
That is all, shouldn't be too hard to script up?

Thanks,
WK
__________________
WhightKnight is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 03-14-2009 , 09:07   Re: [REQ] Very Simple Plugin (I think) - Human Knife Zombie
Reply With Quote #2

Better code later...

Last edited by SnoW; 03-15-2009 at 06:32.
SnoW is offline
Send a message via MSN to SnoW
WhightKnight
Senior Member
Join Date: Jun 2008
Old 03-14-2009 , 10:47   Re: [REQ] Very Simple Plugin (I think) - Human Knife Zombie
Reply With Quote #3

Based off of reading the code, it only supports slash? not stab? can we include stab please =D?

EDIT: Copied + pasted plugin into notepad, saved as "humanknifezombie.sma", compiled (no errors) added to server + plugins.ini, changed map, knife zombie (stab and slash), and nothing happened.
__________________

Last edited by WhightKnight; 03-14-2009 at 10:59.
WhightKnight is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 03-14-2009 , 10:58   Re: [REQ] Very Simple Plugin (I think) - Human Knife Zombie
Reply With Quote #4

Quote:
Originally Posted by WhightKnight View Post
Based off of reading the code, it only supports slash? not stab? can we include stab please =D?
It supported both, but wasn't sure about the define, so what a hey, I did it with other way. Also added your PM request, so there's EXTRA_PACKS define now you can change. Above code updated.
SnoW is offline
Send a message via MSN to SnoW
WhightKnight
Senior Member
Join Date: Jun 2008
Old 03-14-2009 , 11:02   Re: [REQ] Very Simple Plugin (I think) - Human Knife Zombie
Reply With Quote #5

I will retest plugin with the update, but before update it didn't work so well =/.

Also does Extra_Packs = how many total packs, or does it literally mean, regular packs for killing zombie + extra packs?

Doesn't the plugin have to have something like this:
Code:
	register_plugin("HKZ", "1.0", "Snow");
(hkz = human knife zombie)
__________________
WhightKnight is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 03-14-2009 , 16:44   Re: [REQ] Very Simple Plugin (I think) - Human Knife Zombie
Reply With Quote #6

Quote:
Originally Posted by WhightKnight View Post
I will retest plugin with the update, but before update it didn't work so well =/.
Well, I think it doesn't matter cause of the update?
Quote:
Originally Posted by WhightKnight View Post
Also does Extra_Packs = how many total packs, or does it literally mean, regular packs for killing zombie + extra packs?
Ah, bad name. Ye, it's the total packs what are get from the kill, so normal packs aren't given.
Quote:
Originally Posted by WhightKnight View Post
Doesn't the plugin have to have something like this:
Code:
    register_plugin("HKZ", "1.0", "Snow");
(hkz = human knife zombie)
No, it doesn't. But you can add it if you want. If you add it, put the "w" with "W".
SnoW is offline
Send a message via MSN to SnoW
WhightKnight
Senior Member
Join Date: Jun 2008
Old 03-14-2009 , 16:53   Re: [REQ] Very Simple Plugin (I think) - Human Knife Zombie
Reply With Quote #7

k ill test it again.

if I add
register_plugin("HKZ", "1.0", "SnoW"); do I just throw that line in anywhere in the script? or what?

EDIT: Know issues -
-zombie knifes human, human dies instead of becomes infected
-update, knifing main/first zombie doesn't kill it
-suposidly EXTRA_AP doesn't work.
-add define/cvar to check what to look for (slashs only, stabs only, or slashs and stabs)
-choose what modes to enable plugin (nemesis mode? survivor mode? plague mode?)
-Add X% chance of actually being autokilled....After testing it is easier than I thought to knife a zombie.
-Sorry for being so picky!

Thanks
WK
__________________

Last edited by WhightKnight; 03-14-2009 at 21:01.
WhightKnight is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 03-15-2009 , 06:32   Re: [REQ] Very Simple Plugin (I think) - Human Knife Zombie
Reply With Quote #8

Description is in the beginning of the sma.
Attached Files
File Type: sma Get Plugin or Get Source (zp_instant_knife_kills.sma - 845 views - 2.1 KB)

Last edited by SnoW; 03-15-2009 at 07:09.
SnoW is offline
Send a message via MSN to SnoW
IneedHelp
Veteran Member
Join Date: Mar 2007
Location: Argentina
Old 03-15-2009 , 07:00   Re: [REQ] Very Simple Plugin (I think) - Human Knife Zombie
Reply With Quote #9

PHP Code:
     c_chance register_cvar("zp_instant_knife_type""1");
    
c_type register_cvar("zp_instant_knife_chance" ,"30"); 
Shouldn't be upside down?
__________________
IneedHelp is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 03-15-2009 , 07:07   Re: [REQ] Very Simple Plugin (I think) - Human Knife Zombie
Reply With Quote #10

Thanks, IneedHelp. Code updated.
SnoW is offline
Send a message via MSN to SnoW
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:11.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode