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

Knife DeathMatch


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay       
Nyuszy
Senior Member
Join Date: Apr 2009
Old 04-07-2010 , 17:19   Knife DeathMatch
Reply With Quote #1

Knife DeathMatch
v1.2

. : Description : .

This is a simple plugin that allow you to use only knife during play and when you will dead, it respawns you.


. : Cvars : .
amx_knifedm 1 | 0
turn on/off the plugin

amx_knifedm_hp
give X hp after every kill

amx_knifedm_hp_hs
give X hp after every headshot

amx_knifedm_gamename 1 | 0
turn on/off game description change (Knife DM)

. : Modules : .
Fun
Cstrike
Ham Sandwich
Engine
Fakemeta

. : Thanks : .

Thanks to k1ngston for the idea and the server to test the plugin.
Thanks to SilverTide for the knife-only code.
Thanks to NeuroToxin for Game Name Changer code.


. : ChangeLog : .
Code:
Version 1.1
- Replaced cs_user_spawn(id) with ExecuteHamB(Ham_CS_RoundRespawn, id)
- Added code to remove: bombtarget, hostage, vip
- Added Game Description changer

Version 1.2
- Removed all weapons from ground
If you have bugs with this plugin, please report me.


Oh, and sorry for my bad english...
Attached Files
File Type: sma Get Plugin or Get Source (knifedm.sma - 2274 views - 3.2 KB)

Last edited by Nyuszy; 04-10-2010 at 18:38. Reason: v1.2
Nyuszy is offline
fezh
Veteran Member
Join Date: Dec 2008
Location: BANNED
Old 04-07-2010 , 17:20   Re: Knife DeathMatch
Reply With Quote #2

You know you can't upload *.amxx files. It's a rule.
__________________
"There is no knowledge, that is not power"
fezh is offline
k1ngston
Junior Member
Join Date: Mar 2010
Old 04-07-2010 , 17:21   Re: Knife DeathMatch
Reply With Quote #3

Nice job
k1ngston is offline
kanatzu
Veteran Member
Join Date: Oct 2007
Location: Sweden
Old 04-07-2010 , 18:51   Re: Knife DeathMatch
Reply With Quote #4

This is very basic.


I give it 1/5 's


Edit: Might your nickname also be "Lucky"?
__________________




Quote:
Originally Posted by wrecked_ View Post
Stop saying words before I sodomize you with a cucumber.
kanatzu is offline
Send a message via MSN to kanatzu
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 04-07-2010 , 19:03   Re: Knife DeathMatch
Reply With Quote #5

Inefficiencies & problems:
  • Indent properly, it's pretty disgusting.
  • In knife(), you don't need two variables for the origin. You can use
    PHP Code:
    new origin[3]
    get_user_originidorigin )
    origin[2] -= 500
    set_user_origin
    idorigin )

    // weapon shit

    origin[2] += 500
    set_user_origin
    idorigin )

    // stuff 
    Your reasoning behind the origin setting is pointless to me, and could cause issues (players get stuck in worldspawn and die, it's happened many times before).
  • Declare
    PHP Code:
    new id read_data(2
    inside of your cvar_enabled check.
  • Do NOT use cs_user_spawn(), it is experimental, buggy, and probably doesn't even work. Use ExecuteHamB( Ham_CS_RoundRespawn, id ) instead.
  • You don't need new hit = hitplace in client_death. Just use hitplace...

EDIT: Hasn't this been made before?
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT

Last edited by wrecked_; 04-07-2010 at 19:16.
wrecked_ is offline
kanatzu
Veteran Member
Join Date: Oct 2007
Location: Sweden
Old 04-07-2010 , 19:38   Re: Knife DeathMatch
Reply With Quote #6

Quote:
Originally Posted by wrecked_ View Post

EDIT: Hasn't this been made before?
I think i've seen it before. But it was better.
__________________




Quote:
Originally Posted by wrecked_ View Post
Stop saying words before I sodomize you with a cucumber.
kanatzu is offline
Send a message via MSN to kanatzu
BeasT
Senior Member
Join Date: Apr 2007
Location: Lithuania
Old 04-08-2010 , 04:19   Re: Knife DeathMatch
Reply With Quote #7

http://forums.alliedmods.net/showthread.php?p=900976
BeasT is offline
Send a message via Skype™ to BeasT
Nyuszy
Senior Member
Join Date: Apr 2009
Old 04-08-2010 , 07:14   Re: Knife DeathMatch
Reply With Quote #8

Quote:
Originally Posted by kanatzu View Post
This is very basic.
I know, but i think it isn't a very bad start for a beginner like me.
Nyuszy is offline
HaLLoWeN
Member
Join Date: Nov 2009
Location: Serbia, Belgrade
Old 04-08-2010 , 08:04   Re: Knife DeathMatch
Reply With Quote #9

It's not, this is realy good plugin.. I want to make plugin like this..
HaLLoWeN is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 04-08-2010 , 09:16   Re: Knife DeathMatch
Reply With Quote #10

you should use ham function to spawn a user, best way.

PHP Code:
ExecuteHamHam_CS_RoundRespawnid ); 
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
Reply


Thread Tools
Display Modes

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 05:14.


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