AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved/Old Plugins (https://forums.alliedmods.net/forumdisplay.php?f=27)
-   -   Knife DeathMatch (https://forums.alliedmods.net/showthread.php?t=123668)

Nyuszy 04-07-2010 17:19

Knife DeathMatch
 
1 Attachment(s)
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... :oops:

fezh 04-07-2010 17:20

Re: Knife DeathMatch
 
You know you can't upload *.amxx files. It's a rule.

k1ngston 04-07-2010 17:21

Re: Knife DeathMatch
 
Nice job :D

kanatzu 04-07-2010 18:51

Re: Knife DeathMatch
 
This is very basic.


I give it 1/5 :crab:'s


Edit: Might your nickname also be "Lucky"?

wrecked_ 04-07-2010 19:03

Re: Knife DeathMatch
 
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?

kanatzu 04-07-2010 19:38

Re: Knife DeathMatch
 
Quote:

Originally Posted by wrecked_ (Post 1142968)

EDIT: Hasn't this been made before?

I think i've seen it before. But it was better.

BeasT 04-08-2010 04:19

Re: Knife DeathMatch
 
http://forums.alliedmods.net/showthread.php?p=900976

Nyuszy 04-08-2010 07:14

Re: Knife DeathMatch
 
Quote:

Originally Posted by kanatzu (Post 1142958)
This is very basic.

I know, but i think it isn't a very bad start for a beginner like me.

HaLLoWeN 04-08-2010 08:04

Re: Knife DeathMatch
 
It's not, this is realy good plugin.. I want to make plugin like this..:)

tuty 04-08-2010 09:16

Re: Knife DeathMatch
 
you should use ham function to spawn a user, best way.

PHP Code:

ExecuteHamHam_CS_RoundRespawnid ); 



All times are GMT -4. The time now is 12:31.

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