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

Block "kill" Command [16/06/08] Updated


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Server Management        Approver:   GHW_Chronic (70)
Fry!
Veteran Member
Join Date: Apr 2008
Location: Latvia
Old 05-10-2008 , 14:54   Block "kill" Command [16/06/08] Updated
Reply With Quote #1

Block "kill" Command


Version : 0.6


Description :

This is simple plugin who blocks kill command in console. So first time when you type in console kill command you kill yourself. You can kill your self once in every new map.

Now everyone can kill themself if had least 75 HP. (can change by Cvar's)


Changelog :

0.1 - First
release
0.2 - removed some modules use "FAKEMETA" instead
0.3 - changed/removed some codes
0.4 - changed few lines
0.5 - changed line : new g_AlreadySaid[MAX_PLAYERS+1] back to g_AlreadySaid[33] then message work all time.
0.6 - added cvars amx_max_suicide and cvar amx_minhp_suicide

To Do :

Add cvar to allow kill themself if had least 75 HP value .
[Done]

Credits :

Connorr - helped with codes



[This is my "First" plugin]
Attached Files
File Type: sma Get Plugin or Get Source (Block_Kill_v0.6.sma - 5701 views - 2.0 KB)
__________________
Quote:
Originally Posted by wisam187
why all the great scriptors..... always.... leave and let their works go into oblivion ???
i miss your way in making outstanding plugins...
this forum needs lots of the likes of you..... and less of the idiots that spread right now.

Last edited by Fry!; 06-16-2008 at 17:06. Reason: Updated with cvar's / removed previous versions.
Fry! is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-10-2008 , 15:01   Re: Block "kill" Command
Reply With Quote #2

You didn't detect player spawn correctly.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Fry!
Veteran Member
Join Date: Apr 2008
Location: Latvia
Old 05-10-2008 , 15:09   Re: Block "kill" Command
Reply With Quote #3

omg , yes thanks I gonna fix that
__________________
Quote:
Originally Posted by wisam187
why all the great scriptors..... always.... leave and let their works go into oblivion ???
i miss your way in making outstanding plugins...
this forum needs lots of the likes of you..... and less of the idiots that spread right now.
Fry! is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 05-10-2008 , 15:12   Re: Block "kill" Command
Reply With Quote #4

There is no need to register kill as a clcmd AND concmd. Only one is needed.

Pointless define "#define BLOCK"

Function Blockkill is not found. Registering the kill command is not needed as you are using client_kill instead

Including cstrike is not needed.

Your description does not match what the plugin does. You say you can only use it once a map, but your script allows it once per spawn (on each ResetHUD, it allows you to kill yourself again)
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Fry!
Veteran Member
Join Date: Apr 2008
Location: Latvia
Old 05-10-2008 , 15:30   Re: Block "kill" Command
Reply With Quote #5

Quote:
Originally Posted by YamiKaitou View Post
There is no need to register kill as a clcmd AND concmd. Only one is needed.

Pointless define "#define BLOCK"

Function Blockkill is not found. Registering the kill command is not needed as you are using client_kill instead

Including cstrike is not needed.

Your description does not match what the plugin does. You say you can only use it once a map, but your script allows it once per spawn (on each ResetHUD, it allows you to kill yourself again)
Ok , I fix that soon , but why concmd is no needed ? That message appears in console even if player dont look in chat ? Ops , I forgat clcmd is no needed

PHP Code:
You say you can only use it once a mapbut your script allows it once per spawn 
Weird , I tested and I can only type kill in one round and that's all ! In every new round appears this message
PHP Code:
[AMXXDon't even think about it! 
...
__________________
Quote:
Originally Posted by wisam187
why all the great scriptors..... always.... leave and let their works go into oblivion ???
i miss your way in making outstanding plugins...
this forum needs lots of the likes of you..... and less of the idiots that spread right now.
Fry! is offline
SchlumPF*
Veteran Member
Join Date: Mar 2007
Old 05-10-2008 , 15:55   Re: Block "kill" Command
Reply With Quote #6

nvm yamikaitou said the same... i should start reading before posting ^^
__________________

Last edited by SchlumPF*; 05-10-2008 at 16:00.
SchlumPF* is offline
Send a message via ICQ to SchlumPF*
Old 05-10-2008, 16:00
ConnorMcLeod
This message has been deleted by ConnorMcLeod. Reason: :/
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-10-2008 , 16:06   Re: Block "kill" Command
Reply With Quote #7

Use fakemeta instead :

Also, print in console make player see it immediatly if he typed it

PHP Code:
#include <amxmodx>
#include <fakemeta>

#define PLUGIN "Block Kill Command"
#define VERSION "0.1"
#define AUTHOR "The_Thing"

#define MAX_PLAYERS    32

new g_AlreadySaid[MAX_PLAYERS+1]

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    
register_forward(FM_ClientKill"Forward_ClientKill")    
}

public 
client_putinserver(id)
{
    
g_AlreadySaid[id] = 0
}
    
public 
Forward_ClientKill(id)
{
    if(
g_AlreadySaid[id]++ == 1)
    {
        
client_print(idprint_chat"[AMXX] Don't even think about it!")
        
console_print(id"[AMXX] Don't even think about it!")
        return 
FMRES_HANDLED
    
}    
    
    return 
FMRES_SUPERCEDE

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 05-10-2008 at 16:09.
ConnorMcLeod is offline
Pokemon
Senior Member
Join Date: Mar 2008
Old 05-10-2008 , 16:25   Re: Block "kill" Command
Reply With Quote #8

Here Exelent do a same plugin for me.

http://forums.alliedmods.net/showthread.php?t=70371
__________________
Pokemon is offline
Fry!
Veteran Member
Join Date: Apr 2008
Location: Latvia
Old 05-10-2008 , 16:25   Re: Block "kill" Command
Reply With Quote #9

omg , thanks Connorr! Well I wanted somehow fix it my self ... You changed almost all plugin . + karma to you

Update will be soon!
__________________
Quote:
Originally Posted by wisam187
why all the great scriptors..... always.... leave and let their works go into oblivion ???
i miss your way in making outstanding plugins...
this forum needs lots of the likes of you..... and less of the idiots that spread right now.

Last edited by Fry!; 05-10-2008 at 16:52. Reason: Edit
Fry! is offline
chris
Senior Member
Join Date: Mar 2007
Location: America
Old 05-10-2008 , 16:54   Re: Block "kill" Command
Reply With Quote #10

Can you add a CVAR so you can choose how many times you can kill yourself until map change?
__________________
chris is offline
Send a message via AIM to chris
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 11:52.


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