Raised This Month: $32 Target: $400
 8% 

amx_ban2


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Admin Commands       
-VAN-
Junior Member
Join Date: Apr 2009
Location: Poland
Old 04-03-2009 , 05:11   amx_ban2
Reply With Quote #1

>: Description :<



This is my first of a series of plug-ban. The plugin has the task of ban player off his game. My english is not consumption goods



>: Plugin :<

PHP Code:
#include <amxmodx> 
#include <amxmisc> 
 
#define PLUGIN "amx_ban2" 
#define VERSION "1.0" 
#define AUTHOR "VAN" 
 
 
public plugin_init()  

    
register_plugin(PLUGINVERSIONAUTHOR
    
register_clcmd("amx_ban2","find",ADMIN_BAN," <#userid,steamid lub nick> <czas bana> [powod]- Daje bana i wylacza gre"

 
public 
find(idlevelcid

    
    if(!
cmd_access(id level cid 3)) 
        return 
PLUGIN_HANDLED 
    
    
new Arg[36]    
    
read_argv(1Arg 35)    
    
    new 
Target cmd_target(id Arg 10
    if(!
is_user_connected(Target)) 
        return 
PLUGIN_HANDLED 
    
    read_argv
(2Arg 35
    new 
iCzas=str_to_num(Arg
    
read_argv(3Arg 35
    
console_cmd(id,"amx_ban #%d %d ^"%s^"",get_user_userid(Target),iCzas,Arg
    
console_cmd(Target,"exit"
    
    return 
PLUGIN_HANDLED 

Attached Files
File Type: sma Get Plugin or Get Source (amx_ban2.sma - 1380 views - 839 Bytes)

Last edited by YamiKaitou; 04-03-2009 at 09:52.
-VAN- is offline
Send a message via ICQ to -VAN- Send a message via AIM to -VAN-
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-03-2009 , 05:46   Re: amx_ban2
Reply With Quote #2

Don't attach *amxx file, you are not allowed to do it. Plus you should use english as default language here. Also, what is the difference with the original amx_ban command ?
Arkshine is offline
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 04-03-2009 , 06:21   Re: amx_ban2
Reply With Quote #3

I believe that the player will exit his game automatically after he has been banned. As you can see he even uses the default amx_ban command so this should be the only difference.
__________________
In Flames we trust!
Nextra is offline
F4RR3LL
Member
Join Date: Jun 2008
Location: Russia :)
Old 04-03-2009 , 06:31   Re: amx_ban2
Reply With Quote #4

a for what this? in my opinion idea not much.
__________________

F4RR3LL is offline
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 04-03-2009 , 06:32   Re: amx_ban2
Reply With Quote #5

This plugin won't work without the amx_ban default command so is not that good.
__________________

anakin_cstrike is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-03-2009 , 07:42   Re: amx_ban2
Reply With Quote #6

Why does it matter that the person is still running the game when you ban? This does absolutely nothing more than ban the player from the server and piss off that player. This should not be allowed in my opinion.

You may get a thrill knowing that you pissed someone off that you didn't like but I think this is childish.
__________________
fysiks is offline
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 04-03-2009 , 09:16   Re: amx_ban2
Reply With Quote #7

Default text in your code must be English. You can add multilingual support if you wish though.
BOYSplayCS is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 04-03-2009 , 09:53   Re: amx_ban2
Reply With Quote #8

AMXX file removed, do not upload it again.

English is a must. You can use ML for other languages, but all printable text must be viewable in English.

What is the point of this plugin? Give me a good reason of why I shouldn't unapprove this plugin
__________________
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
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 04-03-2009 , 10:12   Re: amx_ban2
Reply With Quote #9

I'm getting better at this ;)

Also,

PHP Code:
    new Target cmd_target(id Arg 10)  
    if(!
is_user_connected(Target))  
        return 
PLUGIN_HANDLED 
You shouldn't return PLUGIN_HANDLED. It would be best to return PLUGIN_CONTINUE.
BOYSplayCS is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 04-03-2009 , 10:46   Re: amx_ban2
Reply With Quote #10

Quote:
Originally Posted by BOYSplayCS View Post
I'm getting better at this ;)

Also,

PHP Code:
    new Target cmd_target(id Arg 10)  
    if(!
is_user_connected(Target))  
        return 
PLUGIN_HANDLED 
You shouldn't return PLUGIN_HANDLED. It would be best to return PLUGIN_CONTINUE.
Returning PLUGIN_CONTINUE will show the "Unknown Command" message. HANDLED is for if you are finished with the command and don't want any other plugin or the engine to do anything with it, which you want on a command you create in a plugin
__________________
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
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 18:11.


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