Raised This Month: $ Target: $400
 0% 

client-command kill forbidden


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sen-me
Junior Member
Join Date: Jun 2006
Old 06-25-2006 , 08:11   Re: client-command kill forbidden
Reply With Quote #1

that i tried before, but it didnt work
sen-me is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 06-25-2006 , 08:15   Re: client-command kill forbidden
Reply With Quote #2

Code:
public client_kill(id) {     if(get_cvar_num("mp_kill"))     {         new name[32]         get_user_name(id, name, 31)         client_print(id, print_chat, "[%s] The command kill is forbidden!", name)                 return PLUGIN_HANDLED     }     return PLUGIN_CONTINUE }
If you're still having problems then show me the full code.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Gizmo
Senior Member
Join Date: May 2006
Location: Sweden
Old 06-25-2006 , 08:16   Re: client-command kill forbidden
Reply With Quote #3

Can you show the rest of the code?
Gizmo is offline
sen-me
Junior Member
Join Date: Jun 2006
Old 06-25-2006 , 08:51   Re: client-command kill forbidden
Reply With Quote #4

thats only the pluginini with register_plugin and register_cvar

Code:
#include <amxmodx>
#include <amxmisc>

public plugin_init()
{
    register_plugin("No Kill", "1.0", "sen-me http://privat.multi-pages.de")
    register_cvar("mp_kill", "0")
}

public client_kill(id)
{
    if(get_cvar_num("mp_kill") == 1)
    {
        new name[32]
        get_user_name(id, name, 31)
        client_print(0, print_chat, "[%s] The command kill is forbidden!", name)
        
        return PLUGIN_HANDLED
    }
 
 return PLUGIN_CONTINUE
}
i set mp_kill on 1 and type kill in my console, but i die and no message apeared
sen-me is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 06-25-2006 , 08:54   Re: client-command kill forbidden
Reply With Quote #5

Try this:
Code:
#include <amxmodx> #include <amxmisc> public plugin_init() {     register_plugin("No Kill", "1.0", "sen-me http://privat.multi-pages.de")     register_cvar("mp_kill", "0")     register_clcmd("kill" , "cmd_kill"); } public cmd_kill(id) {     if(get_cvar_num("mp_kill") == 1)     {         new name[32]         get_user_name(id, name, 31)         client_print(0, print_chat, "[%s] The command kill is forbidden!", name)                 return PLUGIN_HANDLED     }        return PLUGIN_CONTINUE }
I slightly modified your code & hooked the kill command to a function that should block it.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 06-25-2006 , 08:54   Re: client-command kill forbidden
Reply With Quote #6

Are you setting the mp_kill to 1 in your config?
__________________

mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
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 07:57.


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